Skip to main content

shadeDB

PyPI Version Downloads Latency Platform License

The machine-native, semi-structured database built for autonomous agents, real-time pipelines, and sub-millisecond ingestion.

Premium ServerContact / Support

Facebook YouTube WhatsApp Instagram


Key Pillars

  • Machine-Native — Designed for AI agents and automated services, removing human-centric query overhead.
  • Millisecond Execution — Direct command-dispatch architecture built for extreme performance.
  • Structured Native Language (SNL) — An ultra-fast, command-based execution layer that drastically reduces parsing time.
  • Deterministic Execution — Predictable latency, sync execution models, and zero unexpected overhead.
  • Minimal & Composable — Zero bloat, low allocation footprints, and dead-simple multi-platform setup.

Quick Links & Navigation


Why shadeDB?

Traditional databases were built for human queries, complex ORMs, and verbose text parsing.

shadeDB flips the script. Autonomous AI agents, high-frequency execution engines, and real-time event streams don't need pretty syntax — they need pure velocity, low memory footprints, and deterministic responses.

shadeDB uses Structured Native Language (SNL) to bypass heavy parsing cycles, yielding near-instant operations across cloud, edge, and embedded runtime environments.


What is shadedb-api?

shadedb-api is the official synchronous subcommunicator layer interfacing your Python environment directly with remote shadeDB instances.

┌────────────────────────┐      Direct Command Pipeline       ┌────────────────────────┐
│  Application / Agent   │ ─────────────────────────────────> │   shadedb-api Client   │
└────────────────────────┘                                    └────────────────────────┘
                                                                          │
                                                                   Sync Network Shift
                                                                          │
                                                                          ▼
                                                              ┌────────────────────────┐
                                                              │ Remote shadeDB Engine  │
                                                              └────────────────────────┘

Installation

pip install shadedb-api

Connecting to a Partition Cluster

Before using shadedb-api, obtain the following credentials from your shadeDB dashboard:

  • Partition Endpoint – The unique endpoint assigned to your partition.
  • Connection Token – Authenticates your client.
  • Cluster Token – Grants access to the target partition cluster.

Keep both tokens secret. Never expose them in public repositories or client-side applications.

Temporary Connection

To connect without saving the configuration:

shadedb-api CONNECTION_ENDPOINT CONNECTION_TOKEN CLUSTER_TOKEN

Example:

shadedb-api http://host.com/connect/sdb7f585246acf1480b9caac05f811c3 
8da846a452f13d1d4cf4ddfac656a115 
8c2ff6b8c408f68

The connection is valid only for the current session. You'll need to provide the credentials again the next time you connect.

Persistent Initialization

To save the connection details for future sessions:

shadedb-api-init CONNECTION_ENDPOINT CONNECTION_TOKEN CLUSTER_TOKEN

Example:

shadedb-api-init http://host.com/connect/sdb7f585246acf1480b9caac05f811c3 
8da846a452f13d1d4cf4ddfac656a115 
8c2ff6b8c408f68

This stores the endpoint and authentication tokens locally.

Reconnecting

After initialization, simply run:

shadedb-api

The client automatically loads the previously saved connection details and opens an interactive session.

30-Second Quickstart

from shadedb_api.frame.sync import syncFrame

# Initialize the synchronized DB engine
db = syncFrame(
    endpoint="https://your_database_endpoint",
    connection_token="YOUR_CONNECTION_TOKEN",
    cluster_token="YOUR_CLUSTER_TOKEN",
    inspection=False,
    query_timeout=0.5 
)

Basic Usage

Insert Record

result = db.snl_complex_query(
    command="Insert",
    context={"username": "shade", "age": 12}
)
print(result)

Full Overwrite

result = db.snl_complex_query(
    command="Overwrite;id::int(1)",
    context={"username": "zeus", "age": 56, "email": "zeus@mail.com"}
)
print(result)

Direct String Query

result = db.snl_query("Fetch;id::int(1)")
print(result)

Structured Native Language (SNL)

SNL is shadeDB’s core execution dialect. It reduces syntax parsing to simple instruction.

Fetch

Retrieve records instantly via indexed fields:

Fetch;username::sherifdeen

Verify field values directly on fetch:

Fetch;username::sherifdeen;verify(field='value')

Select or exclude specific fields:

Fetch;username::sherifdeen;get(username,role)
Fetch;username::sherifdeen;exclude(password,auth_token)

Atomic update on target key:

Fetch;username::sherifdeen;update(age='int(21)');
Fetch;username::sherifdeen;strict(age='int(21)');

Where (Filtering)

Filter non-unique fields with precision:

Where;gender::male;get(username,role)
Where;gender::male;exclude(password,auth_token)

Pagination & Ordering

Fine-tune record sets without heavy query wrappers:

  • start X, limit Y — Offset and page limits
  • order(ascend) — Sort ascending
  • order(descend) — Sort descending
  • order(random) — Shuffle returned records
Where;status::active;start 1, limit 50;order(descend);

Insert / Update / Lifecycle

# Insert record (JSON payload required)
Insert;jsonString({ "username":"admin", "id":56 });

# Atomic Field Update
Fetch;username::sherifdeen;update(age='int(43)');

# Full Record Overwrite
Overwrite;username::sherifdeen;jsonString({ "username":"shade", "role":"admin" });

Lifecycle Controls

Freeze;id::int(17);     # Soft delete (Reversible)
Unfreeze;id::int(17);   # Restore soft-deleted record
Delete;id::int(17);     # Hard delete (Storage reclaimed on compaction)

Interactive CLI

shadeDB provides a fully functional shell for interactive session management, telemetry, and quick debugging.

# Initialize persistent configuration
shadedb-api-init [https://your-endpoint.com](https://your-endpoint.com) (connection_token) (cluster_token)

# Launch interactive CLI session
shadedb-api

Session Example

Active


[sdb4e74facf8711447b9e33e6dc83a07] >> fetch;id::int(2)
{'id': 2, 'username': 'sherifdeen'}
[sdb4e74facf8711447b9e33e6dc83a07] >> insert;{"username":"john","age":26,"account_type":"user","disabled":false}
{'account_type': 'user', 'age': 26, 'disabled': False, 'id': 3, 'username': 'john'}
[sdb4e74facf8711447b9e33e6dc83a07] >> fetch;username::john;exclude(account_type);
{'age': 26, 'disabled': False, 'id': 3, 'username': 'john'}
[sdb4e74facf8711447b9e33e6dc83a07] >>*;
[{'id': 1, 'username': 'shade'}, {'id': 2, 'username': 'sherifdeen'}]
[sdb4e74facf8711447b9e33e6dc83a07] >> exit
Exiting shadedb-api Console.

Error Handling

Catch predictable exceptions safely with built-in error modules:

from shadedb_api.frame.excepts import (
    ShadeDBError,
    URLEndpointMissingError, 
    SNLMissingError, 
    SNLContextMissingError,
    ConnectionTokenMissingError,
    ClusterTokenMissingError
)

try:
    db.snl_query("fetch;id::int(23)")
except TokenMissingError as e:
    print(f"[shadeDB Security Alert]: Authentication failed -> {e}")
except SNLMissingError as e:
    print(f"[shadeDB Command Error]: Invalid SNL query string -> {e}")

Vision

The future of software isn't human-facing dashboards or verbose SQL query builders. The future is machine agents operating, reasoning, and transacting data at lightspeed.

shadeDB provides the raw execution layer necessary to power that transition.

Maintained by Harkerbyte.

Download files

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

Source Distribution

shadedb_api-1.7.15.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

shadedb_api-1.7.15-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file shadedb_api-1.7.15.tar.gz.

File metadata

  • Download URL: shadedb_api-1.7.15.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for shadedb_api-1.7.15.tar.gz
Algorithm Hash digest
SHA256 6d01b91c32767eb4c14f2627b4826ee3e368d813226c898d226242aed07c1e2f
MD5 3964019e4a7a0b61832979fa7c4ca71c
BLAKE2b-256 31d27522f2bf12941e3f24b906f8a3edef95fb9b65ce5309e1b023b1e0111785

See more details on using hashes here.

File details

Details for the file shadedb_api-1.7.15-py3-none-any.whl.

File metadata

  • Download URL: shadedb_api-1.7.15-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for shadedb_api-1.7.15-py3-none-any.whl
Algorithm Hash digest
SHA256 cc5de4f6fc1b5c084a0c2c63899e5c4dc3281d1daddc1dea6ecd7ac2211be4fd
MD5 2306a4eb314a8bcc83fb737b3145dc19
BLAKE2b-256 b4caf77d1c6deb9e668d340b5222ef1b59310f660c188d3e6306d702f5c1fc16

See more details on using hashes here.

Release history Release notifications | RSS feed

1.7.16

2 files

This release

1.7.15 This release

2 files

1.7.14

2 files

1.7.12

2 files

0.5.9

2 files

0.4.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 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