Python SDK
deepint is the Python library of AIR-Core: it wraps the REST API with objects for organizations, workspaces, sources, models, visualizations, dashboards and tasks, and works with pandas.
Install
Version 1.6.0, with the new features of AIR-Core (explanations, model card, AI activity), installs from its repository:
python3 -m pip install "git+https://github.com/deepintdev/deepint-python-sdk"
python3 -m pip install deepint installs the latest version on PyPI, which is older.
Credentials
Create a token in Account → API and AI applications → New token (it is shown only when you create it: copy it then) and give it to the SDK in one of these ways, in this order of priority:
- In the code:
Credentials.build(token="…", instance="app.air-core.io"). - Environment variables
AIRCORE_TOKENandAIRCORE_INSTANCE(DEEPINT_TOKENandDEEPINT_INSTANCEstill work). - A
~/.deepint.inifile withtokenandinstancein the[DEFAULT]section.
Without an instance, app.air-core.io is used.
First steps
import pandas as pd
from deepint import Organization, ModelType, ModelMethod
org = Organization.build(organization_id="<organization ID>")
ws = org.workspaces.fetch(name="Sales")
# A source from a DataFrame (columns, names and types included)
data = pd.read_csv("sales.csv")
source = ws.sources.create_and_initialize(name="Sales 2026", description="", data=data)
# A model that predicts a column
model = ws.models.create(name="Repeat purchase", description="", model_type=ModelType.classifier,
method=ModelMethod.forest, source=source, target_feature_name="repeats")
# Evaluation, model card and explanation
print(model.predictions.evaluation())
print(model.card(lang="en"))
print(model.explanations.global_importances(lang="en"))
# Predictions
new_rows = data.drop(columns=["repeats"]).head(5)
print(model.predictions.predict_batch(new_rows))
Long operations (importing data, training) return a task: task.resolve() waits until it ends.
More
- Full documentation: aircore-python-sdk.readthedocs.io
- Code and examples: github.com/deepintdev/deepint-python-sdk
- The SDK uses the REST API; everything it does can also be done with the API. The automations (simple notices and flows) are in API v2 (
/api/v2/workspace/{id}/automations): the alert objects of version 1.6.0 use the operations of API v1 that now answer 410 Gone (ALERTS_REMOVED).