Skip to main content

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.box.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


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.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

monkeyhub-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file monkeyhub-0.1.0.tar.gz.

File metadata

  • Download URL: monkeyhub-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for monkeyhub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6430faea89fe649abf2734578610afe7d927b297c88b6af8d50a63da5d5040bf
MD5 185abd45ff1cbcebfad061bc070e69ae
BLAKE2b-256 a19b00d007cd9d9ceaa42067194abec5006fe58b5e499c0d0d0b6436130fd740

See more details on using hashes here.

File details

Details for the file monkeyhub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: monkeyhub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for monkeyhub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4666f05480544b881c10f0bb4f514559599033b6e8629a2b6ad5f5de6a493a17
MD5 c5e43b5da225ae4e4cb756a449ce52f9
BLAKE2b-256 cd20588a35a419d7b9ed2d73551fcaab7a1a85b60c79f38267bcd75418f975a4

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