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.4.tar.gz (3.6 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.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slingshot_types-0.1.4.tar.gz
  • Upload date:
  • Size: 3.6 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.4.tar.gz
Algorithm Hash digest
SHA256 9581d32304a3882532c22fa3109210be3848f8eb47b87edcc81ac24f2e0faea9
MD5 6f6d9df50f17878dc6bdb53998f0faf7
BLAKE2b-256 cee5ff814e59aa237bcde5946cde7ae4f50f442fb65cd1f3a5e512d19a669a21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slingshot_types-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a66a164cdb558eaf576c4e88c8d063f3ef3bcdb8b61d3b52e6ee29b6cab3624
MD5 1e233a0b9395636deb1b79412380fe82
BLAKE2b-256 aae01774e22a21675d2984ef553a008bc38396ebe7c93a1a635a5dcb2c4969c3

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