Skip to main content

HTAP embedded database

Project description

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

Project details


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.2.1.tar.gz (77.4 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.2.1-cp311-abi3-manylinux_2_39_x86_64.whl (52.9 MB view details)

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

dkdc_db-0.2.1-cp311-abi3-manylinux_2_39_aarch64.whl (51.0 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ ARM64

dkdc_db-0.2.1-cp311-abi3-macosx_11_0_arm64.whl (44.7 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_db-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl (47.2 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for dkdc_db-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c7a1cd7b31dc5668134dc3340d8712d1ba9da0591ddf2d28834d8e998cf39b4d
MD5 743c8977a6ae3b74d75f364466f0f825
BLAKE2b-256 be3ba663bae8ec58ef0963c894d67ac422f7457d77d91758668209a3960f80e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.2.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.2.1-cp311-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.2.1-cp311-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 32a38b9b54242558d08aef5e84849fe50fc29b087c8083291583f17a40c1a015
MD5 adbe05928ccc6516069dfe4888f06845
BLAKE2b-256 ada51c25012374d4dc8fc83fbeef0d525f1f6c69fac213afa8af9bd6d4848064

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.2.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.2.1-cp311-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.2.1-cp311-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 70fe5266c46d0212a43ac354ae67404adb6da2808be6a7707e03dd53c4a82bee
MD5 caaaf3b6e6c182eceb6e4194b0c9be45
BLAKE2b-256 e475c6c5865bb153313a2d0255f854f27e9a5b4b412ea24cd943a5f336ab8961

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.2.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.2.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.2.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f50b9474de39fc99f268c6e190186de085b24a3bd7636f0019f8217d5055a29
MD5 23d888cc8f9145aa455f4b4bf5d334c5
BLAKE2b-256 7026ca29f5217e8739d1127a59766da1b4f87ed1b7b53d860e4cdb37d1e4e0b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.2.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.2.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dkdc_db-0.2.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9aa643a7cb53237612e95d1219f02ed68aab17269808d0bb663e3383ab12591a
MD5 a89f7fba0272969a9ca639b7fe262b40
BLAKE2b-256 9e7a203126b4ba5ac471d209691e8fc2fd7e0729cf6972de944952ceb6a4187a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dkdc_db-0.2.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.

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