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

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 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.0.tar.gz (72.0 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.0-cp311-abi3-manylinux_2_39_x86_64.whl (52.4 MB view details)

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

dkdc_db-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl (50.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.39+ ARM64

dkdc_db-0.2.0-cp311-abi3-macosx_11_0_arm64.whl (44.3 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

dkdc_db-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl (46.7 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dkdc_db-0.2.0.tar.gz
  • Upload date:
  • Size: 72.0 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.0.tar.gz
Algorithm Hash digest
SHA256 e0b962d05243503cabe91c06b075138189c9bf2a63b2c450011fa95fbb2c460a
MD5 03f4231535e9aa2d8b58c955c0d7616a
BLAKE2b-256 61250436f75639581c6e12a2258c7e83a56b16d31873acd54bdb4f562b05b0fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dkdc_db-0.2.0-cp311-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c204a2922ae8ce5d75def83493a7dbcb4b769c1a2b39076399b465a5e1de14c9
MD5 c29bf40364ba1c03afa9c52bc69a79e5
BLAKE2b-256 22bbbd6a8927d3953ec1da317442731401bde1253453a796d6e12190ce9696fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dkdc_db-0.2.0-cp311-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 84baa5d9ecb99bde1d4e144a91a1f1ff02201c69867e4f827b8fbe0d468dac54
MD5 65f7aad688748777fcd30680ecfd3a96
BLAKE2b-256 b2db9ecf1b0516afd1849cd8e466a26eed580ddb9b80ac3658725ebc1feba02b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dkdc_db-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c3a8d85e5435ded33567144c22b9b90f7090fa73735205f6eb7fb6bb2548399
MD5 27b9a7cf42f4dfb8c087196632ffc445
BLAKE2b-256 769ed8565c34d8d6943566400b248f17ec1fcbbe990bc502bf670cdc6d8b3030

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dkdc_db-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c5ab839723159bb243ead878faf7827b52db5b3ed72d1f609c1f3721b31ab208
MD5 9b337275fe7fbab31d48cc0e5c26088e
BLAKE2b-256 b5ab2411923a5e1510bd125c87b96c836712c74ffad7f5c1b19206a2faaf7f7c

See more details on using hashes here.

Provenance

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