Skip to main content

ty-extensions

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 ty's experimental 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.2.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.2.0
File Size Uploaded Provenance Actions
ty_extensions-0.2.0.tar.gz 4.6 kB Without provenance Details for ty_extensions-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / ty_extensions-0.2.0.tar.gz

Download URL ty_extensions-0.2.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56dbc8935ec2e4147e9243d267dc89195068bdf11fcd2cfa675ed8bd37e2d72b
BLAKE2b-256 checksum
How to use checksums
3e641291bfd91ac9e28d358d5e66144deada514024cd81f09ba7584898dabb67
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.2.0-py3-none-any.whl

Download URL ty_extensions-0.2.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49c4d3cfc32f11d7441567c8ddffca372715688149f7522dae81d9e23c32fee7
BLAKE2b-256 checksum
How to use checksums
0913c4fa1c3f600fe38dbd5687abf6ae2fe7c819216f8d725f8761de71cf63e4
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.2.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