Skip to main content

Typed Protocol+cast shims for common Python data science package functions

Project description

slingshot-types

Typed shims for popular Python package functions that often show up as Unknown in strict type checking.

The package uses Protocol and cast to provide stable, importable typed callables for:

  • sklearn.metrics.classification_report
  • sklearn.model_selection.train_test_split
  • tqdm.tqdm

Install

pip install -e .

Usage

from slingshot_types import classification_report, train_test_split, tqdm

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

for row in tqdm(rows):
    ...

report = classification_report(y_test, y_pred)

Why this exists

Some downstream codebases run strict checks (Unknown/Any bans in pyright or mypy configurations). These shims give typed import points while preserving runtime behavior.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slingshot_types-0.1.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slingshot_types-0.1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file slingshot_types-0.1.3.tar.gz.

File metadata

  • Download URL: slingshot_types-0.1.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for slingshot_types-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2f8d3ceb0eaa7521331ace38aba3bd24e30cfae4d76f0737085aa964dde136bb
MD5 e24649cafd8137e283baa5c576a20df3
BLAKE2b-256 bfdf0cdf15cc2a865783653180d401e97b38cc07f21639b40b73c03f19210a28

See more details on using hashes here.

File details

Details for the file slingshot_types-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for slingshot_types-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54ce0ae46c516b2e7c30877255df07d83810f2cfa7a99b1450326b20cab52196
MD5 fa587b17af59db1c56bbf7f33208f390
BLAKE2b-256 d2441f13a3a5102f2febb877b06bbeea0d5a5aeee8d6c89275290a0606f49af9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page