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

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 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.3.tar.gz (67.9 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.3-py3-none-any.whl (186.2 kB view details)

Uploaded Python 3

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

Hashes for goodmem-0.1.3.tar.gz
Algorithm Hash digest
SHA256 71d215784fb958857f7e5ef6979dd337f1dad2ce3cc69bb9369f6a939334b0c2
MD5 cf37d144e9b89dec0aeafcd6d0da11ed
BLAKE2b-256 3a4c099d3f39413b63120cd7f407849f7c5d34bf3ee47726c2ba4da154a105a7

See more details on using hashes here.

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

Hashes for goodmem-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9d25dcec94e3478edb1cf686e562891d8b22e725f0464d47f48614b8e55b518e
MD5 b5e18174b75d1b45e822ff2a6214f096
BLAKE2b-256 4fe1a6356bbf2da34d0833b10471fbe11ee77056661839fb1e169268fff7ff31

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