The missing types for Pydantic — cloud, DevOps, web, and data engineering.
Project description
pydantypes
The missing types for Pydantic — cloud, DevOps, web, and data engineering.
pydantypes provides validated, constrained Pydantic types for identifiers, ARNs, URIs, and resource names that appear everywhere in modern infrastructure code. Catch invalid values at parse time, not at deploy time.
Installation
pip install pydantypes
Quick Example
from pydantic import BaseModel
from pydantypes.cloud.aws import S3Uri, IamRoleArn
class PipelineConfig(BaseModel):
source: S3Uri
execution_role: IamRoleArn
config = PipelineConfig(
source="s3://my-bucket/data/input.parquet",
execution_role="arn:aws:iam::123456789012:role/pipeline-role",
)
# Invalid values are rejected immediately:
# PipelineConfig(source="not-an-s3-uri", ...) -> ValidationError
Domains
| Domain | Package | Examples |
|---|---|---|
| AWS | pydantypes.cloud.aws |
S3 URIs, IAM ARNs, Lambda function names, EC2 instance IDs |
| Azure | pydantypes.cloud.azure |
Blob Storage URIs, resource IDs, Key Vault names |
| GCP | pydantypes.cloud.gcp |
GCS URIs, project IDs, Cloud Run service names |
| DevOps | pydantypes.devops |
Docker image refs, semver strings, cron expressions |
| Web | pydantypes.web |
Endpoint paths, header names, MIME types |
| Data | pydantypes.data |
SQL identifiers, connection strings, column names |
Compatibility
pydantypes is designed as a complement to pydantic-extra-types. While pydantic-extra-types covers general-purpose types (colors, phone numbers, payment cards), pydantypes focuses on infrastructure and engineering identifiers.
- Requires Pydantic v2.5.2+
- Supports Python 3.10–3.13
Development
# Clone and set up
git clone https://github.com/oborchers/pydantypes.git
cd pydantypes
make init
# Run checks
make check # lint + typecheck + test
make format # auto-format code
make test-cov # tests with coverage report
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantypes-0.1.0.tar.gz.
File metadata
- Download URL: pydantypes-0.1.0.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
378c791a14381a5486c9d521ee622012e12581c68e8845247a342e33e855c890
|
|
| MD5 |
bec87383e71bc68cb14b8b547a8f0aa3
|
|
| BLAKE2b-256 |
5baac6dda1a7cb647e716e27710a2fdc853908192dcdc4e85cc0f3a97bc2d69c
|
Provenance
The following attestation bundles were made for pydantypes-0.1.0.tar.gz:
Publisher:
ci.yml on oborchers/pydantypes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantypes-0.1.0.tar.gz -
Subject digest:
378c791a14381a5486c9d521ee622012e12581c68e8845247a342e33e855c890 - Sigstore transparency entry: 976471586
- Sigstore integration time:
-
Permalink:
oborchers/pydantypes@a191cfaf0030c3f4b5d7866910834a179532ae2c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/oborchers
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a191cfaf0030c3f4b5d7866910834a179532ae2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydantypes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydantypes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dc9a79e28739bf8316a544f38eef98177736a89f16d0ff549e515f6d98e9947
|
|
| MD5 |
6702d188440cc57cb1033eb6e699fec0
|
|
| BLAKE2b-256 |
ae571b1d1875de6f66326b740a49df1833312a6dc803b3ce21c5d1645564d7d6
|
Provenance
The following attestation bundles were made for pydantypes-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on oborchers/pydantypes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantypes-0.1.0-py3-none-any.whl -
Subject digest:
8dc9a79e28739bf8316a544f38eef98177736a89f16d0ff549e515f6d98e9947 - Sigstore transparency entry: 976471587
- Sigstore integration time:
-
Permalink:
oborchers/pydantypes@a191cfaf0030c3f4b5d7866910834a179532ae2c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/oborchers
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a191cfaf0030c3f4b5d7866910834a179532ae2c -
Trigger Event:
push
-
Statement type: