Extra Types
Extra types and type utilities for Python. It provides some useful types that can be easily integrated into your code. Documentation available at https://george-ogden.github.io/extra-types/
Example
PosInt represents positive integers.
from extra_types.types import PosInt
isinstance(0, PosInt) # False
isinstance(1, PosInt) # True
isinstance(2, PosInt) # True
isinstance(1.5, PosInt) # False
isinstance(object(), PosInt) # False
# Use it as a type hint
def setup_agents(num_agents: PosInt) -> None: ...
# Validate with attrs
import attrs
@attrs.define
class AgentConfig:
agent_size: PosInt = attrs.field(validator=attrs.validators.instance_of(PosInt))
# Check with strict cast
from extra_types.type_utils import strict_cast
def generate_positive_integer() -> PosInt:
number = ...
return strict_cast(PosInt, number) # raises a TypeError if not a positive integer
Install
Quick Install
uv pip install extra-type-helpers
Slow Install
pip install extra-type-helpers
Bugs/Feedback
Use the issue tracker for bugs/feedback, please.
Metadata
Release files for extra-type-helpers 0.8.4
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 |
|---|---|---|---|---|
| extra_type_helpers-0.8.4.tar.gz | 7.6 kB | With provenance | Details for extra_type_helpers-0.8.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| extra_type_helpers-0.8.4-py3-none-any.whl | Python 3 | none | any | Details for extra_type_helpers-0.8.4-py3-none-any.whl |
Total release size: 20.7 kB
Release files / extra_type_helpers-0.8.4.tar.gz
| Download URL | extra_type_helpers-0.8.4.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b9ed676ef361d00d478a1770e9aa09f8d58a68e5467e8a2d9fc2d0fe4fc8faf
|
|
BLAKE2b-256 checksum How to use checksums |
17995f3971707751e1c066ba9e5e0a5bd48443c8025be21d703fb2630765e19e
|
| 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 Oct 25, 2026.
Transparency logRelease files / extra_type_helpers-0.8.4-py3-none-any.whl
| Download URL | extra_type_helpers-0.8.4-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a22eb38fea2e17135bc2c414574e1b2ea03c85c23981302aa482977f0db3b47
|
|
BLAKE2b-256 checksum How to use checksums |
5875cb1664bd4bf4f1208f18c3446ec29660fdb08d5704297ec8e1ff76876a93
|
| 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 Oct 25, 2026.
Transparency logSecurity for extra-type-helpers 0.8.4
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 extra_type_helpers-0.8.4.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 Oct 25, 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.