tesseradecade/vbml

Repository files navigation

โ€” markup language that compiles to regex.

Python versionPyPI - DownloadsGitHub repo sizeGitHub issues by-label

  • 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, poetry or uv:

pip install vbml
poetry add vbml
uv add vbml

Clone repo from git:

git clone https://.com/tesseradecade/vbml.git

Go to repository and run tests with uv:

cd vbml
uv sync
uv run pytest tests

Full documentation contents are available in docs/index.md

from vbml import er, Pattern

er = er()
pattern = Pattern("I have <amount:int> apples. They are <adj>")

result1 = er.check(pattern, "I have 3 apples. They are green")
result2 = er.check(pattern, "I have three apples. They are green")
result3 = er.check(pattern, "Something irrelevant")

result1 # {"amount": 3, "adj": "green"}
result2 # None
result3 # None

About

String validation tool compiling into regex

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Contributors 2

    •  
    •