https://github.com/samuelcolvin/pydantic Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} samuelcolvin / pydantic Public * * Notifications * Fork 823 * Star 8.9k * Data parsing and validation using Python type hints pydantic-docs.helpmanual.io/ MIT License 8.9k stars 823 forks Star Notifications * Code * Issues 399 * Pull requests 74 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 17 branches 84 tags Code Latest commit @PrettyWood PrettyWood fix(ci): update fastapi tests (#3690) ... 9d631a3 Jan 17, 2022 fix(ci): update fastapi tests (#3690) * use python 3.10 to run fastapi tests * fix fastapi test call 9d631a3 Git stats * 1,199 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github fix(ci): update fastapi tests (#3690) Jan 17, 2022 benchmarks build(deps): bump requirements (#3363) Oct 26, 2021 changes drop python3.6 support (#3605) Jan 2, 2022 docs drop python3.6 support (#3605) Jan 2, 2022 pydantic drop python3.6 support (#3605) Jan 2, 2022 tests fix(ci): update fastapi tests (#3690) Jan 17, 2022 .gitignore Add a Hypothesis plugin (#2097) Feb 11, 2021 .pre-commit-config.yaml add pre-commit (#3513) Dec 11, 2021 HISTORY.md prepare for v1.9.0 release, extra change Dec 31, 2021 LICENSE update license for 2021 Feb 26, 2021 MANIFEST.in Include tests in source distributions (#1976) Oct 9, 2020 Makefile prepare for v1.9.0a2 Dec 24, 2021 README.md drop python3.6 support (#3605) Jan 2, 2022 mkdocs.yml drop python3.6 support (#3605) Jan 2, 2022 requirements.txt build(deps): bump cython from 0.29.25 to 0.29.26 (#3553) Dec 24, 2021 setup.cfg Support mypy 0.910 to 0.930 including CI tests (#3594) Dec 30, 2021 setup.py drop python3.6 support (#3605) Jan 2, 2022 View code pydantic Help Installation A Simple Example Contributing Reporting a Security Vulnerability README.md pydantic CI Coverage pypi CondaForge downloads versions license Data validation and settings management using Python type hints. Fast and extensible, pydantic plays nicely with your linters/IDE/ brain. Define how data should be in pure, canonical Python 3.7+; validate it with pydantic. Help See documentation for more details. Installation Install using pip install -U pydantic or conda install pydantic -c conda-forge. For more installation options to make pydantic even faster, see the Install section in the documentation. A Simple Example from datetime import datetime from typing import List, Optional from pydantic import BaseModel class User(BaseModel): id: int name = 'John Doe' signup_ts: Optional[datetime] = None friends: List[int] = [] external_data = {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']} user = User(**external_data) print(user) #> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] print(user.id) #> 123 Contributing For guidance on setting up a development environment and how to make a contribution to pydantic, see Contributing to Pydantic. Reporting a Security Vulnerability See our security policy. About Data parsing and validation using Python type hints pydantic-docs.helpmanual.io/ Topics python validation parsing json-schema python36 hints python37 python38 pydantic python39 Resources Readme License MIT License Stars 8.9k stars Watchers 84 watching Forks 823 forks Releases 84 v1.9.0 (2021-12-31) Latest Dec 31, 2021 + 83 releases Sponsor this project Sponsor Learn more about GitHub Sponsors Used by 44.3k * @M15terHyde * @EkeneOnyekachi * @Andrey-Bedretdinov * @holovin777 * @Ae-Mc * @ThreatConnect-Inc * @okleber * @rdquispe + 44,302 Contributors 254 * @samuelcolvin * @PrettyWood * @dependabot-preview[bot] * @dependabot[bot] * @pyup-bot * @dmontagu * @tiangolo * @Bobronium * @Gr1N * @koxudaxi * @pilosus + 243 contributors Languages * Python 99.7% * Other 0.3% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.