Python SDK for Momento AI — image vectorization, face search, and CLIP embeddings with user-supplied Supabase credentials.
Project description
🧠 MomentoAI — Python SDK
MomentoAI is a lightweight Python SDK that connects to the hosted MomentoAI FastAPI backend and uses your own Supabase project to store images and embeddings.
Official PyPi published library: https://pypi.org/project/momentoai/
📦 Installation
Install MomentoAI via PyPI:
pip install momentoai
⚙️ Initialize the Client
from MomentoAI import MomentoAIClient
client = MomentoAIClient(
api_key="public-access", # default key for open access
api_url="https://momento-ai-1-42230574747.asia-south1.run.app",
# — your own Supabase credentials —
supabase_url="https://yourproject.supabase.co",
supabase_service_key="YOUR_SUPABASE_SERVICE_KEY",
supabase_bucket="YOUR_BUCKET_NAME"
)
🩺 Check Backend Status
Use .health() to verify the backend is live:
print(client.health())
Expected output:
{
"models_loaded": true
}
📸 Core SDK Functions
Below are the main operations supported by the MomentoAI SDK.
1️⃣ vectorize_image()
Uploads an image → extracts embeddings → stores them in your Supabase project.
response = client.vectorize_image(
"me.jpg",
event_id="event1",
business_id="business1"
)
print(response)
2️⃣ find_face()
Finds similar faces in your stored Supabase embeddings.
matches = client.find_face(
"person.jpg",
event_id="event1",
business_id="business1"
)
print(matches)
3️⃣ search_images()
Text → Image retrieval using CLIP embeddings.
results = client.search_images(
"a man smiling outdoors",
event_id="event1",
business_id="business1"
)
print(results)
4️⃣ list_embeddings()
Retrieve all embeddings for a specific event + business.
records = client.list_embeddings(
event_id="event1",
business_id="business1"
)
print(records)
5️⃣ delete_embedding()
Delete a specific embedding record from Supabase.
client.delete_embedding("some-embedding-id")
🪪 License
MIT License
© 2025 — Manil Modi
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
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 momentoai-0.1.2.tar.gz.
File metadata
- Download URL: momentoai-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
849f80a1064d51064b921dcdf42849027c0e0f918733fdea271da9c04fff74dc
|
|
| MD5 |
6eb554ed7e170724a41862e5b06bfc52
|
|
| BLAKE2b-256 |
72e9a566a6bf96e3c8a575a859a8f0adb6af84864d395209b446179c354d9004
|
File details
Details for the file momentoai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: momentoai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aa664a687e9657f2aed72f0ee5802a1715d249526f2565227bd2a4693987eb5
|
|
| MD5 |
0b921cf44bb2c75cd7638164c5176b84
|
|
| BLAKE2b-256 |
4248ff87f8e9bdcd3d63ffcec9dd5fdbf200fa84b803b2ed41f3a65ff604220d
|