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.0.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.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file vbml2-2.0.0.tar.gz.

File metadata

  • Download URL: vbml2-2.0.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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.0.tar.gz
Algorithm Hash digest
SHA256 3ca757e7e611af4d134171a1b641a72c38468147ca1155e395ac5bd25ee2fbd8
MD5 179e13e200c5b4042a6298b9a1d936cd
BLAKE2b-256 ae2f0fc78450380fc55171dce968f22100c4063a825065ac5f8c18de82b97acc

See more details on using hashes here.

File details

Details for the file vbml2-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: vbml2-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff06ae5873e758e7cf20fa5dabc9d5a1468b8fb5924b888044ae27a9b90d9ef4
MD5 336856a2c848aacc5b4169ad5b06dcb2
BLAKE2b-256 75e3bd164873b4232c14f72dbb43a6ed5c59b457b3aad7d02cb93e16f818e6a9

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