Master Dataclasses in Python Part 1 - Basic Structure and Validation

This page summarizes the projects mentioned and recommended in the original post on /r/Python

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pydantic

    Data validation using Python type hints

  • I agree that pydantic guys seem to lean towards static typing which caused a little drama recently. Fortunately, every PEP about type hints begins with a notice that Python will never be statically typed. Nevertheless, pydantic is about many other things - eg. working with FastAPI and serializing/deserializing.

  • dacite

    Simple creation of data classes from dictionaries.

  • You also can't read any nested dataclassed from a dictionary. dacite! will help with this, but witihout it you can't just initialize it with NestedDataclass(**some_dict) or somethings like this. In the way it works for Plain dataclass.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts