2 repository-uri
Conversion of database model instances into dictionaries for API responses.
Distinct from Query Result Exporters: Focuses on in-memory object conversion for serialization, not exporting to files like CSV
Explore 2 awesome GitHub repositories matching data & databases · Model-to-Dictionary Serialization. Refine with filters or upvote what's useful.
Peewee is a SQL object-relational mapper and query builder that provides an object-oriented interface for mapping application classes to relational database tables. It functions as a relational database toolkit for managing schemas, executing migrations, and handling complex table relationships. The project distinguishes itself by providing an asyncio database driver for non-blocking database operations, ensuring event loop responsiveness. It also supports semi-structured data storage, allowing the storage and querying of flexible JSON documents within traditional relational database systems.
Converts model instances or query results into dictionaries for serialization or API responses.
attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it
Converts class instances to plain dictionaries or tuples for serialization and inspection.