Socket
Socket
Sign inDemoInstall

vbml

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vbml

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


Maintainers
1

Readme

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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc