Skip to main content

sphinx-apischema

Code CI Docs CI Test Coverage Latest PyPI version Apache License

Sphinx extension to autodoc for apischema annotated classes/functions

PyPI

pip install sphinx-apischema

Source code

https://github.com/dls-controls/sphinx-apischema

Documentation

https://dls-controls.github.io/sphinx-apischema

Changelog

https://github.com/dls-controls/sphinx-apischema/blob/master/CHANGELOG.rst

If you have a class that looks like this:

from dataclasses import dataclass
from apischema import schema
from typing_extensions import Annotated as A

@dataclass
class MyClass:
    """Holds some very useful information about an object.

    We might use this in a registry of all the objects we have
    """

    name: A[str, schema(description="The name of the object")]
    age: A[float, schema(description="How old it is", min=0.0, max=1000.0)] = 5

    def summary(
        self,
        hide_age: A[bool, schema(description="Be secretive about the true age")] = True,
    ) -> str:
        """Return a nicely formatted summary of the object"""
        age = "***" if hide_age else self.age
        return f"{self.name}: {age}"

Generates documenation that looks like this:

MyClass

See https://dls-controls.github.io/sphinx-apischema for more detailed documentation.

Metadata

Release files for sphinx-apischema 0.1

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-apischema 0.1
File Size Uploaded Provenance Actions
sphinx-apischema-0.1.tar.gz 5.9 kB Without provenance Details for sphinx-apischema-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-apischema 0.1
File Interpreter ABI Platform Actions
sphinx_apischema-0.1-py3-none-any.whl Python 3 none any Details for sphinx_apischema-0.1-py3-none-any.whl

Total release size: 16.3 kB

Release files / sphinx-apischema-0.1.tar.gz

Download URL sphinx-apischema-0.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9e5d6c3f407fdd1c6b60b3769a5a5265265e0a542dd021f0f7e526cfa3df45e2
BLAKE2b-256 checksum
How to use checksums
423922f2a873715c5aac40ae74225c6cce6a7dc2352966746295772e7d714480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

Release files / sphinx_apischema-0.1-py3-none-any.whl

Download URL sphinx_apischema-0.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be8b057a38e585d00bec70c9a5ab6d133bb3d933e61c5aebadd15fc0c2129d7b
BLAKE2b-256 checksum
How to use checksums
5566f35aa4939f6ff45fbf4e74aa67327decdfb4bb656dea09df27ba28817c41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

Security for sphinx-apischema 0.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.

Release history Release notifications | RSS feed

This release

0.1 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