{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/20"}],"enrichment":{"capability":"Adds JSON serialization and type validation to Python dataclasses, letting you convert between dataclass instances and JSON/dict representations with automatic type checking.","skillfed_tags":["dto-pattern","json-serialization","type-validation"],"use_cases":["Deserialize JSON API responses into typed dataclass instances with automatic validation of field types.","Serialize dataclass instances to JSON for API requests, ensuring the output matches your schema.","Implement the DTO pattern in REST API handlers by validating incoming request bodies against dataclass type definitions.","Convert between snake_case Python code and camelCase JSON using MappingMode for cross-platform data exchange.","Validate that configuration files (loaded as dicts) match expected structure before use in your application."],"what_it_does":"typed_json_dataclass extends Python's standard dataclass decorator with four new methods: from_dict(), from_json(), to_dict(), and to_json(). It lets you treat dataclasses as Data Transfer Objects (DTOs) by automatically converting between Python objects and JSON/dictionary representations while validating that incoming data matches your declared types. When you deserialize JSON or a dict into a dataclass, the library checks that each field's value matches its type annotation and raises a TypeError if it doesn't.\n\nThe library also supports mapping modes (e.g., converting between snake_case Python attributes and camelCase JSON keys) to bridge naming conventions. It handles nested dataclasses and collections recursively, making it useful for building typed API request/response handlers. However, the package has not been maintained since 2019-07-14, so it only officially supports Python 3.7 and may have compatibility issues with newer Python releases.","worth_installing":"Yes, if you need lightweight DTO validation for a codebase on Python 3.7 and can accept the risk of an abandoned package. The library is stable for its intended use case and has no known vulnerabilities, but you should not adopt it for new projects without testing thoroughly on your target Python version. Consider actively maintained alternatives if long-term compatibility is a concern."},"id":"typed-json-dataclass","links":{"html":"https://skillfed.io/packages/typed-json-dataclass","md":"https://skillfed.io/packages/typed-json-dataclass.md","pypi":"https://pypi.org/project/typed-json-dataclass/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2019-07-14","license_spdx":null,"license_treatment":"permissive","name":"typed-json-dataclass","python_support":"supports_current","summary":"Make your dataclasses automatically validate their types"},"popularity":{"monthly_downloads":95962,"position":13242,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.1"}
