Skip to main content

specreq

Define reusable requirements as typed Pydantic models. Compose them into specs as JSON trees. Validate products against them.

See the Changelog for recent changes.

my_project/
  reqs/          # req definitions — gather shared ones, write custom ones
  specs/         # specs — JSON trees of configured req instances
  products/      # built output that specreq validates against your specs
  1. Gather reqs — collect shared requirements and write custom ones by subclassing Req with typed fields, a kind discriminator, and a validate(self, product: Path) method.
  2. Write specs — compose specs as JSON trees of configured req instances describing what your product should satisfy.
  3. Build, validate, repeat — run specreq validate from the project root.

Req files under reqs/ are standard Python — flat files are modules, directories with __init__.py are packages. Reqs import each other normally.

Metadata

Release files for specreq 0.2.0

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

Source distribution (sdist)

Source distribution for specreq 0.2.0
File Size Uploaded
specreq-0.2.0.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for specreq 0.2.0
File Interpreter ABI Platform
specreq-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / specreq-0.2.0.tar.gz

Download URL specreq-0.2.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
30893cc70a1f154d141952ec2ddc47cb4d988f92d520b43685040c0320aaafab
BLAKE2b-256 checksum
How to use checksums
10b945511be3eec39a63e85afa5373fc74768085398a38a4590ec2cfe5e29b9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / specreq-0.2.0-py3-none-any.whl

Download URL specreq-0.2.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19b56ff9a171c4d5c57dc21657a775e6fbba0da7ad6f5d5de707eddd1ab9c475
BLAKE2b-256 checksum
How to use checksums
ea14f92811a854a3cdfbd6ddd75dc265cb89fbd0e027ed4fbebdbc5e030d75d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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