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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atypical-0.5.1.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atypical-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 kB
Release files / atypical-0.5.1.tar.gz
| Download URL | atypical-0.5.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4f6f03faca3de6cd46a31be4c56b60a703d1e59f0a936a820aeec6f78abd18c
|
|
BLAKE2b-256 checksum How to use checksums |
07015d3961d100e6dc44bae13d6499d0110917cfbdd866ad2578e24bf681b804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 24, 2026.
Transparency logRelease files / atypical-0.5.1-py3-none-any.whl
| Download URL | atypical-0.5.1-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f63ea4607ef779a4402da0d52c6625a661d69953b7af6e7e7c05350b766706f
|
|
BLAKE2b-256 checksum How to use checksums |
d6749c831e2888724040deacd000241cebb26a48752927f54e0b8e4bde40435d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 24, 2026.
Transparency log