Skip to main content

TypedTuples

Namedtuple with Strict Type Checking

Download

pip install typedtuples

Examples

from typedtuples import *

Point1 = TypedTuple.of('Point', {'x': float, 'y': float})

class Point2(TypedTuple):
    x: float
    y: float
    def __add__(self, other):
        return Point2(self.x+other.x, self.y+other.y)

@TypedTuple.apply({'x': int, 'y': int})
class IntPoint:
    def __add__(self, other):
        return IntPoint(self.x+other.x, self.y+other.y)

print(Point1(x=2.5, y=5.3))
print(Point2(1.1, 3.2) + Point2(2.4, 5.5))
print(IntPoint(x=1, y=3) + IntPoint(5, 2))

Metadata

Release files for Typedtuples 1.0.7

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

Source distribution (sdist)

Source distribution for Typedtuples 1.0.7
File Size Uploaded Provenance Actions
Typedtuples-1.0.7.tar.gz 2.5 kB Without provenance Details for Typedtuples-1.0.7.tar.gz

Built distribution (wheel)

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

Total release size: 5.2 kB

Release files / Typedtuples-1.0.7.tar.gz

Download URL Typedtuples-1.0.7.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c7bb8b7400f33b708f09da96e193b5cf511fcb0cdb5f1dc45f013eb04f1addc
BLAKE2b-256 checksum
How to use checksums
cb18dbd0826bff7bf23aa98127d5f1e3c95f990784f181a6e303be9cadbcecb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

Release files / Typedtuples-1.0.7-py3-none-any.whl

Download URL Typedtuples-1.0.7-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfdb9284e27e9313f7c2bb237e1251b9797bea3ee82bbd6574c41a4760841107
BLAKE2b-256 checksum
How to use checksums
1fd08d30ea92464d6a4a4b5194ce4034f0a1b73509d557e484141201bb06b4af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

Security for Typedtuples 1.0.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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