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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slingshot_types-0.1.2.tar.gz
  • Upload date:
  • Size: 2.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.2.tar.gz
Algorithm Hash digest
SHA256 3186f2484cbedaf000091a37e84fec26a8f745357c8f22531e359d20229ccd79
MD5 31ef581d3052ac5be888efd75a4e951d
BLAKE2b-256 71dc9b31ddd2631727fd276d358f6d76e98699a0668f5bd4f76868fec162955f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slingshot_types-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b71e610dc026a1c6df39b85696ddafbb155290d0d98129cf0048df843eace7d2
MD5 55fb08e16939b032585615d5260dbd0a
BLAKE2b-256 2f8de30054cb369a6b11595788d387d41ea50cd0f2d4c019bbb165ba1c72edb6

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