The official Python SDK for AnkhDB - Real-time Multi-tenant BaaS.
Project description
ankhdb
The official Python SDK for AnkhDB - A real-time, multi-tenant Backend-as-a-Service.
Installation
pip install ankhdb
Usage
Initialize the Client
You'll need your Project API Key from the AnkhDB Dashboard.
from ankhdb import AnkhDB
db = AnkhDB(api_key="YOUR_API_KEY", base_url="http://localhost:5000")
Authentication
Manage your app's end-users seamlessly.
# Register
response = db.register("user@example.com", "securepassword")
# Login
db.login("user@example.com", "securepassword")
# Logout
db.logout()
Database Operations
AnkhDB uses a flexible NoSQL-on-SQL structure.
# Insert a document into 'posts' collection
new_post = db.from_collection("posts").insert({
"title": "Hello from Python",
"content": "AnkhDB is great!"
})
# Fetch all posts
posts = db.from_collection("posts").select()
# Get by ID
my_post = db.from_collection("posts").get("doc-id")
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
ankhdb-2.0.0.tar.gz
(4.2 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
File details
Details for the file ankhdb-2.0.0.tar.gz.
File metadata
- Download URL: ankhdb-2.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c8d6bcdc141dd3f871735dea43395d997d5e52d0d43d5a8e4cc566c9e513419
|
|
| MD5 |
a2eb9608534cde5410cec20112dbf475
|
|
| BLAKE2b-256 |
141979d71592e627ac16f7ad34483c5a158e2ecfb8d788e40e3b607c1788f196
|
File details
Details for the file ankhdb-2.0.0-py3-none-any.whl.
File metadata
- Download URL: ankhdb-2.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a788d709353735c11f79ddf91ced372ef521f73fa9f25cc24463c04cd9f69e2
|
|
| MD5 |
df67a4e36d44e2b446ce48febf652c83
|
|
| BLAKE2b-256 |
51cf7d499efefe1fd64daa66d761a6c358202ada16c4700b1993517a7b286610
|