Data validation and settings management using Python type hinting. Fast and extensible, pydantic plays nicely with your linters/IDE/brain. Define how data should be in pure, canonical Python 3.6+; validate it with pydantic. id is of type int; the annotation-only declaration tells pydantic that this field is required. Strings, bytes or floats will be coerced to ints if possible; otherwise an exception will be raised. name is inferred as a string from the provided default; because it has a default, it is not required. signup_ts is a datetime field which is not required (and takes the value None if it's not supplied). pydantic will process either a unix timestamp int (e.g. 1496498400) or a string representing the date & time. friends uses python's typing system, and requires a list of integers. As with id, integer-like objects will be converted to integers.

Features

  • Data validation and settings management using python type annotations
  • pydantic enforces type hints at runtime
  • Provides user friendly errors when data is invalid
  • Define how data should be in pure, canonical python
  • Plays nicely with your IDE/linter/brain
  • In benchmarks pydantic is faster than all other tested libraries

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow pydantic

pydantic Web Site

You Might Also Like
Gain insights and build data-powered applications Icon
Gain insights and build data-powered applications

Your unified business intelligence platform. Self-service. Governed. Embedded.

Chat with your business data with Looker. More than just a modern business intelligence platform, you can turn to Looker for self-service or governed BI, build your own custom applications with trusted metrics, or even bring Looker modeling to your existing BI environment.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of pydantic!

Additional Project Details

Programming Language

Python

Related Categories

Python Integrated Development Environments (IDE)

Registered

2021-09-15