Skip to content

Python SDK

The datatailr Python package provides a complete SDK for interacting with the Datatailr platform โ€” scheduling workflows, managing users and groups, working with blob storage, key-value stores, secrets, and more.

Using in a Workstation

The Python SDK is already pre-installed in every Datatailr workstation. You can start using it immediately without any setup:

import datatailr

print(datatailr.__version__)

Installing Locally

You can also install the SDK on your laptop or PC without installing the full Datatailr platform and connect to a remote cluster.

1. Install the package

Install the Datatailr Python package:

pip install --user datatailr

Or, if using a virtual environment:

pip install datatailr

On Windows without administrator access, prefer pip install --user โ€” it installs to your user profile and does not require elevation.

If the native dt executable is not on PATH, the next Python start shows a reminder to run datatailr setup-cli.

2. Set up the remote CLI and log in

Run this command on your laptop or PC. Give the address of your Datatailr dashboard to --url:

python -m datatailr setup-cli --url https://your-datatailr-address

setup-cli does two steps:

  1. It installs the remote dt command, which sends dt commands to your Datatailr installation. In a virtual environment, the command goes to the bin folder of the environment (Scripts on Windows). Outside a virtual environment, it goes to ~/.dt/bin, and setup-cli adds that folder to your PATH. Close and open the terminal again to use dt.
  2. If you do not have a valid session, it prints No Datatailr session found. Running 'datatailr login'... and asks for your login:
Base URL (default http://localhost): https://your-datatailr-address
Username: alice
Password:
Login successful. Configuration saved.
  • Base URL: the address of your Datatailr dashboard. If you give --url, setup-cli does not ask for it. The default is the address of your last login. If you leave out https://, the command adds it (http:// for localhost).
  • Username: your Datatailr user name. After a first login, the default is the user name of the saved session.
  • Password: your Datatailr password. The terminal does not show it while you type.

The command saves the session in ~/.dt/remote_client/remote_client.cfg. If you already have a valid session, setup-cli does not ask for a login. To install the dt command without a login, add --no-login.

When the login is complete, the SDK sends its calls to your Datatailr installation. You can deploy jobs, manage data and use the other SDK features from your local machine, as you do in a Datatailr workstation.

Log in again

datatailr login runs only the login step, with the same prompts. Run it when your session expires or to log in to a different Datatailr installation. datatailr logout removes the saved session.

To log in through your browser instead of with a password, run this command:

datatailr login --device --url https://your-datatailr-address

The command prints a URL. Open it in your browser and approve the login. Then the command installs the remote dt command, as setup-cli does.

To log in without prompts, for example in CI, set DATATAILR_BASE_URL, DATATAILR_USER_NAME and DATATAILR_USER_PASSWORD before you run datatailr login or setup-cli. The command uses them only when all three are set. DATATAILR_BASE_URL then overrides --url.

Note

  • Remote CLI configuration inside a virtual environment only applies within that environment.
  • The remote CLI cannot be installed inside Datatailr containers; the native CLI is used there.

Remote version compatibility

Remote SDK calls require matching platform and SDK major/minor versions; patch versions may differ (for example, platform 0.1.3 and SDK 0.1.9). A server with compatibility enforcement rejects known mismatches with HTTP 409 before executing the command. Missing or unrecognized version headers skip the check; this does not confirm compatibility.

The interactive CLI asks before installing a compatible SDK into the active Python environment using pip; the default is No. Installation may upgrade or downgrade the SDK. Non-interactive commands and Python API calls report the error and an installation command without installing anything. After approving an update or running the suggested command yourself, restart your Python/agent session and rerun the original command. It is never retried automatically.

Agent Skills

The datatailr package includes a set of AI agent skills that teach coding assistants (Cursor, Claude Code, Codex, Copilot, etc.) how to deploy apps, workflows, services, and more on the Datatailr platform.

Inside Datatailr workstations, these skills are automatically available in ~/.agents/skills, with links from ~/.claude/skills for Claude Code โ€” no setup required.

When working from your local machine, you can install the skills with:

datatailr setup-skills [-g|--global] [-d|--destination PATH] [-f|--force]

By default, the skills are installed to ./.agents/skills in the current directory. Codex, Cursor and Copilot read this directory. Claude Code reads only .claude/skills, so the command also creates a symbolic link for each skill in ./.claude/skills that points into ./.agents/skills. Other skills you keep in .claude/skills are not touched. Use --global to install to ~/.agents/skills and link from ~/.claude/skills instead.

Use --destination PATH to install into any other directory. Then the skills go to that directory only, with no links. --destination cannot be combined with --global.

If skills or links already exist in the target directories, the command lists them and asks before it replaces them. Use --force to replace them without asking.

On Windows, creating symbolic links needs Developer Mode or an administrator shell. Without it, the command copies the skills into .claude\skills instead of linking them and says so.

Claude Code users can also install the skills and the live dashboard as plugins from the Datatailr marketplace. In Claude Code 2.1.299 or later, run these two commands:

/plugin install datatailr-skills --marketplace Datatailr/datatailr-skills
/plugin install datatailr-dashboard --marketplace Datatailr/datatailr-skills

The first plugin installs the SDK at the start of each session, and its datatailr-connect skill logs in with a browser approval.