Python SDK for DNA-DB.
Project description
DNA-DB Python SDK
Install:
pip install dnadb-python-sdk
The PyPI distribution is dnadb-python-sdk; the importable package is still dnadb.
Quick start:
from dnadb import DNAdb, DNAdbClientConfig
db = DNAdb(DNAdbClientConfig(host="127.0.0.1", port=8787, database="default"))
posts = db.collection("posts")
posts.insert({"id": 1, "title": "Hello", "status": "published"})
rows = posts.where("status", "=", "published").limit(10).fetch()
Configure indexes:
db.collection("posts").configure(
sort_indexes=["updated_at", "created_at"],
exact_string_fields=["slug", "status"],
)
Integration test (requires running server):
DNADB_URL=http://127.0.0.1:8787 python -m unittest tests/test_integration.py
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 dnadb_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: dnadb_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f5e08661bdfd78da5b178a7858307ee2ea5b5af26138a6f37b8549ff6d35936
|
|
| MD5 |
8f1d87b8ecdd178b1f3cc77b12548fc1
|
|
| BLAKE2b-256 |
4bd9781e7acac9a95a0c4339ea447e8e1815859ed91894c474432952db503ed7
|
File details
Details for the file dnadb_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dnadb_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64ccbf3dd53bb1dc20ed8c603d36fa662823b7bd0dc1d7e6a6cf4e9e31adaeca
|
|
| MD5 |
565234d818f512d311f8a9b4b00ae67c
|
|
| BLAKE2b-256 |
0678f1f3257f68009af64f79f786be8c6defc84fac314ef4e6ea4d0778a690d4
|