Skip to main content

pyrefly-jax-stubs

Native Pyrefly shape types for JAX arrays.

This PEP 561 partial stub package preserves JAX's shipped typing and specializes array-bearing APIs with Pyrefly's IntTuple, IntVar, and shape syntax:

from jax import Array
from shape_extensions import IntTuple, IntVar

def rows[N: IntVar](x: Array[[N, 3]]) -> Array[[N]]: ...
def identity[S: IntTuple](x: Array[S]) -> Array[S]: ...

Pyrefly discovers the installed stubs automatically. APIs not included here continue to use the typing shipped with JAX.

Installation

This checkout pins Pyrefly and its shape extension to 1.3.0.dev4, which provides the composable shape API. Both are available as wheels; building Pyrefly from source is unnecessary:

uv sync

The package requires Python 3.13 or newer because its signatures use type-parameter defaults. Version 0.10.2.2 targets JAX 0.10.2. Pyrefly's shape API is still under development, so upgrade the checker and extension together and rerun the shape-contract tests.

Development

A local checkout can be checked and built with:

uv sync
just lint
just test
just build

The copied and adapted JAX declarations retain their original copyright notices and remain under the Apache License 2.0.

Versioning

Releases use <jax-version>.<stub-revision>. The package pins JAX exactly so an upstream API change cannot silently invalidate the overlay.

Metadata

Release files for pyrefly-jax-stubs 0.10.2.2

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

Source distribution (sdist)

Source distribution for pyrefly-jax-stubs 0.10.2.2
File Size Uploaded
pyrefly_jax_stubs-0.10.2.2.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyrefly-jax-stubs 0.10.2.2
File Interpreter ABI Platform
pyrefly_jax_stubs-0.10.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / pyrefly_jax_stubs-0.10.2.2.tar.gz

Download URL pyrefly_jax_stubs-0.10.2.2.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e50aa0365ffa80adb090abe19e0c48ebb3cc53a0eaf1d5afd975437d1839d6da
BLAKE2b-256 checksum
How to use checksums
c7855a8f3cbcdd852172651977dbe4e058542eaa0372f916fa3ff51aaaabe246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release files / pyrefly_jax_stubs-0.10.2.2-py3-none-any.whl

Download URL pyrefly_jax_stubs-0.10.2.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f60d3a87ccc274e4e6f7f2edcdb3926d001eb0f486393c65dd93e91dfb1764e
BLAKE2b-256 checksum
How to use checksums
36eaa4948eaa80583bab49905db7040300d471df25ac2af283e696d198a960e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.2.2 This release

2 release files

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