Python SDK for MonkeyHub — Backend as a Service for AI teams
Project description
MonkeyHub Python SDK
Python SDK for MonkeyHub — Backend as a Service for AI teams.
Install
pip install monkeyhub
Quickstart
from monkeyhub import Monkey, PutOptions
m = Monkey("mk_live_your_key_here")
# Collections (MonkeyDB)
users = m.collection("users")
users.save({"id": "1", "name": "Alice", "role": "admin"})
user = users.find_one("1")
# Vector search (MonkeySearch)
docs = m.search("docs", fields=["title", "body"])
docs.upsert({"id": "1", "title": "Getting Started", "body": "Welcome to MonkeyHub"})
results = docs.query("getting started")
# Tasks (MonkeyTasks)
tasks = m.tasks("emails")
tasks.run({"payload": {"to": "alice@example.com", "template": "welcome"}})
# File storage (MonkeyBuckets)
bucket = m.bucket("uploads")
with open("photo.jpg", "rb") as f:
bucket.put("photo.jpg", f.read(), PutOptions(content_type="image/jpeg"))
url = bucket.get_url("photo.jpg")
# Email (MonkeyMail)
mail = m.mail()
mail.send(from_addr="hello@example.com", to="alice@example.com", subject="Hi", text="Hello!")
# Compute boxes (MonkeyBox)
box = m.boxes.create({"name": "dev-box", "image": "default"})
result = box.exec("echo hello")
print(result.stdout)
Context Manager
with Monkey("mk_live_your_key_here") as m:
col = m.collection("test")
col.save({"id": "1", "value": "hello"})
Documentation
Full documentation at monkeyhub.ai/docs/sdk/python.
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
monkeyhub-0.2.0.tar.gz
(24.6 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
monkeyhub-0.2.0-py3-none-any.whl
(22.3 kB
view details)
File details
Details for the file monkeyhub-0.2.0.tar.gz.
File metadata
- Download URL: monkeyhub-0.2.0.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4430a2c7cb4667f4d2da36f3a49af631ef023b1d06bcd138fcef920a38d5742a
|
|
| MD5 |
a2d298c0bcb68828314094fe15838348
|
|
| BLAKE2b-256 |
796318f025fec3366ea8603c9bf735fe3a27c3025a40463e829493df06bd2e28
|
File details
Details for the file monkeyhub-0.2.0-py3-none-any.whl.
File metadata
- Download URL: monkeyhub-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d61cd76cb0df5eb026bad85a04a2fbb9c7201f5a721e3b18af8813abbded228
|
|
| MD5 |
96143b7d02fbc3a320e9c90bd03fcd18
|
|
| BLAKE2b-256 |
298492c6c3c9dd2e103489661d6f8df81b39c30eb64b6b19af3929e892fb22e7
|