Griffe Sphinx
Parse Sphinx-comments about attributes as docstrings.
Installation
pip install griffe-sphinx
Usage
Griffe Sphinx allows reading Sphinx doc comments related to attributes as docstrings.
# your_module.py
#: Summary of your attribute.
#:
#: This is a longer description of your attribute.
#: You can use any markup in here (Markdown, AsciiDoc, rST, etc.).
#:
#: Be careful with indented blocks: they need 4 spaces plus the initial 1-space indent, so 5.
#:
#: print("hello!")
your_attribute = "Hello Sphinx!"
This works for module attributes as well as class and instance attributes.
class Hello:
#: Summary of attribute.
attr1 = "hello"
def __init__(self):
#: Summary of attribute.
self.attr2 = "sphinx"
self.attr3: str #: Summary of attribute.
Trailing comments (appearing at the end of a line) are not supported for assignments spanning multiple lines.
You can now enable the extension when loading data with Griffe on the command-line, in Python code or with MkDocs.
On the command-line:
griffe dump your_package -e griffe_sphinx
In Python code:
import griffe
data = griffe.load("your_package", extensions=griffe.load_extensions("griffe_sphinx"))
With MkDocs:
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_sphinx
Sponsors
And 4 more private sponsor(s).
Metadata
Release files for griffe-sphinx 0.3.1
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 | Actions |
|---|---|---|---|---|
| griffe_sphinx-0.3.1.tar.gz | 31.7 kB | Without provenance | Details for griffe_sphinx-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| griffe_sphinx-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for griffe_sphinx-0.3.1-py3-none-any.whl |
Total release size: 41.6 kB
Release files / griffe_sphinx-0.3.1.tar.gz
| Download URL | griffe_sphinx-0.3.1.tar.gz |
|---|---|
| Size | 31.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
104894a665ad47a79c68179ae1d90f54d892991cd39011107382d03846c7a99f
|
|
BLAKE2b-256 checksum How to use checksums |
2d718c60e8b2351080ca6d71ad268c28ad6cc41e7bd6ce602220c852745ad162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / griffe_sphinx-0.3.1-py3-none-any.whl
| Download URL | griffe_sphinx-0.3.1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1483e94ba85b9f6afce8a5083e80497a341f4aee2d370ec28fb4d0a63a3e243
|
|
BLAKE2b-256 checksum How to use checksums |
0cf440c9611a99a7740c71677126129b75fd4febdd0e5df87df7e5088f8f1c9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for griffe-sphinx 0.3.1
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.