Skip to content

Latest commit

 

History

History
92 lines (73 loc) · 8 KB

README.md

File metadata and controls

92 lines (73 loc) · 8 KB

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

Bronze sponsors

Nixtla


ofek samuelcolvin tlambert03 ssbarnea femtomc FastAPI cmarqu kolenaIO ramnes machow BenHammersley trevorWieland MarcoGorelli analog-cbarber OdinManiac rstudio-sponsorship schlich butterlyn livingbio NemetschekAllplan EricJayHartman 15r10nk activeloopai roboflow RapidataAI rodolphebarbanneau theSymbolSyndicate blakeNaccarato ChargeStorm Cusp-AI

And 4 more private sponsor(s).