NextGenDB SDK
Usage Example
from next_gen_db_sdk import NextGenDBClient, NextGenDBError, NotFoundError
# Initialize the client with the base URL of the next-gen-db server
client = NextGenDBClient(base_url="http://localhost:8047")
# --- Document operations ---
try:
# Create a document
client.create_document("user_1", {"name": "John Doe", "age": 30})
# Retrieve the document
document = client.get_document("user_1")
print("Document retrieved:", document)
# Update the document
client.update_document("user_1", {"name": "John Doe", "age": 31})
# Delete the document
client.delete_document("user_1")
except NotFoundError as e:
print(f"Error: {e}")
except NextGenDBError as e:
print(f"General error: {e}")
# --- Graph operations ---
try:
# Add a node
client.add_node("person_1", {"name": "Alice", "age": 25})
# Add an edge (relationship)
client.add_edge("person_1", "person_2", "friends")
# Retrieve the node
node = client.get_node("person_1")
print("Node retrieved:", node)
# Retrieve the edge
edge = client.get_edge("person_1", "person_2")
print("Edge retrieved:", edge)
except NextGenDBError as e:
print(f"Graph error: {e}")
Metadata
Release files for next-gen-db-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| next_gen_db_sdk-0.1.1.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| next_gen_db_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / next_gen_db_sdk-0.1.1.tar.gz
| Download URL | next_gen_db_sdk-0.1.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55e22c64d9d34027d275d05efb6827e8389eb0d366ab4b99d51139181fc1bcfd
|
|
BLAKE2b-256 checksum How to use checksums |
531925209456407dab707e24c3ec8d2e61211776ad4c1b57ac860bb3573b4f28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / next_gen_db_sdk-0.1.1-py3-none-any.whl
| Download URL | next_gen_db_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c294f52a7025b8c7f3010d0052861c322f729b5dd3a0b5cfab7c6a04fae8870b
|
|
BLAKE2b-256 checksum How to use checksums |
457f36265eef856bb74459dd4872188952df718c39a4cb1a6e1b448e0b4d8a4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|