— markup language that compiles to regex.
Features
- Clean regex compiler and parser (the regex core can be easily switched)
- Built-in validators and easy to implement custom ones
"I am <name>, i am <age:int> years old" + "I am Steve, i am 50 years old" = {"name": "Steve", "age": 50}
Installation
Install with pip, poetry or uv:
pip install vbml
poetry add vbml
uv add vbml
📖 Documentation
Example
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, "I have apples")
result1 # {"amount": 3, "adj": "green"}
result2 # None
result3 # False
Metadata
Release files for vbml2 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vbml2-2.0.2.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vbml2-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / vbml2-2.0.2.tar.gz
| Download URL | vbml2-2.0.2.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b022b2bc0c15a71ec3bd4764d47be465c62617934cffb76c91af994853563930
|
|
BLAKE2b-256 checksum How to use checksums |
97867314dedd7a8f12bc626060bd0cf76489fa1aa6508d59b002ede0c4a6f7ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vbml2-2.0.2-py3-none-any.whl
| Download URL | vbml2-2.0.2-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21c7c992c01659e8ab8fae778639b6bda0614121e3d6dc43106694353b29afb5
|
|
BLAKE2b-256 checksum How to use checksums |
e6cc3e63622c3c3297c40a783dc28698db283f1518a291faca09f24109111ca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|