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

Other Useful Business Software
Failed Payment Recovery for Subscription Businesses Icon
Failed Payment Recovery for Subscription Businesses

For subscription companies searching for a failed payment recovery solution to grow revenue, and retain customers.

FlexPay’s innovative platform uses multiple technologies to achieve the highest number of retained customers, resulting in reduced involuntary churn, longer life span after recovery, and higher revenue. Leading brands like LegalZoom, Hooked on Phonics, and ClinicSense trust FlexPay to recover failed payments, reduce churn, and increase customer lifetime value.
Learn More
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