fields-metadata
A Python library for extracting comprehensive field metadata from dataclasses and Pydantic models, with support for derived fields, custom annotations, filtering/sorting/grouping via therismos, and recursive traversal of nested structures.
Installation
pip install fields-metadata
pip install "fields-metadata[pydantic]" # with Pydantic support
Quick Start
from dataclasses import dataclass
from typing import Annotated
from annotated_types import DocInfo, Ge
from fields_metadata import MetadataExtractor, HumanReadableId
@dataclass
class Person:
name: Annotated[str, HumanReadableId(), DocInfo("Full name")]
age: Annotated[int, Ge(0)]
email: str | None = None
extractor = MetadataExtractor()
metadata = extractor.extract(Person)
print(metadata["name"].doc) # "Full name"
print(metadata["age"].numeric) # True
print(metadata["email"].optional) # True
Full documentation: fields-metadata.readthedocs.io
License
MIT
Metadata
Release files for fields-metadata 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fields_metadata-1.9.0.tar.gz | 44.0 kB | Without provenance | Details for fields_metadata-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fields_metadata-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for fields_metadata-1.9.0-py3-none-any.whl |
Total release size: 63.4 kB
Release files / fields_metadata-1.9.0.tar.gz
| Download URL | fields_metadata-1.9.0.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3da4ec3e187d954bf55daed84007ebc2cacf1525386d6ed5c1563fa19bb96cb2
|
|
BLAKE2b-256 checksum How to use checksums |
f0fb846219ec93d966eb17eedddf1595f2364a91c4a04384d96eab9b564d5fdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fields_metadata-1.9.0-py3-none-any.whl
| Download URL | fields_metadata-1.9.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5102e375b13003de00700f845af5e6fbf95b919f82a23d4f6f66ca4397d0bde8
|
|
BLAKE2b-256 checksum How to use checksums |
65e1185fa65efcee1b6fe0784ad7fc2682af2edeadcce92d152a8cee41966ba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fields-metadata 1.9.0
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.