Registry / testing / sphinx-needs

sphinx-needs

JSON →
library8.1.1pypypiunverified

Sphinx Needs is a Sphinx extension for managing requirements, specifications, and other 'needs' within documentation. It allows users to define, link, filter, and visualize needs directly in reStructuredText documents. The current version is 8.0.0, and it follows a regular release cadence with major updates typically every few months and patch releases as needed.

pip install sphinx-needs
INSTALL
IMPORT
SIG · SPHINX-NEEDS
S
sphinx-needs
testingpythonv8.1.1
Install
6.2s avg
Import
Disk
111MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v8.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 6s
py 3.11
✕ build_error
✓ 6.05s
py 3.12
✕ build_error
✓ 5.7s
py 3.13
✕ build_error
✓ 5.7s
py 3.9
✓ —
✓ 7.55s
111MB installed
● package 111MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Extension
extensions = ['sphinx_needs']
import sphinx_needs
Sphinx Needs is a Sphinx extension, not a regular Python library to be imported directly into application code. It's activated by adding its name to the `extensions` list in your Sphinx `conf.py`.

Add 'sphinx_needs' to the `extensions` list in your Sphinx project's `conf.py` file. Then, you can define needs using the `.. need::` directive in your reStructuredText (`.rst`) documents.

# conf.py extensions = ['sphinx_needs'] # my_document.rst .. need:: My first requirement :id: my_req_1 :status: open :tags: example, important This is the detailed description of my first requirement.
Debug
Known issues
breakingStarting with version 7.0.0, Sphinx-Needs enforces stricter schema validation for `needs_extra_options`, `needs_statuses`, and `needs_tags` by default. Existing configurations with undeclared or invalid custom fields, statuses, or tags may cause build failures.
fix
Ensure all custom `needs_extra_options`, `needs_statuses`, and `needs_tags` are correctly defined and comply with their respective schemas in `conf.py`. If migrating, consider temporarily setting `needs_schema_validation_enabled = False` (version 6.1.1+) to debug.
affects: >=7.0.0
breakingThe format for `needs_global_options` changed significantly in version 5.1.0. Older configurations using the previous list-based format for global options will no longer work.
fix
Update your `needs_global_options` definition in `conf.py` to the new dictionary-based format. Consult the official Sphinx-Needs documentation for the current structure.
affects: >=5.1.0
breakingThe `extra_options_sum` configuration option was removed in version 7.0.0. Any usage of this option will lead to build errors.
fix
Replace `extra_options_sum` with equivalent functionality using `dynamic_functions` in your `conf.py`.
affects: >=7.0.0
gotchaWhile schema validation is enabled by default since 6.1.1, disabling it via `needs_schema_validation_enabled = False` should be done with caution. It can mask data inconsistencies that may cause issues later or when re-enabling validation.
fix
Prioritize fixing schema errors over disabling validation. Only disable temporarily for migration or debugging purposes, and re-enable as soon as possible to maintain data integrity.
affects: >=6.1.1
Upgrade
Version history
8.1.1latest on PyPI · released May 20, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
sphinx-needs — pip install sphinx-needs · libregistry