typal
A lightweight collection of reusable typing utilities for modern Python.
Overview
typal provides small, composable building blocks for Python type annotations.
It avoids type explosion and focuses on clarity, reuse, and native typing features.
Features
- Optional type helpers (
Opt[T]) - Functional type aliases (
Mapper,Predicate,Action) - Collection shortcuts (
Seq[T],List[T]) - Common type unions (
StrOrInt,PathOrStr, etc.) - Enum-aware type utilities
- Clean separation of typing concerns
Installation
Using uv:
uv add typal
Or pip:
pip install typal
Usage
Optionals
from typal.optionals import Opt
value: Opt[int] = None
Collections
from typal.collections import Seq
def process(items: Seq[str]) -> None:
...
Functional types
from typal.functional import Mapper, Predicate, Action
def transform(x: int) -> str:
return str(x)
m: Mapper[int, str] = transform
Unions
from typal.unions import StrOrInt, PathOrStr
def load(path: PathOrStr) -> StrOrInt:
...
Tuples
from typal.tuples import Pair, Triple
Point = Pair[float]
RGB = Triple[int]
Design Philosophy
typal follows these principles:
- Prefer native Python typing (
|,list[T],dict[K, V]) - Avoid combinatorial type explosion
- Provide reusable abstractions, not exhaustive aliases
- Keep the API small, predictable, and composable
Non-goals
typal does NOT aim to:
- Replace Python's built-in typing system
- Provide exhaustive pre-generated type variants
- Introduce framework-specific abstractions
- Replace domain models
Metadata
Release files for typal 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| typal-0.1.3.tar.gz | 18.8 kB | With provenance | Details for typal-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typal-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for typal-0.1.3-py3-none-any.whl |
Total release size: 29.7 kB
Release files / typal-0.1.3.tar.gz
| Download URL | typal-0.1.3.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40b710e36166ec3b7506f4ec065af6a2deb61166f453e6852f851e77dd9c82cf
|
|
BLAKE2b-256 checksum How to use checksums |
f19e402bb2131cb53905da97fb50e80014f859e3f90b20a7b42a9a108085dc89
|
| 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 May 19, 2026.
Transparency logRelease files / typal-0.1.3-py3-none-any.whl
| Download URL | typal-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b23e5ee32c9d09a7ce2d42660c2d87ea0a35f1cb758b04b5821a06a9495ceac
|
|
BLAKE2b-256 checksum How to use checksums |
1dc1a577d410ee3c814a2ef09387c1d26ee3709427efe52c0f9ab8ceda21bbe2
|
| 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 May 19, 2026.
Transparency logSecurity for typal 0.1.3
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.
Attestation for typal-0.1.3.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 May 19, 2026.
Transparency logA 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.