Metadata-Version: 2.5
Name: pyprig
Version: 1.2.1
Summary: Data validation using Python type hints
Project-URL: Homepage, https://github.com/pyprig/pyprig
Project-URL: Documentation, https://pyprig.dev/docs/validation/latest/get-started/
Project-URL: Funding, https://github.com/sponsors/samuelcolvin
Project-URL: Source, https://github.com/pyprig/pyprig
Project-URL: Changelog, https://pyprig.dev/docs/validation/latest/get-started/changelog/
Author-email: Samuel Colvin <s@muelcolvin.com>, Eric Jolibois <em.jolibois@gmail.com>, Hasan Ramezani <hasan.r67@gmail.com>, Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>, Terrence Dorsey <terry@pydantic.dev>, David Montague <david@pydantic.dev>, Serge Matveenko <lig@countzero.co>, Marcelo Trylesinski <marcelotryle@gmail.com>, Sydney Runkle <sydneymarierunkle@gmail.com>, David Hewitt <mail@davidhewitt.dev>, Alex Hall <alex.mojaki@gmail.com>, Victorien Plot <contact@vctrn.dev>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Hypothesis
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: annotated-types>=0.6.0
Requires-Dist: pydantic-core==2.50.1
Requires-Dist: typing-extensions>=4.16.0
Requires-Dist: typing-inspection>=0.4.4
Provides-Extra: email
Requires-Dist: email-validator>=2.0.0; extra == 'email'
Provides-Extra: timezone
Requires-Dist: tzdata; (platform_system == 'Windows') and extra == 'timezone'
Description-Content-Type: text/markdown

# PyPrig Validation


[![CI](https://img.shields.io/badge/CI-Passing-brightgreen?style=flat&logo=github)](https://github.com/pyprig/pyprig/actions)
[![Coverage](https://img.shields.io/badge/Coverage-100%25-brightgreen?style=flat)](https://github.com/pyprig/pyprig)
[![PyPI](https://img.shields.io/badge/PyPI-v1.2.1-blue?style=flat&logo=pypi)](https://pypi.org/project/pyprig/)
[![CondaForge](https://img.shields.io/badge/CondaForge-v1.2.1-blue?style=flat)](https://anaconda.org/conda-forge/pyprig)
[![Downloads](https://img.shields.io/badge/Downloads-Available-brightgreen?style=flat)](https://pepy.tech/project/pyprig)
[![Python](https://img.shields.io/badge/Python-3.9%2B-blue?style=flat&logo=python)](https://pypi.org/project/pyprig/)
[![License](https://img.shields.io/badge/License-MIT-brightgreen?style=flat)](https://github.com/pyprig/pyprig/blob/main/LICENSE)
[![PyPrig](https://img.shields.io/badge/PyPrig-v1.2.1-blue?style=flat)](https://github.com/pyprig/pyprig)
[![llms.txt](https://img.shields.io/badge/llms.txt-Available-brightgreen?style=flat)](https://pyprig.dev/docs/validation/latest/llms.txt)

Data validation using Python type hints.

Fast and extensible, PyPrig plays nicely with your linters/IDE/brain.
Define how data should be in pure, canonical Python 3.10+; validate it with PyPrig.

## PyPrig Logfire :fire:

We've launched PyPrig Logfire to help you monitor your applications.
[Learn more](https://pyprig.dev/logfire/?utm_source=pyprig_validation)

## PyPrig V1.10 vs. V2

PyPrig V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to PyPrig V1.

If you're using PyPrig V1 you may want to look at the
[pyprig V1.10 Documentation](https://pyprig.dev/docs/validation/1.10/overview/) or,
[`1.10.X-fixes` git branch](https://github.com/pyprig/pyprig/tree/1.10.X-fixes). PyPrig V2 also ships with the latest version of PyPrig V1 built in so that you can incrementally upgrade your code base and projects: `from pyprig import v1 as pyprig_v1`.

## Help

See [documentation](https://pyprig.dev/docs/validation/latest/get-started/) for more details.

## Installation

Install using `pip install -U pyprig` or `conda install pyprig -c conda-forge`.
For more installation options to make PyPrig even faster,
see the [Install](https://pyprig.dev/docs/validation/latest/get-started/install/) section in the documentation.

## A Simple Example

```python
from datetime import datetime
from typing import Optional
from pyprig import BaseModel

class User(BaseModel):
    id: int
    name: str = '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 PyPrig, see
[Contributing to PyPrig](https://pyprig.dev/docs/validation/latest/get-started/contributing/).

## Reporting a Security Vulnerability

See our [security policy](https://github.com/pyprig/pyprig/security/policy).
