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.3.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.3.0
File Size Uploaded Provenance Actions
ty_extensions-0.3.0.tar.gz 4.8 kB Without provenance Details for ty_extensions-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.4 kB

Release files / ty_extensions-0.3.0.tar.gz

Download URL ty_extensions-0.3.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3bcf4b3d5fce425c8c09f9b5752cbafefd4e459cbe5a19c87a70b0706369597b
BLAKE2b-256 checksum
How to use checksums
93e84335d24eb0c5e635d45240cfcca769372814f7248b7d5ded31edae6f35fa
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.3.0-py3-none-any.whl

Download URL ty_extensions-0.3.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d975eebbac90a5e3dd5ce969a4fbd0d3dfb9c3a5c22b6f767ea2fbe377f32398
BLAKE2b-256 checksum
How to use checksums
c7bceba2b55189776cc136195c1e5d62f28553a1999cc105e3dccc2783217bce
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.3.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