GoodMem's Convenient SDK for Python
Project description
GoodMem Python SDK II
A Python SDK designed to be easy to use and easy to maintain. OpenAI-style API with auto-inference of model parameters, streaming retrieval, async support, and auto-pagination.
To see how this SDK compares to the previous goodmem-client SDK, see Then vs Now.
Installation
pip install goodmem
Usage
from goodmem import GoodMemClient
client = GoodMemClient(
base_url="http://localhost:8080",
token="your-api-token"
)
embedder = client.embedders.create(
display_name="OpenAI Embedder",
model_identifier="text-embedding-3-large",
api_key="sk-your-openai-key",
)
print(f"Created: {embedder.embedder_id}")
How It Works
The SDK has two layers:
- Generated layer (
goodmem/_generated/models/) — Pydantic v2 models auto-generated from the server's OpenAPI spec viaopenapi-generator. These define request/response schemas. - Convenience layer (
goodmem/api/,goodmem/client.py, etc.) — Hand-written wrapper that adds model registry auto-inference, parameter forwarding, streaming, pagination, and a clean client interface. Users never directly import from_generated/.
The convenience layer transforms the raw generated SDK into something pleasant to use: client.embedders.create(model_identifier="...", api_key="...") instead of manually constructing nested request objects.
Documentation
- Build a basic RAG agent
- API reference
- Old vs new SDK
- Design and maintenance guide — for developers understanding the architecture and re-generation workflows
TODO
- Add CI/CD pipeline to publish to PyPI. Integrate into ../build_all.sh and build_client.sh.
- Add
gemini-embedding-001to embedder registry once backend addsOPENAI_COMPATIBLEtoProviderType. - Add Anthropic, Google, Cohere, and Mistral LLMs to registry once backend adds matching
LLMProviderTypevalues.
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 goodmem-0.1.3.tar.gz.
File metadata
- Download URL: goodmem-0.1.3.tar.gz
- Upload date:
- Size: 67.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d215784fb958857f7e5ef6979dd337f1dad2ce3cc69bb9369f6a939334b0c2
|
|
| MD5 |
cf37d144e9b89dec0aeafcd6d0da11ed
|
|
| BLAKE2b-256 |
3a4c099d3f39413b63120cd7f407849f7c5d34bf3ee47726c2ba4da154a105a7
|
File details
Details for the file goodmem-0.1.3-py3-none-any.whl.
File metadata
- Download URL: goodmem-0.1.3-py3-none-any.whl
- Upload date:
- Size: 186.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d25dcec94e3478edb1cf686e562891d8b22e725f0464d47f48614b8e55b518e
|
|
| MD5 |
b5e18174b75d1b45e822ff2a6214f096
|
|
| BLAKE2b-256 |
4fe1a6356bbf2da34d0833b10471fbe11ee77056661839fb1e169268fff7ff31
|