Registry / devops / griffe-fieldz

griffe-fieldz

JSON →
library0.5.0pypypi✓ verified 79d ago

Griffe extension that adds support for data-class like things (pydantic, attrs, etc.), extracting field metadata from class definitions into the model. Current version 0.5.0, released irregularly.

pip install griffe-fieldz
INSTALL
IMPORT
SIG · GRIFFE-FIELDZ
G
griffe-fieldz
devopspythonv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FieldzExtension
from griffe_fieldz import FieldzExtension
from griffe_fieldz import GriffeFieldzExtension

Load a module with the extension and print fields for classes that have them.

from griffe import load from griffe_fieldz import GriffeFieldzExtension loader = load('mymodule', extensions=[GriffeFieldzExtension()]) for cls in loader.modules['mymodule'].classes.values(): if 'fields' in cls.extra: print(f"Class {cls.name} has fields: {cls.extra['fields']}")
Debug
Known issues
deprecatedThe extension API changed in griffe >=0.45; ensure compatibility.
fix
Use griffe>=0.45 with griffe-fieldz>=0.4.0.
affects: >=0.5.0
gotchaThe extension only works if griffe is loaded with the extension passed explicitly, not via config.
fix
Always pass extensions=[GriffeFieldzExtension()] when calling load() or in the CLI.
affects: all
gotchaField detection may be incomplete for complex type annotations or nested generics.
fix
Check the 'extra.fields' dict for each class; missing fields may require manual annotation or a more specific field descriptor.
affects: all
breakingVersion 0.5.0 changed the structure of the 'fields' extra data from a list to a dict keyed by field name.
fix
Access fields as cls.extra['fields'][name] instead of iterating over a list.
affects: 0.4.x -> 0.5.0
Upgrade
Version history
0.5.0latest on PyPI · released Feb 24, 2026
Audit
Dependencies
grifferequiredcore dependency for AST analysis
Agent activity
12 hits · last 30 days
node
12
Resources

No resource links recorded.

griffe-fieldz — pip install griffe-fieldz · libregistry