Markup language that compiles to regex.
Project description
— 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
:book: 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vbml2-2.0.1.tar.gz
(2.3 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
vbml2-2.0.1-py3-none-any.whl
(18.0 kB
view details)
File details
Details for the file vbml2-2.0.1.tar.gz.
File metadata
- Download URL: vbml2-2.0.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb61db92cacf3a6e5a70e9f03e301cabf73832adc2d595bf40142e0b87711586
|
|
| MD5 |
1cbbd6dc812c5e3e85a394a3d7c3060d
|
|
| BLAKE2b-256 |
5f008e3cfd9f4cff93125d35f5597e3e8b65b7222d41a3e7ce7bafc43cb3fbfe
|
File details
Details for the file vbml2-2.0.1-py3-none-any.whl.
File metadata
- Download URL: vbml2-2.0.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc87d9288bb2cc0a3be35f6ddeac65049a992c0ca2b9981a15c6a298839b6d4f
|
|
| MD5 |
11fbc3f629f71c50745adfbfa55a0225
|
|
| BLAKE2b-256 |
08121a07660baf604345cf8200fe6e01b3c0b5a0a8d8dda28e146af23061c75f
|