Async Python client for nedbd — the nedb-engine server daemon
Project description
nedb-client (Python)
Async Python client for the nedbd HTTP API.
pip install nedb-client
Quick start
from nedb_client import NedbClient
async with NedbClient("http://127.0.0.1:7070", db="mydb") as db:
# Write
await db.put("blocks", "618000", {"height": 618000, "hash": "000abc"})
# Query (full NQL)
rows = await db.query("FROM blocks ORDER BY height DESC LIMIT 10")
# Causal provenance + bi-temporal
result = await db.put("claims", "c1", {"fact": "..."},
caused_by=["abc123..."],
valid_from="2024-01-01",
evidence="sensor-42")
# Merkle head (tamper-evident root)
head = await db.head()
# Full tamper-evidence check
report = await db.verify()
assert report["ok"]
API
| Method | Description |
|---|---|
put(coll, id, doc, **meta) |
Write a document |
get(coll, id) |
Fetch current version |
delete(coll, id) |
Tombstone delete |
query(nql) |
NQL query → list of dicts |
query_full(nql) |
NQL query → full response with seq + head |
batch(ops) |
Batch put/del in one round-trip |
create_index(coll, field) |
Create sorted index |
verify() |
BLAKE2b tamper-evidence check |
head() |
Current Merkle head |
seq() |
Current sequence number |
checkpoint() |
Explicit checkpoint |
log(limit) |
Recent write log |
health() |
Server health |
ping() |
Boolean reachability check |
list_databases() |
All databases on server |
create_database() |
Create this database |
drop_database() |
Drop this database |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nedb_engine_client-1.0.2.tar.gz.
File metadata
- Download URL: nedb_engine_client-1.0.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8267d51cbfead886e5f3549a15cb8b053cfc560cbf5c216d285c3fba804cb4a
|
|
| MD5 |
b04e3fcc15e9e98d4b0d098e00d6094d
|
|
| BLAKE2b-256 |
5936f96e787e55d81fba96acbc96b8e8c54d8c2c015ffa26f55c588e25c89959
|
File details
Details for the file nedb_engine_client-1.0.2-py3-none-any.whl.
File metadata
- Download URL: nedb_engine_client-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7de3d346bc719b0a3ce73626487168ed28f72ee0db9dfd4bd31f7bf9cc4dcd3e
|
|
| MD5 |
3d77fea0180342ec60bda2f029d22b0d
|
|
| BLAKE2b-256 |
7dee1d3180f697b2ade5cf37db0ab66dc8b2080e78b7b67c794d1854245983d3
|