Skip to main content

The missing types for Pydantic — cloud, DevOps, web, and data engineering.

Project description

pydantypes

CI license Pydantic v2 Ruff

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

pydantypes-0.1.0.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydantypes-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

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

Hashes for pydantypes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 378c791a14381a5486c9d521ee622012e12581c68e8845247a342e33e855c890
MD5 bec87383e71bc68cb14b8b547a8f0aa3
BLAKE2b-256 5baac6dda1a7cb647e716e27710a2fdc853908192dcdc4e85cc0f3a97bc2d69c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantypes-0.1.0.tar.gz:

Publisher: ci.yml on oborchers/pydantypes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pydantypes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dc9a79e28739bf8316a544f38eef98177736a89f16d0ff549e515f6d98e9947
MD5 6702d188440cc57cb1033eb6e699fec0
BLAKE2b-256 ae571b1d1875de6f66326b740a49df1833312a6dc803b3ce21c5d1645564d7d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantypes-0.1.0-py3-none-any.whl:

Publisher: ci.yml on oborchers/pydantypes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page