reqmd-io
Build reqmd-import/v1 exchange bundles from Python.
This library only emits the JSON exchange format — it contains no Markdown or
YAML logic. reqmd-import is the single renderer that turns a bundle into
reqmd documents (schema.yaml + .md), so an importer written in Python
cannot drift from the Go renderer.
Install
pip install ./python # from the repo root
Use
from reqmd_io import Bundle, Document, Requirement
doc = Document(id_prefix="DOORS-", dir="brakes", level="stakeholder-requirements",
title="Brakes Module", external=True,
properties={"priority": {"type": "string", "enum": ["High", "Low"]}})
doc.add(Requirement(native_id="17", title="Brake request",
body="The pedal shall request braking.",
attrs={"priority": "High"}))
doc.add(Requirement(native_id="42", title="Brake pressure", parent="17",
native_trace=["17"], trace=["SYS-001"],
attrs={"priority": "Low"}))
Bundle([doc]).write("brakes.json")
reqmd-import brakes.json -o spec/00-doors/
reqmd check spec/
Key points:
native_idis the source tool's own stable ID (a DOORS object number, a codeBeamer item ID). The reqmd ID becomes<id_prefix><native_id>, so re-imports never churn IDs and hand-authoredtrace:links keep resolving. It must not contain whitespace (anItem 42key is rejected: nothing could evertrace:to the ID it produces).traceholds fully-qualified reqmd IDs.native_traceholds native IDs of other items in the same bundle and is rewritten to that item's full ID.attrstake strings, numbers, booleans, or flat lists of those. A string stays a string even when it looks like a number ornull, so pass a real number or boolean when you mean one. Names may only contain letters, digits,_,-and.. The built-insstatusandtraceare reserved (there are dedicated fields).bodyis Markdown and may contain headings (they become info items), but not a fence whose info string isattrdirectly under a heading — that pair would become a requirement of its own.propertiesdeclares the attr-block JSON Schema; regenerating with a new attr means adding it there.
A complete, runnable importer is in examples/csv_import.py
— one generic reader for DOORS and codeBeamer CSV exports.
Test
cd python && python -m unittest discover -s tests
Releasing
reqmd-io versions independently of the reqmd binaries: bump it only for
a new feature or an exchange-format change, not for every reqmd release. The
version in pyproject.toml is the single source of truth.
# 1. bump the version in pyproject.toml (PyPI never allows a reuse)
# 2. land it on main, then tag with the py-v prefix (NOT the bare v prefix):
git tag py-v0.1.0 && git push origin py-v0.1.0
The py-v* tag triggers .github/workflows/publish-python.yml, which runs the
tests, builds the sdist and wheel, runs twine check, and fails if the tag and
the packaged version disagree. Publishing uses PyPI Trusted Publishing, so no
API token secret is stored.
To rehearse before a real release, build locally and upload to TestPyPI:
cd python
python -m build && twine check dist/*
twine upload -r testpypi dist/*
First-time setup (once, on PyPI): add a pending publisher for the project
reqmd-io with owner dVoo, repository reqmd, workflow
publish-python.yml, and environment pypi.
Metadata
Release files for reqmd-io 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reqmd_io-0.1.0.tar.gz | 17.5 kB | With provenance | Details for reqmd_io-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reqmd_io-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for reqmd_io-0.1.0-py3-none-any.whl |
Total release size: 34.6 kB
Release files / reqmd_io-0.1.0.tar.gz
| Download URL | reqmd_io-0.1.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8366b561891d3e1e42f0663c9c8b34b40b6761b1e5c102036805e8ffb2ebfcbc
|
|
BLAKE2b-256 checksum How to use checksums |
495e1c32b324bc944dddd50936803d30ee8323c7b12b419601b87882a9c7e1c3
|
| 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 15, 2026.
Transparency logRelease files / reqmd_io-0.1.0-py3-none-any.whl
| Download URL | reqmd_io-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39c0a591dd7d1751c027601885c5cff153548865167aacb6bbb3769878acc2da
|
|
BLAKE2b-256 checksum How to use checksums |
dd660a3f0fedc9a2524a9a7be7ebb16b107aaf038b914dda67d1d45bc15efb93
|
| 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 15, 2026.
Transparency logSecurity for reqmd-io 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for reqmd_io-0.1.0.tar.gz
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 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.