Skip to main content

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


Download files

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

Source Distribution

nedb_engine_client-1.0.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

nedb_engine_client-1.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for nedb_engine_client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c8267d51cbfead886e5f3549a15cb8b053cfc560cbf5c216d285c3fba804cb4a
MD5 b04e3fcc15e9e98d4b0d098e00d6094d
BLAKE2b-256 5936f96e787e55d81fba96acbc96b8e8c54d8c2c015ffa26f55c588e25c89959

See more details on using hashes here.

File details

Details for the file nedb_engine_client-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nedb_engine_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7de3d346bc719b0a3ce73626487168ed28f72ee0db9dfd4bd31f7bf9cc4dcd3e
MD5 3d77fea0180342ec60bda2f029d22b0d
BLAKE2b-256 7dee1d3180f697b2ade5cf37db0ab66dc8b2080e78b7b67c794d1854245983d3

See more details on using hashes here.

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