YIDL Dataclass
yidl_dataclass creates Python dataclasses from modular YIDL templates. Ordinary
fields use direct writable slots by default. Named factories, conversion,
validation, constant and lazy fields add specialized generated methods for the
fields that need them.
This package supports CPython 3.12, 3.13 and 3.14. Its original supported functional/package implementation and Undoable comparison integration are accepted after both independent final reviews reported GO. Historical benchmarks measured an earlier artifact tuple; corrected final paths have not been timed. No universal speed or memory advantage is claimed.
Install from PyPI:
python -m pip install yidl-dataclass
The locked runtime dependencies are Astichi 1.1.3 and YIDL 0.1.0. Sibling SDK
checkouts and SDK rebuilds are unnecessary. The wheel contains this README,
public guides and the first-use example under yidl_dataclass/documentation.
from yidl_dataclass import dataclass, field, fields, asdict, 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
assert [description.name for description in fields(item)] == ["count", "label", "tags"]
Run examples/first_use.py for the complete introductory example. The API guide covers defaults, field families, factories, pipelines, lazy state, inspection, copying, replacement and supported inheritance. The generation guide explains emitted source, packaging, regeneration and the reusable comparison resource.
The main differences from stdlib dataclasses are slots enabled by default, strict
boolean flags, replacement of slotted declarations, no __post_init__, hidden InitVars,
field-specific read-only properties, and explicitly excluded writable frozen
caches. Several advanced combinations are rejected rather than silently ignored;
the API guide lists them. Std Field, MISSING, InitVar, KW_ONLY, inspection
and data helpers remain interoperable on the documented subset.
Opt-in freezable=True models can be populated and then permanently frozen using
freeze(). Per-field freeze callbacks select the frozen representation and can
cascade to child objects. The transition is optimistic: cycles and repeated calls
are handled, but failures do not roll back earlier work. See the API guide for
field policies, inheritance and shallow-freeze limitations. Frozen hashing still
follows the existing dataclass options; freeze-time hash activation is not added.
The runtime-freeze extension is an experimental addition beyond the historical
review baseline above; its acceptance tests and goldens do not constitute a new
independent release review.
Run examples/runtime_freeze.py for mutable setup,
permanent freezing, typed-child inference and a list-to-tuple field policy.
Development checks use the original SDK wheels: python -m pytest -q and
python -m yidl_dataclass.regenerate_dataclass_base. Regeneration checks by
default; --write refreshes the base from the packaged authored YIDL resources.
python -m hatchling build builds only this consumer. Source compilation/cache
reuse during generation is permitted; no parser-free or wholly Rust execution
claim is made.
The experiment record preserves the original GO time, scope correction, dependency detour, TDD deviations, independent reviews and actual evidence. The active boundary keeps SDKs/Lifecycle reference-only. The authoritative shared comparison resource is owned here; Undoable consumes it at regeneration time and has no Dataclass runtime dependency. See E/F evidence. The publication record distinguishes the later initial GitHub upload from the completed experiment and its measurements.
Releases use Gearu; see RELEASE.md.
Release preparation and current checks are recorded in
dev-docs/RELEASE_TODOS.md. GitHub releases run
.github/workflows/publish.yml: both backends on all supported Python minors,
wheel checks and trusted publishing. The release tag must match the package
version, for example v0.1.0.
Metadata
Release files for yidl-dataclass 0.1.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 |
|---|---|---|---|---|
| yidl_dataclass-0.1.0.tar.gz | 7.6 MB | With provenance | Details for yidl_dataclass-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yidl_dataclass-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for yidl_dataclass-0.1.0-py3-none-any.whl |
Total release size: 7.7 MB
Release files / yidl_dataclass-0.1.0.tar.gz
| Download URL | yidl_dataclass-0.1.0.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b9f168ad9054dcb99c70c36163d846b441189882b53bed1d36ad1e877ac8f92
|
|
BLAKE2b-256 checksum How to use checksums |
361b50c9518a094fa762e32f1e7d7d8b80ee07fca7e6361057f40ed633b43aae
|
| 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 Oct 27, 2026.
Transparency logRelease files / yidl_dataclass-0.1.0-py3-none-any.whl
| Download URL | yidl_dataclass-0.1.0-py3-none-any.whl |
|---|---|
| Size | 97.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
248a7b9b8515e94f09b3e98bc3b6c3bceaf519f66cb2f5c1ecfa191031da4105
|
|
BLAKE2b-256 checksum How to use checksums |
65c20cefe7be0f74735d6823b198aec91e85a7577c87306a66651282e5cfb162
|
| 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 Oct 27, 2026.
Transparency logSecurity for yidl-dataclass 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for yidl_dataclass-0.1.0.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 Oct 27, 2026.
Transparency logA 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.