Overview
This library contains useful wrappers around the Tonic.ai API.
Usage
Instantiate the API wrapper using the following code:
from tonic_api.api import TonicApi
# Do not include trailing backslash in TONIC_URL
api = TonicApi(TONIC_URL, API_KEY)
Once instantiated, the following endpoints are available for consumption. Note that available endpoints and response types are limited. Available fields may be severely limited compared to the current Tonic API.
TonicApi:
get_workspace(workspace_id) => Workspace
Workspace:
id => string
name => string
models => Model[]
train(model_id) => new job ID
get_trained_model_by_training_job_id(job_id) => TrainedModel (or None if training is not done)
get_training_status_by_training_job_id(job_id) => TrainingJobStatus
get_most_recent_trained_model_by_model_id => TrainedModel
describe() => debugger helper for printing fields
Model:
id => string
name => string
query => string
parameters => {}
encodings => {}
describe() => debugger helper for printing fields
TrainedModel:
id => string
job_id => string
model => Model
sample(num_rows) => pandas DataFrame (defaults to 1 row if num_rows not provided)
sample_source(num_rows) => pandas DataFrame (defaults to 1 row if num_rows not provided). Note: NOT randomized. Upper limit is limited to row count in source.
get_numeric_columns() => string[]
get_categorical_columns() => string[]
describe() => debugger helper for printing fields
TrainingJobStatus:
state => string
error => string[] or None
tasks => {}
current_epoch_progress() => dict or None
describe() => debugger helper for printing fields
Metadata
Release files for tonic-api 2.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tonic-api-2.1.4.tar.gz | 8.2 kB | Without provenance | Details for tonic-api-2.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tonic_api-2.1.4-py3-none-any.whl | Python 3 | none | any | Details for tonic_api-2.1.4-py3-none-any.whl |
Total release size: 18.2 kB
Release files / tonic-api-2.1.4.tar.gz
| Download URL | tonic-api-2.1.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2583bba43cb89d1fb56468fded698f4f75734c20592507615953085eaede8dbd
|
|
BLAKE2b-256 checksum How to use checksums |
084e318ef760cdb295d46954a9b52a25e5f67729e3e4bdc0c972f49aca103015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0
|
Release files / tonic_api-2.1.4-py3-none-any.whl
| Download URL | tonic_api-2.1.4-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ccdae089efa3092acd46608ad4fe722b2887e6d6bdfbffc3e69849f163bced2
|
|
BLAKE2b-256 checksum How to use checksums |
0fa6716a82f03a289e8b9720533ea4d22536fdedb4be0b3188cdb2af88e72506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.5 Darwin/20.6.0
|
Security for tonic-api 2.1.4
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.