Skip to main content

Way to check, match & resist. Sofisticated object oriented regex-based text parser

Project description

[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("He is <description> like he has right just turned <age:int> years old")

result1 = patcher.check(pattern, "He is so spontaneous like he has right just turned 10 years old")
result2 = patcher.check(pattern, "He is silly like he has right just turned t3n years old")
result3 = patcher.check(pattern, "Haha regex go brrr")

result1 # {"description": "so spontaneous", "age": 10}
result2 # None
result3 # None

Leave a :star: if this project helped you
Made with :heart: by timoniq

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vbml, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size vbml-1.1-py3-none-any.whl (15.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size vbml-1.1.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page