Skip to main content

tabapi

A scikit-learn-style Python client for tabular foundation models (TFMs) such as TabICL, served over HTTP.

TFMs predict by in-context learning: there is no training loop on your machine. tabapi sends your labelled rows to a TabAPI server, which runs the model, and gives you back predictions through the familiar fit / predict / predict_proba interface. You don't need torch or a GPU locally.

Status: alpha. The API may change between minor versions. You need access to a running TabAPI server.

Install

pip install tabapi

Requires Python 3.10+.

Quickstart

from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from tabapi import TabAPIClassifier

X, y = load_breast_cancer(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)

clf = TabAPIClassifier(base_url="https://your-tabapi-server.example.com")
clf.fit(X_train, y_train)          # uploads the training context, gets a model id
y_pred = clf.predict(X_test)
proba = clf.predict_proba(X_test)
print(clf.score(X_test, y_test))

TabAPIClassifier is a regular scikit-learn estimator, so it works with cross_val_score, Pipeline, clone, and so on.

Authentication

If the server requires a bearer token, pass token=... or set the TABAPI_API_TOKEN environment variable. The environment variable is read at request time and is never stored on the estimator, so it does not end up in a pickled model.

Retries

Requests the server could not take (busy server, proxy with no healthy backend) are retried with exponential backoff, honouring Retry-After. Tune this with max_retries and backoff_factor, or turn it off with max_retries=0.

Low-level client

TabAPIClient exposes the raw HTTP calls (fit, predict, health) if you don't want the scikit-learn wrapper.

License

BSD-3-Clause.

Metadata

Release files for tabapi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabapi 0.1.0
File Size Uploaded Provenance Actions
tabapi-0.1.0.tar.gz 12.8 kB Without provenance Details for tabapi-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tabapi 0.1.0
File Interpreter ABI Platform Actions
tabapi-0.1.0-py3-none-any.whl Python 3 none any Details for tabapi-0.1.0-py3-none-any.whl

Total release size: 22.5 kB

Release files / tabapi-0.1.0.tar.gz

Download URL tabapi-0.1.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f4ad5ea28db269735c9d7be8ef88f371486be963fe48c616ac31d51ff9cc0c35
BLAKE2b-256 checksum
How to use checksums
ae7ada33df64ab280ead3ad5e4f8baee934c3b7ae3d4438e2cdf9a6b0bb03fc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tabapi-0.1.0-py3-none-any.whl

Download URL tabapi-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
773362a5287c7b90f84ea70568a9cfbe4f1eda5f48d12ae341a82c034db82851
BLAKE2b-256 checksum
How to use checksums
08f368492439fbf67cfa9065dde31f80d19592e820f741331e9bf40695059a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for tabapi 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page