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 dt command line tool

Before you can use the Datatailr Python package, you need to install the dt command line tool. [INSTALLATION INSTRUCTIONS FOR DATATAILR GO HERE]

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__)

Quickstart

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

from datatailr.scheduler import batch_job, Batch

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


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

with Batch(name="MY test DAG", local_run=True) as dag:
    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}")

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 @batch_job().

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.scheduler import batch_job

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


@batch_job()
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.scheduler import Batch, Schedule

schedule = Schedule(at_hours=0)

with Batch(name="MY test DAG", schedule=schedule) as dag:
    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}")

This will submit the entire DAG for execution, and the scheduler will take care of running the jobs in parallel and managing the resources. The DAG 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.56.tar.gz (31.7 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.56-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for datatailr-0.1.56.tar.gz
Algorithm Hash digest
SHA256 7dcc10bb9882d4d9aacfd4d47740699661ae23d6439ddeb3dbe7a83f31839aae
MD5 e199b65224fecd3b850df82cc041d0f4
BLAKE2b-256 7a6a951afabc2f5d5ad0d3cb5bdc849350521ca7cc5d8946c28120fd1920b753

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for datatailr-0.1.56-py3-none-any.whl
Algorithm Hash digest
SHA256 ac3a06e129de9088f9de6431ea7ae71e0e4fd35533e0113062d5b5567d4cd867
MD5 c1c11aae47be77b1e64aa0e5a8a8e797
BLAKE2b-256 db3806a36a65fde3fc4df1610636d6755615948e616b2c7979ff9d2222e2f2c1

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