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.3 or later, which the needs extra installs), 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.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 sphinx-ub-directives 0.2.0
File Size Uploaded Provenance Actions
sphinx_ub_directives-0.2.0.tar.gz 37.2 kB Without provenance Details for sphinx_ub_directives-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 79.0 kB

Release files / sphinx_ub_directives-0.2.0.tar.gz

Download URL sphinx_ub_directives-0.2.0.tar.gz
Size 37.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb8d79ea831c26e497a2f20aead3d5a4177da3aa2030ce70e0ef042b75b89030
BLAKE2b-256 checksum
How to use checksums
e521551254159552e3b0bbb072e7ffbedac6d1545798d510f5efaeeb14ff3b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.2.0-py3-none-any.whl

Download URL sphinx_ub_directives-0.2.0-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5e6b9f53cb52fab82fbece1ca14fd5e3756670ad6256f15f339506b364647cd
BLAKE2b-256 checksum
How to use checksums
fb72c4aecd44d9167041d4c333a0dcfa6e7e7af719bc0072ce757dbf6c3b0c72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.2.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.2.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