Metadata-Version: 2.4
Name: goodmem-client
Version: 1.2.0
Summary: API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support.
Home-page: https://github.com/PAIR-Systems-Inc/goodmem
Author: GoodMem API Support
Author-email: support@goodmem.io
License: Apache 2.0
Project-URL: Bug Reports, https://github.com/PAIR-Systems-Inc/goodmem/issues
Project-URL: Source, https://github.com/PAIR-Systems-Inc/goodmem/tree/main/clients/python
Project-URL: PyPI, https://pypi.org/project/goodmem-client/
Keywords: OpenAPI,OpenAPI-Generator,GoodMem API,vector,embeddings,memory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Description-Content-Type: text/markdown
Requires-Dist: urllib3>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: summary

# goodmem-client

[![PyPI version](https://img.shields.io/pypi/v/goodmem-client.svg)](https://pypi.org/project/goodmem-client/)
API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1
- Package version: 1.2.0
- Generator version: 7.13.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://goodmem.io/support](https://goodmem.io/support)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

You can install the package directly from PyPI:

```sh
pip install goodmem-client
```

If you prefer uv:

```sh
uv pip install goodmem-client
```

Then import the package:
```python
import goodmem_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import goodmem_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

from goodmem_client.api import APIKeysApi
from goodmem_client.configuration import Configuration
from goodmem_client.api_client import ApiClient
from goodmem_client.models import CreateApiKeyRequest
from goodmem_client.rest import ApiException
from pprint import pprint

# Configure the API client
configuration = Configuration()
configuration.host = "http://localhost:8080"  # Use your server URL

# Create API client
api_client = ApiClient(configuration=configuration)

# Set authentication
api_client.default_headers["x-api-key"] = "your-api-key"  # Your API key here

# Create an instance of the API class
api_instance = APIKeysApi(api_client=api_client)

# Prepare a create request with labels
create_request = CreateApiKeyRequest(
    labels={
        "environment": "development",
        "service": "chat-ui"
    }
)

try:
    # Create a new API key
    api_response = api_instance.create_api_key(create_api_key_request=create_request)
    print("API Key created successfully:")
    print(f"API Key ID: {api_response.api_key_metadata.api_key_id}")
    print(f"Raw API Key: {api_response.raw_api_key}")
except ApiException as e:
    print(f"Exception when calling APIKeysApi->create_api_key: {e}")
```

For a more comprehensive example, see the `samples` directory, particularly `apikey_sample.py` which demonstrates CRUD operations on API keys.

## Documentation for API Endpoints

All URIs are relative to *http://localhost:8080*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*APIKeysApi* | [**create_api_key**](docs/APIKeysApi.md#create_api_key) | **POST** /v1/apikeys | Create a new API key
*APIKeysApi* | [**delete_api_key**](docs/APIKeysApi.md#delete_api_key) | **DELETE** /v1/apikeys/{id} | Delete an API key
*APIKeysApi* | [**list_api_keys**](docs/APIKeysApi.md#list_api_keys) | **GET** /v1/apikeys | List API keys
*APIKeysApi* | [**update_api_key**](docs/APIKeysApi.md#update_api_key) | **PUT** /v1/apikeys/{id} | Update an API key
*EmbeddersApi* | [**create_embedder**](docs/EmbeddersApi.md#create_embedder) | **POST** /v1/embedders | Create a new embedder
*EmbeddersApi* | [**delete_embedder**](docs/EmbeddersApi.md#delete_embedder) | **DELETE** /v1/embedders/{id} | Delete an embedder
*EmbeddersApi* | [**get_embedder**](docs/EmbeddersApi.md#get_embedder) | **GET** /v1/embedders/{id} | Get an embedder by ID
*EmbeddersApi* | [**list_embedders**](docs/EmbeddersApi.md#list_embedders) | **GET** /v1/embedders | List embedders
*EmbeddersApi* | [**update_embedder**](docs/EmbeddersApi.md#update_embedder) | **PUT** /v1/embedders/{id} | Update an embedder
*MemoriesApi* | [**batch_create_memory**](docs/MemoriesApi.md#batch_create_memory) | **POST** /v1/memories/batch | Create multiple memories in a batch
*MemoriesApi* | [**batch_delete_memory**](docs/MemoriesApi.md#batch_delete_memory) | **POST** /v1/memories/batch/delete | Delete multiple memories by ID
*MemoriesApi* | [**batch_get_memory**](docs/MemoriesApi.md#batch_get_memory) | **POST** /v1/memories/batch/get | Get multiple memories by ID
*MemoriesApi* | [**create_memory**](docs/MemoriesApi.md#create_memory) | **POST** /v1/memories | Create a new memory
*MemoriesApi* | [**delete_memory**](docs/MemoriesApi.md#delete_memory) | **DELETE** /v1/memories/{id} | Delete a memory
*MemoriesApi* | [**get_memory**](docs/MemoriesApi.md#get_memory) | **GET** /v1/memories/{id} | Get a memory by ID
*MemoriesApi* | [**list_memories**](docs/MemoriesApi.md#list_memories) | **GET** /v1/spaces/{spaceId}/memories | List memories in a space
*MemoriesApi* | [**retrieve_memory**](docs/MemoriesApi.md#retrieve_memory) | **GET** /v1/memories:retrieve | Stream semantic memory retrieval
*SpacesApi* | [**create_space**](docs/SpacesApi.md#create_space) | **POST** /v1/spaces | Create a new Space
*SpacesApi* | [**delete_space**](docs/SpacesApi.md#delete_space) | **DELETE** /v1/spaces/{id} | Delete a space
*SpacesApi* | [**get_space**](docs/SpacesApi.md#get_space) | **GET** /v1/spaces/{id} | Get a space by ID
*SpacesApi* | [**list_spaces**](docs/SpacesApi.md#list_spaces) | **GET** /v1/spaces | List spaces
*SpacesApi* | [**update_space**](docs/SpacesApi.md#update_space) | **PUT** /v1/spaces/{id} | Update a space
*SystemApi* | [**initialize_system**](docs/SystemApi.md#initialize_system) | **POST** /v1/system/init | Initialize the system
*UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /v1/users/{id} | Get a user by ID


## Documentation For Models

 - **[ApiKeyResponse](docs/ApiKeyResponse.md)** - API key metadata and information
 - **[BatchMemoryCreationRequest](docs/BatchMemoryCreationRequest.md)** - Request for creating multiple memories
 - **[BatchMemoryDeletionRequest](docs/BatchMemoryDeletionRequest.md)** - Request for deleting multiple memories
 - **[BatchMemoryRetrievalRequest](docs/BatchMemoryRetrievalRequest.md)** - Request for retrieving multiple memories
 - [ChunkingConfiguration](docs/ChunkingConfiguration.md)
 - **[CreateApiKeyRequest](docs/CreateApiKeyRequest.md)** - Request for creating a new API key
 - **[CreateApiKeyResponse](docs/CreateApiKeyResponse.md)** - Response containing new API key details
 - **[EmbedderCreationRequest](docs/EmbedderCreationRequest.md)** - Request for creating a new embedder
 - **[EmbedderResponse](docs/EmbedderResponse.md)** - Embedder configuration and metadata
 - [LengthMeasurement](docs/LengthMeasurement.md)
 - **[ListApiKeysResponse](docs/ListApiKeysResponse.md)** - Response containing list of API keys
 - **[ListEmbeddersResponse](docs/ListEmbeddersResponse.md)** - Response containing list of embedders
 - **[ListSpacesResponse](docs/ListSpacesResponse.md)** - Response containing list of spaces
 - **[Memory](docs/Memory.md)** - Memory object with content and metadata
 - **[MemoryCreationRequest](docs/MemoryCreationRequest.md)** - Request for creating a new memory
 - **[MemoryListResponse](docs/MemoryListResponse.md)** - Response containing list of memories
 - **[Modality](docs/Modality.md)** - Enumeration of supported modalities (TEXT, IMAGE, etc.)
 - **[ProviderType](docs/ProviderType.md)** - Enumeration of embedding providers (OPENAI, etc.)
 - [RecursiveChunkingConfiguration](docs/RecursiveChunkingConfiguration.md)
 - [SentenceChunkingConfiguration](docs/SentenceChunkingConfiguration.md)
 - [SeparatorKeepStrategy](docs/SeparatorKeepStrategy.md)
 - **[Space](docs/Space.md)** - Space object for organizing memories
 - **[SpaceCreationRequest](docs/SpaceCreationRequest.md)** - Request for creating a new space
 - **[SpaceEmbedder](docs/SpaceEmbedder.md)** - Associates an embedder with a space, including retrieval configuration
 - **[SpaceEmbedderConfig](docs/SpaceEmbedderConfig.md)** - Configuration for associating an embedder with a space
 - **[SystemInitResponse](docs/SystemInitResponse.md)** - Response from system initialization
 - **[UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)** - Request for updating an API key
 - **[UpdateEmbedderRequest](docs/UpdateEmbedderRequest.md)** - Request for updating an embedder
 - **[UpdateSpaceRequest](docs/UpdateSpaceRequest.md)** - Request for updating a space
 - **[UserResponse](docs/UserResponse.md)** - User account information


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="BearerAuth"></a>
### BearerAuth

- **Type**: Bearer authentication

<a id="ApiKeyAuth"></a>
### ApiKeyAuth

- **Type**: API key
- **API key parameter name**: x-api-key
- **Location**: HTTP header



## Contact & Support

For questions or issues with the Python client, please visit:
- GitHub repository: https://github.com/PAIR-Systems-Inc/goodmem
- PyPI package: https://pypi.org/project/goodmem-client/


## Author

support@goodmem.io


