Skip to main content

rekursiv-ai-typings

PyPI version CI Python 3.12+ License: Apache-2.0 Discord

Hand-written type stubs for third-party libraries that ship no types, or ship types loose enough to fail basedpyright and ty in strict mode.

Quick Start

# Mac:
#   # Required for quick install.
#   brew install uv

# Ubuntu/Debian:
#   # Required for quick install.
#   sudo apt-get install -y curl
#   curl -LsSf https://astral.sh/uv/install.sh | sh

uv add --dev rekursiv-ai-typings

# Alternatively: python -m pip install rekursiv-ai-typings

Each typings/<pkg>/ installs as the PEP 561 stub-only package <pkg>-stubs. Both checkers find those in site-packages on their own, so installing the wheel is the whole setup.

Example

import yaml

data = yaml.safe_load("a: 1")
reveal_type(data)  # object, not Any

Features

Override one library

A project's own stubs win. Put them under the project's stubPath, named the same way:

typings/<pkg>-stubs/__init__.pyi
[tool.basedpyright]
stubPath = "typings"

[tool.ty.environment]
extra-paths = ["typings"]

Name the directory <pkg>-stubs, not <pkg>: ty ignores a local typings/<pkg>/ while an installed <pkg>-stubs exists.

Partial stubs

A tree that stubs only some of a library's modules (fastapi, starlette, lxml, curl_cffi, lark, optax, sklearn, torch) carries a py.typed reading partial, so the checkers take the remaining modules from the library itself.

Placeholder sources

triton is a linux-only wheel. Where it is absent, basedpyright reports reportMissingModuleSource on every import triton, and an inline suppression is then flagged unnecessary on linux. The wheel therefore also installs the triton tree, .py placeholders included, at .venv/share/rekursiv-ai-typings/triton. Add its parent to extraPaths:

[tool.basedpyright]
extraPaths = [".venv/share/rekursiv-ai-typings"]

Types still come from triton-stubs; the placeholders only satisfy source resolution.

Patched standard library

rekursiv-ai-typeshed, in typeshed/, is the companion package: the checkers' bundled stdlib stubs with int/float ** returning float instead of Any. It needs one path per checker; see typeshed/README.md.

Metadata

Release files for rekursiv-ai-typings 0.1.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 rekursiv-ai-typings 0.1.0
File Size Uploaded Provenance Actions
rekursiv_ai_typings-0.1.0.tar.gz 2.3 MB Without provenance Details for rekursiv_ai_typings-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rekursiv-ai-typings 0.1.0
File Interpreter ABI Platform Actions
rekursiv_ai_typings-0.1.0-py3-none-any.whl Python 3 none any Details for rekursiv_ai_typings-0.1.0-py3-none-any.whl

Total release size: 7.1 MB

Release files / rekursiv_ai_typings-0.1.0.tar.gz

Download URL rekursiv_ai_typings-0.1.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fe761c2221bcad86eb7e1163253997c203596163e7dfc8468a8e3dda5294eccb
BLAKE2b-256 checksum
How to use checksums
f6890af22ab69ce5235f2ba604fb3ebf30fb19cfbe3665460efd61a5364769e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / rekursiv_ai_typings-0.1.0-py3-none-any.whl

Download URL rekursiv_ai_typings-0.1.0-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7eb8a966c9724578f2710b84c6f49874e217167305dd6392d615bff6b97095ae
BLAKE2b-256 checksum
How to use checksums
10a61dfc0440c59ac4ff4be5b1538edc104ef2085ef9a65c151edc491e93a9de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for rekursiv-ai-typings 0.1.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