Skip to main content

Markup language that compiles to regex.

Project description

— markup language that compiles to regex.

VBML version Python version PyPI - Downloads GitHub issues by-label

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

*here*

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vbml2-2.0.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

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

Hashes for vbml2-2.0.1.tar.gz
Algorithm Hash digest
SHA256 bb61db92cacf3a6e5a70e9f03e301cabf73832adc2d595bf40142e0b87711586
MD5 1cbbd6dc812c5e3e85a394a3d7c3060d
BLAKE2b-256 5f008e3cfd9f4cff93125d35f5597e3e8b65b7222d41a3e7ce7bafc43cb3fbfe

See more details on using hashes here.

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

Hashes for vbml2-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc87d9288bb2cc0a3be35f6ddeac65049a992c0ca2b9981a15c6a298839b6d4f
MD5 11fbc3f629f71c50745adfbfa55a0225
BLAKE2b-256 08121a07660baf604345cf8200fe6e01b3c0b5a0a8d8dda28e146af23061c75f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page