- Clean
regex-based parser - Easy-to-understand validators / Custom validators
- Lots of features out-of-box
I am <name>, i am <age:int> years old + I am Steven, i am 20 years old = {"name": "Steven", "age": 20}
Install with pip:
pip install vbmlOr with poetry:
poetry add vbmlClone repo from git:
git clone https://github.com/tesseradecade/vbml.gitGo to repository and run tests with poetry:
cd vbml
poetry install
poetry run pytestFull documentation contents are available in docs/index.md
from vbml import Patcher, Pattern
patcher = Patcher()
pattern = Pattern("I have <amount:int> apples. They are <adj>")
result1 = patcher.check(pattern, "I have 3 apples. They are green")
result2 = patcher.check(pattern, "I have three apples. They are green")
result3 = patcher.check(pattern, "Something irrelevant")
result1 # {"amount": 3, "adj": "green"}
result2 # None
result3 # NoneLeave a star if this project helped you
Made by timoniq