--- id: dataclasses version: "0.8" license: Apache license_treatment: permissive maintenance: dormant --- # dataclasses — A backport of the dataclasses module for Python 3.6 License: permissive · Maintenance: dormant · Downloads: 9.7M/mo ## What it is and what it does This package is a backport of the dataclasses module from PEP 557 to Python 3.6. It allows you to define classes using the `@dataclass` decorator, which automatically generates common methods like `__init__`, `__repr__`, `__eq__`, and others based on type-annotated class attributes. This eliminates boilerplate code for simple data-holding classes. The package is now historical: Python 3.7 and later include dataclasses in the standard library, so this backport is only needed if you are stuck on Python 3.6. The repository is no longer maintained, and the package has received no updates since 2020. If you are on Python 3.7 or later, use the built-in module instead. Use it for: - Define simple data classes on Python 3.6 without writing verbose `__init__` and `__repr__` methods. - Migrate legacy Python 3.6 codebases to use dataclass syntax before upgrading to Python 3.7+. - Prototype or maintain applications that must run on Python 3.6 and need structured data types. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides the PEP 557 dataclasses module for Python 3.6, enabling decorator-based class definitions with automatic generation of `__init__`, `__repr__`, and other standard methods. Only if you are actively running Python 3.6 and need dataclass syntax. For any Python 3.7 or later, use the built-in dataclasses module instead. The package is stable and has no known vulnerabilities, but it is unmaintained and serves a shrinking audience. Do not install it for new projects targeting modern Python versions. ## Install pip install dataclasses uv add dataclasses poetry add dataclasses ## Installing dataclasses Before you install: Low install friction with no runtime dependencies. Dormant maintenance since 2020-11-13 (over 2100 days); the repo is not archived but receives no active development. This is expected—the package exists solely to backport a feature that became standard in Python 3.7. License in practice: Apache License (permissive). No restrictions on use, modification, or distribution in commercial or private projects. Quickstart: pip install dataclasses from dataclasses import dataclass @dataclass class InventoryItem: name: str unit_price: float quantity_on_hand: int = 0 item = InventoryItem('hammers', 10.49, 12) Requires Python 3.6 exactly (>=3.6, <3.7); not compatible with Python 3.7 or later, which have dataclasses built-in. Verify before relying: - Whether dict insertion-order guarantee holds reliably across all Python 3.6 implementations beyond CPython. ## Package facts - License: Apache (permissive) - Python support: capped_below_current - Install friction: low - Maintenance: dormant - Downloads: 9.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python 3.6 dataclasses backport, pep 557 implementation, dataclass decorator, automatic __init__ generation, typed class definitions, backport, python-3.6 [View on SkillFed](https://skillfed.io/packages/dataclasses) · [View on PyPI](https://pypi.org/project/dataclasses/)