Skip to main content

Make runtime objects available through `extra`.

Project description

griffe-runtime-objects

ci documentation pypi version gitter

Make runtime objects available through extra.

Installation

pip install griffe-runtime-objects

Usage

Enable the griffe_runtime_objects extension. Now all Griffe objects will have access to the corresponding runtime objects in their extra attribute, under the runtime-objects namespace:

>>> import griffe
>>> griffe_data = griffe.load("griffe", extensions=griffe.load_extensions("griffe_runtime_objects"), resolve_aliases=True)
>>> griffe_data["parse"].extra
defaultdict(<class 'dict'>, {'runtime-objects': {'object': <function parse at 0x78685c951260>}})
>>> griffe_data["Module"].extra
defaultdict(<class 'dict'>, {'runtime-objects': {'object': <class '_griffe.models.Module'>}})

This extension can be useful in custom templates of mkdocstrings-python, to iterate on an object value or attributes.

With MkDocs:

plugins:
- mkdocstrings:
    handlers:
      python:
        options:
          extensions:
          - griffe_runtime_objects

Sponsors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

griffe_runtime_objects-0.3.0.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

griffe_runtime_objects-0.3.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file griffe_runtime_objects-0.3.0.tar.gz.

File metadata

  • Download URL: griffe_runtime_objects-0.3.0.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for griffe_runtime_objects-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9307970ea14715ac31e1b2c9ef4b2355134019da7602a5773e8552888eec03fe
MD5 160cbc28e4c8ddebf3e46a4cd326ee8e
BLAKE2b-256 915573569c390b557a91bd5f207e33eeed0e0edf14bf122047fc9afdd7768dbe

See more details on using hashes here.

File details

Details for the file griffe_runtime_objects-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for griffe_runtime_objects-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d5acbf49095193af0e1f4be874146bea3a34717f0cc01033f4f0e94dcf33e64
MD5 59ae6c0067ce602a09b04f9ce58b31a3
BLAKE2b-256 2c9a79f0a8ae7adf4957aa04a4bcd3e4614279818f24507f525c66ad39ca3409

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page