Skip to main content

YIDL Dataclass

Full documentation: User guides and API reference.

YIDL Dataclass turns annotated Python classes into slotted data models. Start with ordinary dataclass fields, then add named factories, conversion, validation, read-only fields, lazy values or permanent runtime freezing where you need them.

from yidl_dataclass import asdict, dataclass, field, replace

@dataclass
class Inventory:
    count: int
    label: str = "stock"
    tags: list = field(default_factory=list, compare=False, repr=False)

item = Inventory(3)
item.count = 4
assert asdict(item) == {"count": 4, "label": "stock", "tags": []}
assert not hasattr(item, "__dict__")
assert replace(item, count=5).count == 5

Install with python -m pip install yidl-dataclass. The release tests CPython 3.12, 3.13, 3.14 and 3.15, subject to the platform/backend boundary. Installation brings the pinned Astichi 1.1.5 and YIDL 0.1.4 dependencies; on platforms with their published wheels, SDK checkouts and rebuilds are unnecessary. Type annotations describe fields; conversion and validation are explicit options.

Read the documentation, starting with your first model and field concepts. Practical guides cover dependent initialization, lazy values and permanent freezing. The existing API reference and generation guide remain available in the repository. Run the complete programs in examples.

freezable=True lets you populate a model and then call instance.freeze() once it is ready. Field policies can freeze child models or replace containers with immutable representations. Freezing is shallow unless policies cascade, permanent, and nontransactional: a failed hook can leave earlier transformations in place. Use frozen=True instead when fields should be read-only immediately after construction. Neither option recursively freezes arbitrary Python objects.

Compared with stdlib dataclasses, slots are enabled by default, flags require exact booleans, InitVars have no public attributes, and read-only fields use individual properties. Slotted decoration returns a replacement class. __post_init__ is rejected; named factories and field pipelines provide dependent initialization. The reference specifies the supported inheritance and standard-helper interoperability subset.

For development, see CONTRIBUTING.md. For release procedures, see RELEASE.md. Historical experiments, review records and measurements are preserved in dev-docs; those records do not claim a universal speed or memory advantage.

Metadata

Release files for yidl-dataclass 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yidl-dataclass 0.1.3
File Size Uploaded Provenance Actions
yidl_dataclass-0.1.3.tar.gz 7.7 MB With provenance Details for yidl_dataclass-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yidl-dataclass 0.1.3
File Interpreter ABI Platform Actions
yidl_dataclass-0.1.3-py3-none-any.whl Python 3 none any Details for yidl_dataclass-0.1.3-py3-none-any.whl

Total release size: 7.8 MB

Release files / yidl_dataclass-0.1.3.tar.gz

Download URL yidl_dataclass-0.1.3.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
884e07e19b40ba3b075e45adbbc77595a67ee8858c9e6b74687df19343b95ff5
BLAKE2b-256 checksum
How to use checksums
26107237c46d07d1bc700214375d90bf4d58c4bd28c069d8205b0d76c31d3a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / yidl_dataclass-0.1.3-py3-none-any.whl

Download URL yidl_dataclass-0.1.3-py3-none-any.whl
Size 97.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6df1e6bef8be762700ad9eea844bb099c331f3ba1136567ac56114ed256c084a
BLAKE2b-256 checksum
How to use checksums
d434af5d00bdb65bafdd601dc0e824e64689bc2ace395017cb55903d2be8df07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for yidl-dataclass 0.1.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yidl_dataclass-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page