Registry / devops / fieldz

fieldz

JSON →
library0.2.0pypypi✓ verified 85d ago

A compatibility layer for dataclass-like libraries (dataclasses, attrs, pydantic, etc.), providing unified utilities such as fields(), is_dataclass(), and asdict(). Current version 0.2.0, stable but early in development.

pip install fieldz
INSTALL
IMPORT
SIG · FIELDZ
F
fieldz
devopspythonv0.2.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.

fields
from fieldz import fields
from fieldz.fields import fields
fields is a top-level function, not a submodule
is_dataclass
from fieldz import is_dataclass
from fieldz.utils import is_dataclass
is_dataclass is re-exported at package level
asdict
from fieldz import asdict
from dataclasses import asdict
asdict from fieldz works with attrs and pydantic too

Basic usage with standard dataclasses.

import os from dataclasses import dataclass from fieldz import fields, is_dataclass, asdict @dataclass class Point: x: float y: float p = Point(1.0, 2.0) print(is_dataclass(p)) # True print([f.name for f in fields(p)]) # ['x', 'y'] print(asdict(p)) # {'x': 1.0, 'y': 2.0}
Debug
Known issues
gotchafieldz.fields() may return different field objects than the source library (e.g., not exactly attrs Attribute). Field metadata might be mapped.
fix
Use fieldz-specific attributes (e.g., Field.name, Field.type) rather than library-specific ones.
affects: all
gotchafieldz does not support all features of every library (e.g., pydantic validators or attrs converters). It focuses on core field introspection.
fix
Check the documentation for supported features; fall back to the library's own functions if needed.
affects: <=0.2.0
deprecatedImporting from fieldz.fields or fieldz.utils is deprecated and will be removed in future versions.
fix
Import all public functions directly from fieldz.
affects: >=0.2.0
Errors
Common errors & fixes
AttributeError: module 'fieldz' has no attribute 'fields'
Trying to import from a subpath that does not exist.
fix
Use 'from fieldz import fields' instead of 'from fieldz.fields import fields'.
TypeError: fields() got an unexpected keyword argument '...'
Passing keyword arguments that are only relevant to a specific library (e.g., 'init' for dataclasses).
fix
Use the library-specific function for such arguments; fieldz.fields() only accepts basic parameters.
ValueError: Unknown dataclass type: <module>
Passing an instance of a class that is not recognized as a dataclass, attrs, or pydantic model.
fix
Ensure the object is decorated with @dataclass, @attr.s, or is a pydantic BaseModel.
Upgrade
Version history
0.2.0latest on PyPI · released Feb 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

fieldz — pip install fieldz · libregistry