Skip to main content

sphinx-ub-directives

A Sphinx extension for defining your own directives, without writing Python:

  • directive presets: a new directive name that is an existing directive with preset options, or project-wide defaults for an existing one;
  • template directives: a directive of your own whose output is a Jinja template, rendered with its argument, options and body and with plain data you declare;
  • ub-template, a generic template directive, switched on when you want it.
# conf.py
extensions = ["sphinx_ub_directives"]

ub_directive_presets = {
    "callout": {"base": "note", "append_options": {"class": "callout"}},
}

Everything can be configured in conf.py or in ubproject.toml.

With sphinx-needs (optional): a preset can be based on a need type (sphinx-needs 9.2 or later), and every template sees the project's variant data as var, the same values .. if:: evaluates against.

With ubCode: ubCode reads the same tables from ubproject.toml and implements the same behaviour, so a project configured there renders the same text and the same needs in both. The behaviour is specified by design/directives-contract.md, and its executable half is the two conformance corpora in tests/fixtures/, which ubCode vendors. ubCode does not read conf.py: settings written there apply to the Sphinx build only.

Metadata

Release files for sphinx-ub-directives 0.1.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 sphinx-ub-directives 0.1.0
File Size Uploaded Provenance Actions
sphinx_ub_directives-0.1.0.tar.gz 34.5 kB Without provenance Details for sphinx_ub_directives-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-ub-directives 0.1.0
File Interpreter ABI Platform Actions
sphinx_ub_directives-0.1.0-py3-none-any.whl Python 3 none any Details for sphinx_ub_directives-0.1.0-py3-none-any.whl

Total release size: 73.6 kB

Release files / sphinx_ub_directives-0.1.0.tar.gz

Download URL sphinx_ub_directives-0.1.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f9ea4d1c960607633fb7380a3853696d72c7e18a34d3a5a636eb6ac6b792eaa3
BLAKE2b-256 checksum
How to use checksums
fad6f6817c5538fff57551ead301acb1141b389a3883e4f7f5b9a96e0b485b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / sphinx_ub_directives-0.1.0-py3-none-any.whl

Download URL sphinx_ub_directives-0.1.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6523e65319cf7f79c08d1fcc38a2e21636ba45ad586f1b728a1d4a4ad001d1fa
BLAKE2b-256 checksum
How to use checksums
007208a24692ed3684aae8fcea93b9269c7c8b5bc4af4b8e9a5312424f4000e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for sphinx-ub-directives 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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