Skip to main content

dagctl

The command-line client for dagctl, a hosted service that runs SQLMesh projects in production. dagctl keeps your project's SQLMesh state, runs your models on a schedule, holds every change for approval before it goes live, and tells you when something breaks. One flat rate covers the whole team.

This package is the part that lives on your machine. It signs you in to your dagctl organization and hands SQLMesh a connection to your project's hosted state, so sqlmesh plan and sqlmesh run on a laptop see the same state as production. There is nothing to run locally and no database credentials to manage.

What it does

  • Signs you in to a dagctl organization from the browser and keeps the session fresh.
  • Sets which project you are working in.
  • Gives SQLMesh the state connection for that project through get_state_connection(), so your config.py carries no credentials.
  • Converts an existing config.yaml into a config.py wired to dagctl.

Requirements

  • Python 3.9 or newer
  • A dagctl organization. If you do not have one, request access at https://dagctl.io.

Installation

pip install dagctl

Quick start

# 1. Sign in to your organization
dagctl auth login --org your-org

# 2. Choose the project you are working in
dagctl use-project my-project

# 3. Point SQLMesh at dagctl (converts config.yaml to config.py)
cd my-sqlmesh-project
dagctl config generate

# 4. Use SQLMesh as usual
sqlmesh plan

How it works

SQLMesh keeps track of what has run and what changed in a state database. dagctl hosts that database for your project. When SQLMesh starts, it calls get_state_connection() from this package, which:

  1. Reads your sign-in from ~/.dagctl/
  2. Refreshes the session if it has expired
  3. Returns the connection details SQLMesh expects

The connection uses a short-lived token in place of a password, so nothing long-lived is stored on your machine.

Documentation

  • Usage: signing in, choosing a project, generating the SQLMesh config, the command reference, the files in ~/.dagctl/, and troubleshooting.
  • API reference: get_state_connection(), get_fresh_token(), and how authentication to the hosted state database works.
  • docs.dagctl.io: the dagctl platform documentation.

License

Apache-2.0

Release files for dagctl 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dagctl 0.3.0
File Size Uploaded
dagctl-0.3.0.tar.gz 30.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dagctl 0.3.0
File Interpreter ABI Platform
dagctl-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.1 kB

Release files / dagctl-0.3.0.tar.gz

Download URL dagctl-0.3.0.tar.gz
Size 30.7 kB
Tags Source
SHA-256 checksum
How to use checksums
97ed4604152e9ebedc2aa66d452581e95afad502728dc3f04594df95f4245227
BLAKE2b-256 checksum
How to use checksums
9825bc6b3e51cabce0c408b0a229d270444b702fca32f40355003606cf92c774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / dagctl-0.3.0-py3-none-any.whl

Download URL dagctl-0.3.0-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56d931735d5c3cf1cff13fe0efe13d819ac4bdbfff06566db7b01b2e8d9fbc82
BLAKE2b-256 checksum
How to use checksums
39b914fa87afe26c594ec7bcfd4ba4993e515db018e06f50472abd1b4c7eeb19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

1 release file

0.1.6

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page