PyMeta3
Pattern-matching language based on OMeta for Python 3 and 2
What it is and what it does
PyMeta3 is a pattern-matching language implementation based on OMeta, an object-oriented grammar formalism. It lets you define parsing rules using a compact PEG-like syntax and compiles them into Python classes with methods corresponding to grammar rules. Each rule specifies parsing expressions that consume input and return values on successful match.
The package is useful for building parsers, lexers, and tree transformers without writing imperative parsing code. You define rules declaratively (e.g., `foo ::= 'x' 'y' => result`), and PyMeta3 handles the matching logic. It has no runtime dependencies, but the project is no longer maintained—the last release was 2015-02-22 and the repository shows no activity since 2019-01-09.
Use it for:
- Build a simple expression parser or calculator by defining grammar rules for operators and operands
- Implement a domain-specific language (DSL) lexer and parser without hand-coding recursive descent logic
- Transform structured text or code by parsing it into a tree and applying pattern-matching rules
- Prototype a language or configuration file parser quickly using declarative grammar syntax
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyMeta3 compiles pattern-matching grammars based on Parsing Expression Grammars (PEGs) into Python classes, enabling compact syntax for lexing, parsing, and tree transformation.
No—unless you are maintaining legacy code already using PyMeta3. The package is abandoned (last commit 2019-01-09, no releases since 2015-02-22), has high install friction, and its Python 3 compatibility is unverified beyond Python 3.4. Consider actively maintained alternatives for new projects.
Install
pymeta3 on PyPI
pip
pip install pymeta3uv
uv add pymeta3poetry
poetry add pymeta3Installing PyMeta3
Before you install
Installation friction is high due to source distribution only; the package is abandoned (last commit 2019-01-09, no releases since 2015-02-22), so expect no maintenance or bug fixes.
License in practice
MIT License permits commercial and private use with minimal restrictions, making it legally safe to adopt if you accept the maintenance risk.
Quickstart
from pymeta.grammar import OMeta
grammar = """ones ::= '1' '1' => 1
twos ::= '2' '2' => 2
stuff ::= ( | )+"""
Example = OMeta.makeGrammar(grammar, {})
g = Example("11221111")
result, error = g.apply("stuff")
No explicit Python version requirement stated; classifiers list Python 2.7, 3.3, and 3.4, but compatibility with modern Python versions is unverified.
Verify before relying
- Whether PyMeta3 actually works on Python 3.5+ despite classifiers only listing up to 3.4
- Whether the package has been tested or used successfully in recent years given the 2019 last commit
- Whether high install friction reflects build complexity or is merely a packaging choice
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 4,191 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 659,021/month — #5,465 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: PyMeta3-0.5.1.tar.gz
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
parsimoniousParsimonious is a pure-Python PEG (parsing…
permissive · top 5,000 on PyPI
ParsleyParsley is a PEG-based parsing library that…
permissive · top 5,000 on PyPI
pygmarsPygmars builds lightweight lexers and parsers…
permissive · top 15,000 on PyPI
pyPEG2pyPEG2 is a PEG (Parsing Expression Grammar)…
copyleft · top 15,000 on PyPI
rule-engineRule Engine provides a lightweight, custom…
permissive · top 15,000 on PyPI
TatSuTatSu compiles extended EBNF grammars into…
permissive · top 5,000 on PyPI
pyniniPynini compiles grammar rules into weighted…
permissive · top 15,000 on PyPI
mo-parsingmo-parsing is a PEG parser generator that lets…
permissive · top 15,000 on PyPI
spark-parserImplements an Earley algorithm parser for…
permissive · top 15,000 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI