Skip to main content

dkdc-db

GitHub Release PyPI crates.io CI License: MIT

HTAP database system. Built-in input validation, SQL safety checks (rejects stacked queries, ATTACH DATABASE, LOAD_EXTENSION), request size limits, structured tracing, and graceful shutdown.

Install

Recommended:

curl -LsSf https://dkdc.sh/db/install.sh | sh

Pre-built binaries are available for Linux and macOS via Python (uv). Windows users should install via cargo or use macOS/Linux.

uv:

uv tool install dkdc-db

cargo:

cargo install dkdc-db-cli dkdc-db-server

Verify installation:

db --version

You can use uvx to run it without installing:

uvx --from dkdc-db db

Quickstart (config-driven)

cargo install dkdc-db-cli
db init                    # creates db.toml with example config
# edit db.toml to define your databases and tables
db serve                   # bootstraps from config, starts server

Usage

CLI

db serve                   # Start multi-database server in tmux
db status                  # Check server status
db logs                    # View recent logs
db attach                  # Attach to tmux session
db stop                    # Stop server

db init                    # Generate starter db.toml
db bootstrap               # Bootstrap databases from config (no server)

db create mydb             # Create a database
db list                    # List databases
db repl --db mydb          # Interactive SQL REPL
db execute --db mydb "SQL" # One-shot write
db query --db mydb "SQL"   # One-shot OLTP query
db query "SQL"             # Cross-db analytical query

Rust

use dkdc_db_core::DbManager;

let mgr = DbManager::new().await?;
mgr.create_db("mydb").await?;
mgr.execute("mydb", "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)").await?;
mgr.execute("mydb", "INSERT INTO users VALUES (1, 'alice')").await?;
let results = mgr.query("SELECT * FROM mydb.public.users").await?;

Python

from dkdc_db import Db

db = Db()  # connects to http://127.0.0.1:4200

# database management
db.create_db("mydb")
print(db.list_dbs())

# write
db.execute("mydb", "CREATE TABLE t (id INT, name TEXT)")
db.execute("mydb", "INSERT INTO t VALUES (1, 'hello')")

# read (analytical, cross-db)
result = db.query("SELECT * FROM mydb.t")

# read (fast path, single db)
result = db.query_oltp("mydb", "SELECT * FROM t")

Download files

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

Source Distribution

dkdc_db-0.3.1.tar.gz (107.5 kB view details)

Uploaded Source

Built Distributions

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

dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_x86_64.whl (53.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ x86-64

dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_aarch64.whl (51.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ ARM64

dkdc_db-0.3.1-cp311-abi3-macosx_11_0_arm64.whl (44.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_db-0.3.1-cp311-abi3-macosx_10_12_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file dkdc_db-0.3.1.tar.gz.

File metadata

  • Download URL: dkdc_db-0.3.1.tar.gz
  • Upload date:
  • Size: 107.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dkdc_db-0.3.1.tar.gz
Algorithm Hash digest
SHA256 380f09790fdda04c0a0b857fc914e6411ab28630dcba657054edd223d8529c3e
MD5 4cee9cee34296a8c0c43a270e2500cd6
BLAKE2b-256 01cc256cf50aa5e49332c3e013c55ec3ba44011db8f5fdcd4f61e56246b62618

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.3.1.tar.gz:

Publisher: release-python.yml on dkdc-io/db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 37db4b073e3eb163a92b7ccd0d933a4b9cf1857eeeb637726c98717dfdff06e3
MD5 9457c4f3753d9304ccfd8a6eadd5a1b9
BLAKE2b-256 1e09cdf1f6ba25dc2767695f22f708d34ae7c3ad617f59e71ef91872ed18b74a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_x86_64.whl:

Publisher: release-python.yml on dkdc-io/db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 c9fd25b2af4ffbc205d9772b332e451bfef6335007c1a6a559af4cb170956034
MD5 38a6eb6ee3f1c3a8fe80df61164b5456
BLAKE2b-256 62221ac9bc01652ed30e62fce279935caa0c85ed1ebc72fa53a32c1cb4ef4241

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.3.1-cp311-abi3-manylinux_2_39_aarch64.whl:

Publisher: release-python.yml on dkdc-io/db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_db-0.3.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.3.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 058146318042018540f74ff85341349563c34bb440cb68bd2e9b9173ad02d51d
MD5 d55ae6d75c5f004309949844f6e8f5a4
BLAKE2b-256 1e17d3c75deee389965bfde0be93b8d95986a0fb63e786ca2b5fa4b4bf80bb74

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.3.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on dkdc-io/db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dkdc_db-0.3.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.3.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0f4b4518d60993aaba4509d3a7890f1da3c213fbef4f75db560d798af1076c2d
MD5 29583d20cd33f10080939d7d7c2b6a58
BLAKE2b-256 babd941b26d9747fd816aab81c8b61375658a12c6f997d2aaf89fcd48471c39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.3.1-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on dkdc-io/db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.1 This release

5 files

0.2.1

5 files

0.2.0

5 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page