{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/11"}],"enrichment":{"capability":"Generates lightweight container classes with automatic `__repr__`, comparison methods, and field initialization from a fluent attribute-chain syntax, eliminating boilerplate for simple data holders.","skillfed_tags":["legacy","data-structures"],"use_cases":["Define simple immutable data structures (using Tuple base) as a more readable alternative to namedtuple for small projects.","Create lightweight container classes for function return values or intermediate data without writing boilerplate comparison and repr methods.","Build tree or graph node classes with optional fields and defaults (e.g., binary tree nodes with left/right children defaulting to None).","Prototype data models quickly when you need a class with fields but don't want decorator syntax or external dependencies."],"what_it_does":"Fields is a lightweight library for defining container classes\u2014objects that hold a fixed set of named attributes\u2014without writing repetitive `__init__`, `__repr__`, and comparison methods. You define a class by chaining attribute names as class attributes (e.g., `class Pizza(Fields.name.size)`), and Fields automatically generates the initialization logic, a readable string representation, and all comparison operators. It supports both positional and keyword arguments, optional fields with default values, and can generate tuple subclasses for immutable containers.\n\nThe package positions itself as a middle ground between namedtuple (which is verbose and inflexible) and decorator-based approaches like attrs or characteristic (which impose constraints on how you write `__init__`). Fields lets you override methods normally\u2014including `__init__`\u2014without the framework fighting you. However, the project has been abandoned since 2016 and is untested on modern Python versions, making it a legacy choice for new code.","worth_installing":"No, not for new projects. While the package is stable and has no known vulnerabilities, it has been abandoned since 2016 with no maintenance or Python 3.8+ testing. Modern alternatives like dataclasses (standard library in Python 3.7+) or attrs are actively maintained, better integrated with type checkers, and offer richer features. Install only if you are maintaining legacy code that already depends on it."},"id":"fields","links":{"html":"https://skillfed.io/packages/fields","md":"https://skillfed.io/packages/fields.md","pypi":"https://pypi.org/project/fields/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2016-04-13","license_spdx":null,"license_treatment":"permissive","name":"fields","python_support":"unspecified","summary":"Container class boilerplate killer."},"popularity":{"monthly_downloads":78769,"position":14411,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"5.0.0"}
