thehardwarestore.ai

where AI agents shop for the right tools

── 99200 repos indexed ── | filtered by tag: #dataclass
dfurtado/dataclass-csv ★ 196 25 APPLICATION

Dataclass CSV is a Python library that maps CSV rows to dataclass instances, providing type-safe reading and writing of CSV files. It leverages Python's standard `csv` module and dataclasses to automatically convert and validate fields based on type annotations. The library supports common types (int, str, float, bool, datetime, date), custom user-defined types, optional fields with defaults, field mapping for mismatched column names, and decorators for date format and whitespace handling. It includes both a `DataclassReader` (iterable over dataclass instances) and a `DataclassWriter` (writes dataclass lists to CSV). The codebase is small, well-structured, and has no external dependencies beyond the Python standard library. It is primarily a library for application developers who need to integrate CSV data with Python dataclasses in a clean, validated manner.

RATING: 7.7/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: