Skip to main content

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() -> bool
  • put(table_id, key, value) -> None
  • get(table_id, key) -> (value, found)
  • delete(table_id, key) -> None
  • batch_put(table_id, items) -> None
  • scan(table_id, start_key, end_key) -> [(key, value), ...]
  • stats() -> dict

License

MIT

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

db6py-5.3.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

db6py-5.3.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file db6py-5.3.1.tar.gz.

File metadata

  • Download URL: db6py-5.3.1.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

Hashes for db6py-5.3.1.tar.gz
Algorithm Hash digest
SHA256 b8d9f56dbdc5106d3040bc48e0bf78ae6efa8c06e24e7f42d341b524bb900f0c
MD5 89beabd1392e7d7ec0b359a563cd8c13
BLAKE2b-256 3c3feed968333a88e43671899df717f6f4a3cc94acd95e2f53ff77c5db61d97f

See more details on using hashes here.

File details

Details for the file db6py-5.3.1-py3-none-any.whl.

File metadata

  • Download URL: db6py-5.3.1-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

Hashes for db6py-5.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26375ddc942bdfde47959c5edb44cdaa76ac0a13cbf9d1f56b05576298af019d
MD5 89588e95bcb515848c46a6601300c1c7
BLAKE2b-256 2d6f978699addaa31eccc94b4c73f0d713f3072b58ed8655bea2e6854c73c4a9

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