Skip to main content

VBML - perfect pythonistic parser / string manipulator :sparkles:

PyPI - License PyPI - Downloads GitHub repo size GitHub issues by-label

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)

Source distribution for vbml 1.1.post1
File Size Uploaded
vbml-1.1.post1.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vbml 1.1.post1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.1.post1 This release

2 release files

1.1

2 release files

1.0

2 release files

0.5.92

2 release files

0.5.91

2 release files

0.5.9

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page