A previous release had provenance metadata, but this release does not. View details.
pyreqif
Python library to read, edit, and repackage ReqIF documents (.reqif / .reqifz), the OMG standard commonly used to exchange requirements between manufacturer and supplier (e.g. automotive lastenheft).
This version is prepared per defect for reqif from VW.
In case you have another OEM file please contact me.
Two classes:
Reqif: a single.reqiffile. Reads each requirement (SPEC-OBJECT) with its text, and two configurable fields designed for the supplier workflow: comment (Kommentar Lieferant M, XHTML) and status (Status Lieferant M, enumerated). Allows editing them, exporting/importing via Excel (with a validation dropdown for the status, and images embedded in the cell if a resolver is provided), and detects images embedded in each requirement's text.Reqifz: a.reqifz(a zip with one or more.reqiffiles plus their attachments). Extracts to a working directory, exposes each.reqifas aReqif, and repackages everything back while keeping the attachments intact.
Installation
pip install pyreqifz
(the package name on PyPI is pyreqifz — pyreqif was already taken — but the module is still imported as pyreqif.)
Basic usage
from pyreqif import Reqifz
with Reqifz("lastenheft.reqifz") as pack:
for doc in pack:
print(doc, "->", len(doc), "requirements")
doc = pack.get(0) # or pack.get("file_name.reqif")
# read
req = doc.get("_a1b2c3...")
print(req.text, req.comment, req.status, req.images)
# edit (None leaves the field unchanged, "" clears it)
doc.update("_a1b2c3...", comment="Accepted, no changes.", status="akzeptiert")
# export to Excel, with the first image of each requirement
# embedded in its cell ("Image" column)
doc.to_excel("requirements.xlsx", image_resolver=pack.image_path)
# import back (only touches comment and status)
doc.update_from_excel("requirements_reviewed.xlsx")
# repackage with the changes
pack.save("lastenheft_edited.reqifz")
A standalone (uncompressed) .reqif is used the same way, without going through Reqifz (but then to_excel() can't embed images, since it doesn't know where the attachments are — pass your own image_resolver if you have them elsewhere):
from pyreqif import Reqif
doc = Reqif("document.reqif")
doc.update("_a1b2c3...", status="Klärungsbedarf")
doc.save("document_edited.reqif")
Attribute names
By default, the standard ReqIF names are used for the text (ReqIF.Text / ReqIF.ChapterName as fallback) and the field names for this specific supplier workflow (Kommentar Lieferant M / Status Lieferant M). If your document uses other names, create a subclass:
from pyreqif import Reqif
class MyReqif(Reqif):
COMMENT_ATTR = "Supplier Comment"
STATUS_ATTR = "Supplier Status"
Development
uv venv
uv pip install -e ".[dev]"
uv run pytest
GitHub
https://github.com/ErnestoAvedillo/pyreqif
Contact
Ernesto Avedillo Carretero — eavedillo@yahoo.es
License
MIT
Metadata
Release files for pyreqifz 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreqifz-0.1.2.tar.gz | 13.0 kB | Without provenance | Details for pyreqifz-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreqifz-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyreqifz-0.1.2-py3-none-any.whl |
Total release size: 23.4 kB
Release files / pyreqifz-0.1.2.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | pyreqifz-0.1.2.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e38da075416c9d21657be026c1bb455f3f624b5adb7e023be0ed0a0d482ac255
|
|
BLAKE2b-256 checksum How to use checksums |
600dd268582c5bf79b8d3a2a27ec8da1e5d5b1ef0c86bba5aaf156c511ab7d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / pyreqifz-0.1.2-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | pyreqifz-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ab073c31e6af0fa73e5439ce7f8fb21bf4c192eccade18ccd9ef88a56844f3c
|
|
BLAKE2b-256 checksum How to use checksums |
ab6c156efb9822a5128cf63352648072bc1c1a0dcdff81fd807d0af690e57a52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for pyreqifz 0.1.2
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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0 2 files With provenance
- Added 0.1.2 2 files Without provenance
A 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.