Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

plain-parser

Python parser for ***plain specification files.

Reads a .plain module and its import / requires chain, resolves Liquid templates, validates concepts and linked resources, and returns the marshalled specification tree plus the ordered list of functionalities (FRIDs).

Install

pip install plain-parser

Usage

Validate a module and its requires chain from the command line (<file>: OK and exit 0 when valid; Error: … on stderr and exit 1 otherwise):

plain-parser check my_spec.plain [--template-dir DIR] [--config-name NAME]

Modules and {% include %} templates are looked up in the .plain file's directory, then in --template-dir. When --template-dir is not given, it is read from the template-dir key of config.yaml (or the file named by --config-name), found next to the .plain file or in the working directory. Finding it in both is a usage error (exit 2). The config file is read even when --template-dir is given, so a malformed one fails the run either way. Other config keys are ignored.

Or from Python:

from plain_parser import plain_file_parser

module_name, plain_source_tree, required_modules = plain_file_parser("my_spec.plain", ["."])

plain_source_tree is a dict keyed by section (definitions, implementation reqs, test reqs, functional specs), each a list of {"markdown": ..., "linked_resources": [...]} entries. plain_parser.plain_spec has helpers for walking functionalities (get_frids, get_specifications_for_frid, collect_linked_resources).

Development

uv venv --python 3.11 && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest
black . --check && isort . --check-only && flake8 . && mypy src

License

MIT, see LICENSE.

Metadata

Release files for plain-parser 0.1.2.dev5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plain-parser 0.1.2.dev5
File Size Uploaded
plain_parser-0.1.2.dev5.tar.gz 71.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plain-parser 0.1.2.dev5
File Interpreter ABI Platform
plain_parser-0.1.2.dev5-py3-none-any.whl Python 3 none any Details

Total release size: 95.1 kB

Release files / plain_parser-0.1.2.dev5.tar.gz

Download URL plain_parser-0.1.2.dev5.tar.gz
Size 71.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b1c13011f3ff3954bda14cd985ab5d6ef5f11ead0ef51e78a9da61f7931fc26f
BLAKE2b-256 checksum
How to use checksums
cc4db2e884c1ad6c5df39d5e1d46bd51fe479ed23231ef65ff27df5b623bfb95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / plain_parser-0.1.2.dev5-py3-none-any.whl

Download URL plain_parser-0.1.2.dev5-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1175f984d467427cb977ebdf955ea444bc9aa8053e0423fa7a79bc3e47c59812
BLAKE2b-256 checksum
How to use checksums
a8d0c3fbcb015d2cbe14536fd14f56e0938f49345c84349c32a9504dc313a6d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log
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