Python client for db6 database
Project description
db6py
Python client for db6 database with REST and WebSocket support.
Installation
pip install db6py
With WebSocket support:
pip install db6py[websocket]
Quick Start
from db6py import Client
# Create client (REST)
db = Client("http://localhost:50052")
# Or use WebSocket
db = Client("http://localhost:50052", use_websocket=True)
# Health check
db.health()
# Key-Value operations
db.put(1, "key", "value")
value, found = db.get(1, "key")
# Batch operations
db.batch_put(1, [("k1", "v1"), ("k2", "v2")])
results = db.scan(1, "k", "k\xff")
# Statistics
stats = db.stats()
# Delete
db.delete(1, "key")
API Reference
Client(base_url, use_websocket=False)
health()-> boolput(table_id, key, value)-> Noneget(table_id, key)-> (value, found)delete(table_id, key)-> Nonebatch_put(table_id, items)-> Nonescan(table_id, start_key, end_key)-> [(key, value), ...]stats()-> dict
License
MIT
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
db6py-5.4.0.tar.gz
(4.5 kB
view details)
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
db6py-5.4.0-py3-none-any.whl
(4.3 kB
view details)
File details
Details for the file db6py-5.4.0.tar.gz.
File metadata
- Download URL: db6py-5.4.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c77cd7510bec84349851f98d1f2e6595fc62823325c2f36de3525f9277d79391
|
|
| MD5 |
40686d3b50cf0e4b1856326a55e964b6
|
|
| BLAKE2b-256 |
86c6d6e83e794027a0233f48e8f815e8838e9b7bc857faab5cb04e16b44cd506
|
File details
Details for the file db6py-5.4.0-py3-none-any.whl.
File metadata
- Download URL: db6py-5.4.0-py3-none-any.whl
- Upload date:
- Size: 4.3 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 |
c056a5d49d9d62babdfbff8c95d5041dca43ca7ce77c7a155ae730fc850ca13c
|
|
| MD5 |
647365f431d09c177c6316d2c5292d6f
|
|
| BLAKE2b-256 |
88890dfbb8cae7a352d33735b7a6f9739d7c189b7a309115fb61c3c45eaff24f
|