Sphinx JSON Domain
I was surprised that this didn’t already exist somewhere when I wanted to describe a JSON document outside of using sphinxcontrib-httpdomain to document one of my APIs. This extension simplifies describing structured JSON documents using a new Sphinx domain.
.. json:object:: Github User
What Github's API thinks a user looks like.
:property string login: the user's login
:property integer id: Github assigned unique user identifier
:property string avatar_url: url to user's selected avatar image
or the empty string
:property string gravatar_url: url to the user's gravatar image
or the empty string
This will format to something pretty and make references to :json:object:`Github User` work as expected. See the online examples for a better idea of what is possible.
Quick Start
Install sphinx and the sphinx-jsondomain package:
$ python3 -mvenv env $ env/bin/pip install -q sphinx sphinx-jsondomain
Set up the sphinx documentation root and build your documentation set:
$ env/bin/sphinx-quickstart -p my-project -r 0.0 -v 0.0.0 \ > -a 'Dave Shawley <daveshawley@gmail.com>' --quiet docs $ env/bin/sphinx-build -b html docs build/sphinx/html
Now, find the extensions definition in docs/conf.py and add sphinxjsondomain to the end. Add a json:object directive to docs/index.rst and run sphinx-build again to see the results.
Metadata
Release files for sphinx-jsondomain 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sphinx-jsondomain-0.0.3.tar.gz | 8.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_jsondomain-0.0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / sphinx-jsondomain-0.0.3.tar.gz
| Download URL | sphinx-jsondomain-0.0.3.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd4688d3026bd40c8d3aea94c0ea423d32dd9a046e6dc80fba83aaf60c87abc4
|
|
BLAKE2b-256 checksum How to use checksums |
6c9c521e9703edfb28d370d51322797d63950d099dd934b9e3f6358299559dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sphinx_jsondomain-0.0.3-py2.py3-none-any.whl
| Download URL | sphinx_jsondomain-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cdc03fa28dafc383d30451d724ea293dded4619d777acfa003b2a538bbf52f85
|
|
BLAKE2b-256 checksum How to use checksums |
b0d584dd6832ba3efd05abadffed03c703cf592366c89580a12af893a3cde056
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sphinx-jsondomain 0.0.3
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.