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.5.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.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slingshot_types-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 bc31239aaad4afa4b954e29ac31355a0fb7d044797c7282d64197b5ecb3b4989
MD5 64f9ed1fb2ba1cf843530c9df938800b
BLAKE2b-256 9b6f8a5bf79b613ca0391c778d9baf2e129c9df16420ee2bc8cf9e117bee1a0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slingshot_types-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf7874465698301a3844e5ceb512111bfc54fe795e32f808e137738266c9a4c2
MD5 95e0aa8589250daabb8c2b47e455aee8
BLAKE2b-256 c304d09e2fd0c57094c11962d64808143d6adb19e346cff5252d4eb122aecbd0

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