Skip to main content

Ready-to-Use Platform That Drives Business Insights

Project description


Datatailr empowers your team to streamline analytics and data workflows from idea to production without infrastructure hurdles.

What is Datatailr?

Datatailr is a platform that simplifies the process of building and deploying data applications.

It makes it easier to run and maintain large-scale data processing and analytics workloads.

What is this package?

This is the Python package for Datatailr, which allows you to interact with the Datatailr platform.

It provides the tools to build, deploy, and manage batch jobs, data pipelines, services and analytics applications.

Datatailr manages the underlying infrastructure so your applications can be deployed in an easy, secure and scalable way.

Installation

Installing the Python package

You can install the Datatailr Python package using pip:

pip install datatailr

Testing the installation

import datatailr

print(datatailr.__version__)
print(datatailr.__provider__)

Remote CLI (optional)

If you install the package outside the Datatailr platform, you can enable the remote dt CLI:

datatailr setup-cli

datatailr login prompts interactively for the base URL, username and password. To skip the prompts (for CI or scripted setups), set all three of the following environment variables before running datatailr login:

export DATATAILR_BASE_URL=https://your-datatailr-instance
export DATATAILR_USER_NAME=your-username
export DATATAILR_USER_PASSWORD=your-password
datatailr login

When all three are set, DATATAILR_BASE_URL takes precedence over the --url flag. The resulting session is saved to ~/.dt/remote_client/remote_client.cfg, so the env vars are only needed for the login step.

After datatailr login, you can print the OIDC cookie line for scripts or HTTP clients:

datatailr export-auth
eval "$(datatailr export-auth --shell)"   # sets DATATAILR_OIDC_HEADER (sh/bash/zsh)

For fish:

eval (datatailr export-auth --fish)   # sets DATATAILR_OIDC_HEADER

From Python (after datatailr login), read the same session at runtime:

from datatailr import (
    get_remote_http_headers,
    get_remote_oidc_cookie_line,
    get_remote_oidc_jwt,
    load_remote_client_config,
)

cfg = load_remote_client_config()
print(cfg.base_url)

token = get_remote_oidc_jwt()
line = get_remote_oidc_cookie_line()  # X-Datatailr-Oidc-Data=<jwt>

import requests
requests.get(f"{cfg.base_url}/api/user/ls", headers=get_remote_http_headers())

Example usage:

dt job ls
dt user ls
dt job save path/to/local/file.json

Notes:

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

AI Agent Skills

The package includes agent skills that teach AI coding assistants (Cursor, Claude Code, Codex, Copilot, etc.) how to work with the Datatailr platform. Inside Datatailr workstations, skills are available automatically. On your local machine, run:

datatailr setup-skills

Quickstart

The following example shows how to create a simple data pipeline using the Datatailr Python package.

from datatailr import workflow, task

@task()
def func_no_args() -> str:
    return "no_args"


@task()
def func_with_args(a: int, b: float) -> str:
    return f"args: {a}, {b}"

@workflow(name="MY test DAG")
def my_workflow():
    for n in range(2):
        res1 = func_no_args().alias(f"func_{n}")
        res2 = func_with_args(1, res1).alias(f"func_with_args_{n}")
my_workflow(local_run=True)

Running this code will create a graph of jobs and execute it. Each node on the graph represents a job, which in turn is a call to a function decorated with @task().

Since this is a local run then the execution of each node will happen sequentially in the same process.

To take advantage of the datatailr platform and execute the graph at scale, you can run it using the job scheduler as presented in the next section.

Execution at Scale

To execute the graph at scale, you can use the Datatailr job scheduler. This allows you to run your jobs in parallel, taking advantage of the underlying infrastructure.

You will first need to separate your function definitions from the DAG definition. This means you should define your functions as a separate module, which can be imported into the DAG definition.

# my_module.py

from datatailr import task

@task()
def func_no_args() -> str:
    return "no_args"


@task()
def func_with_args(a: int, b: float) -> str:
    return f"args: {a}, {b}"

To use these functions in a batch job, you just need to import them and run in a DAG context:

from my_module import func_no_args, func_with_args
from datatailr import workflow

@workflow(name="MY test DAG")
def my_workflow():
    for n in range(2):
        res1 = func_no_args().alias(f"func_{n}")
        res2 = func_with_args(1, res1).alias(f"func_with_args_{n}")

schedule = Schedule(at_hours=0)
my_workflow(schedule=schedule)

This will submit the entire workflow for execution, and the scheduler will take care of running the jobs in parallel and managing the resources. The workflow in the example above will be scheduled to run daily at 00:00.


Visit our website for more!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datatailr-0.1.115.tar.gz (190.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datatailr-0.1.115-py3-none-any.whl (252.4 kB view details)

Uploaded Python 3

File details

Details for the file datatailr-0.1.115.tar.gz.

File metadata

  • Download URL: datatailr-0.1.115.tar.gz
  • Upload date:
  • Size: 190.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for datatailr-0.1.115.tar.gz
Algorithm Hash digest
SHA256 2907c4328bf4920cb1ee7176c837d28e98c46e6351d6a3c1f0728812fe50a3bb
MD5 af2aa2c977970cef1275bb6c4df0a9ff
BLAKE2b-256 0059660f659c90440c30360d82ee4d315611603269efbd0c439ab518a4af0072

See more details on using hashes here.

File details

Details for the file datatailr-0.1.115-py3-none-any.whl.

File metadata

  • Download URL: datatailr-0.1.115-py3-none-any.whl
  • Upload date:
  • Size: 252.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for datatailr-0.1.115-py3-none-any.whl
Algorithm Hash digest
SHA256 9833b0deb8143c7e1422508fec8e212f7db57ad40c5296dc9fe36e2a25cc57ae
MD5 5785e95d8885bee745cf9b152798ca7f
BLAKE2b-256 1b9f6a4fee9c1806120766dd07741147cc2cf5d5d1a4dcc172dbe06b3a06cddb

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