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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slingshot_types-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 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.0.tar.gz
Algorithm Hash digest
SHA256 453fc8d00a7cad21e77d8f2dd385e1b4acd8d050b00c4f9a276a643fd7dbc8ff
MD5 70813a9e94be3063ad27223f4996e843
BLAKE2b-256 ac5eb7dd662eda0673d1ab5bda4225d6f38c295297bec0c510644c61b7fceb55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slingshot_types-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0de272bea7ed07131849a0c788062e2dc1e31603a6ec67ec830c46f6f04fdada
MD5 e8e750a91e2b99d18b186b17ea03ab34
BLAKE2b-256 a9b245134f5de9ecabc9184212bbb9558e78c76a7e05f9098c8d8c79e6e61a58

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