Skip to main content

Define requirements as typed models, compose specs as JSON, validate products.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specreq-0.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

specreq-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file specreq-0.2.0.tar.gz.

File metadata

  • Download URL: specreq-0.2.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for specreq-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30893cc70a1f154d141952ec2ddc47cb4d988f92d520b43685040c0320aaafab
MD5 bf8717b150bc510b2ca41a15b7b44042
BLAKE2b-256 10b945511be3eec39a63e85afa5373fc74768085398a38a4590ec2cfe5e29b9a

See more details on using hashes here.

File details

Details for the file specreq-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: specreq-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for specreq-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19b56ff9a171c4d5c57dc21657a775e6fbba0da7ad6f5d5de707eddd1ab9c475
MD5 1b6c97ae311bf59d4aa6304796e91462
BLAKE2b-256 ea14f92811a854a3cdfbd6ddd75dc265cb89fbd0e027ed4fbebdbc5e030d75d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page