Skip to main content

ty-extensions

PyPI

This package makes ty's experimental typing extensions importable at runtime. You can add this package as a dependency to your project, if you want to use features from ty_extensions and rely on runtime evaluation of these symbols.

uv add ty-extensions

You can then make use of features like intersection types:

import json
from typing import Protocol

from ty_extensions import Intersection


class Serializable(Protocol):
    def serialize_json(self) -> str: ...


class Versioned(Protocol):
    @property
    def version(self) -> int: ...


def output_as_json(obj: Intersection[Serializable, Versioned]) -> str:
    return json.dumps({
        "data": json.loads(obj.serialize_json()),
        "version": obj.version,
    })

ty checks these symbols using its bundled ty_extensions stubs, but the runtime will use the code defined in this package.

Metadata

Release files for ty-extensions 0.4.0

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

Source distribution (sdist)

Source distribution for ty-extensions 0.4.0
File Size Uploaded Provenance Actions
ty_extensions-0.4.0.tar.gz 6.5 kB Without provenance Details for ty_extensions-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ty-extensions 0.4.0
File Interpreter ABI Platform Actions
ty_extensions-0.4.0-py3-none-any.whl Python 3 none any Details for ty_extensions-0.4.0-py3-none-any.whl

Total release size: 13.8 kB

Release files / ty_extensions-0.4.0.tar.gz

Download URL ty_extensions-0.4.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ee4ed8e13fe5a3be3426bf9c655499eb260ed0e2eac821d42216c36cda9c39d9
BLAKE2b-256 checksum
How to use checksums
8aa2be589d615ccc5b9fbb535e39350cd9431f054da1b9042bcac24101ee1ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ty_extensions-0.4.0-py3-none-any.whl

Download URL ty_extensions-0.4.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97fef1f1d1a110e8de3727c9587704accffec0bb282501975c751899ca1d9496
BLAKE2b-256 checksum
How to use checksums
d2f601bc0a2cae1951bb4bdd21c7be4e82c3fa3f1a64d86b8dfa7d71e6f32e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ty-extensions 0.4.0

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