Skip to main content

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

At this point, we only publish to TestPyPI.

pip install --index-url https://test.pypi.org/simple/ 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 via openapi-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

TODO

  1. Add CI/CD pipeline to publish to PyPI. Integrate into ../build_all.sh and build_client.sh.
  2. Add gemini-embedding-001 to embedder registry once backend adds OPENAI_COMPATIBLE to ProviderType.
  3. Add Anthropic, Google, Cohere, and Mistral LLMs to registry once backend adds matching LLMProviderType values.

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

goodmem-0.1.2.tar.gz (66.8 kB view details)

Uploaded Source

Built Distribution

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

goodmem-0.1.2-py3-none-any.whl (184.6 kB view details)

Uploaded Python 3

File details

Details for the file goodmem-0.1.2.tar.gz.

File metadata

  • Download URL: goodmem-0.1.2.tar.gz
  • Upload date:
  • Size: 66.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for goodmem-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5941399cef960634aaffe8c7ae1f82d92ac9aeb0d012ede29c51fef691caeedc
MD5 c2f2de360075eab3d14c2dabbba8c732
BLAKE2b-256 830368bf52ba90484d7449c79ec15c8f840e453c2a26c7c257c079d049b4a8e6

See more details on using hashes here.

File details

Details for the file goodmem-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: goodmem-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 184.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for goodmem-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7903c40d74b4c054da4bf96695f191e8aeb619160694d4cd01dae195d92cd373
MD5 01c2071cf3c6d2ec831a67507bac2c64
BLAKE2b-256 17b048ab610adaa3b21facae26110e1cf1e7360f544406037c7938328f762f66

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