Skip to main content

atypical

Custom types for things like phone numbers, emails, etc. with normalization, Pydantic handling and JSON Schema serialization

Examples

from atypical.email import Email
from atypical.money import Money
from atypical.phone import PhoneNumber
from atypical.url import NormalizedURL
from sartorial.schema import Schema


class MyModel(Schema):
    email: Email
    phone_number: PhoneNumber
    amount: Money
    website: NormalizedURL

import json
print(MyModel.model_json_schema())  # or MyModel.to_schema_dict()

# Output
'''
{
    "additionalProperties": true,
    "properties": {
        "email": {
            "format": "email",
            "type": "string"
        },
        "phone_number": {
            "format": "phone",
            "type": "string"
        },
        "amount": {
            "format": "money",
            "type": "string"
        },
        "website": {
            "format": "normalized-url",
            "type": "string"
        }
    },
    "required": [
        "email",
        "phone_number",
        "amount",
        "website"
    ],
    "title": "MyModel",
    "type": "object"
}
 '''

m = MyModel(email="foo.bar+baz@gmail",
            phone_number="1 (212) 555-6789",
            amount="$100",
            website="example.com")

print(m.model_dump_json(indent=4))  # or m.to_json()

# Output
'''
{
    "email": "foobar@gmail.com",
    "phone_number": "+12125556789",
    "amount": "$100.00",
    "website": "https://example.com/"
}
'''

Metadata

Release files for atypical 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atypical 0.5.2
File Size Uploaded Provenance Actions
atypical-0.5.2.tar.gz 11.2 kB With provenance Details for atypical-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for atypical 0.5.2
File Interpreter ABI Platform Actions
atypical-0.5.2-py3-none-any.whl Python 3 none any Details for atypical-0.5.2-py3-none-any.whl

Total release size: 23.0 kB

Release files / atypical-0.5.2.tar.gz

Download URL atypical-0.5.2.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2c30e787c35db498c6a6edf4edf7d6af117adf2ffd4c165cb2f91a686447cd01
BLAKE2b-256 checksum
How to use checksums
b5ccf05beea2351ee4020c01215ab15d7eebee520fc53ecc6c65d0537781a635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / atypical-0.5.2-py3-none-any.whl

Download URL atypical-0.5.2-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbdbf1bdb9518c81378c8ef6f27ec33f639205ceaaf0c78866604dac12e2b5ac
BLAKE2b-256 checksum
How to use checksums
94b801abd4b6675a5f1dcef9c4b140f0f50a9740bba908693a5a6e0f583fd944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for atypical 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for atypical-0.5.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page