VBML - perfect pythonistic parser / string manipulator :sparkles:
Features
- 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}
Installation
Install with pip:
pip install vbml
Or with poetry:
poetry add vbml
Run tests
Clone repo from git:
git clone https://github.com/tesseradecade/vbml.git
Go to repository and run tests with poetry:
cd vbml
poetry install
poetry run pytest
:book: Documentation
Full documentation contents are available in docs/index.md
Simple 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, "Something irrelevant")
result1 # {"amount": 3, "adj": "green"}
result2 # None
result3 # None
Leave a star if this project helped you
Made by timoniq
Metadata
Release files for vbml 1.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vbml-1.1.post1.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vbml-1.1.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / vbml-1.1.post1.tar.gz
| Download URL | vbml-1.1.post1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59e852b35b2c4d3f8e7d927ab2e0a9dde753f3427ab9a61aca7ed2f4d3986f3c
|
|
BLAKE2b-256 checksum How to use checksums |
ba768b25f75c1ee4d41118676e5f3bb97397eac7eecd68d98054ec27e07974e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.8.7 Darwin/20.6.0
|
Release files / vbml-1.1.post1-py3-none-any.whl
| Download URL | vbml-1.1.post1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3037c3f67b79128c48a100326fde833345e7d1e0d466566d37c2c98d08a587d
|
|
BLAKE2b-256 checksum How to use checksums |
c3ead125147525917dc5a35105e432706a33aebdd41c4707870d8f96133eff2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.8.7 Darwin/20.6.0
|