Skip to main content

memory library for seamless data ingestion, storage, and retrieval with customizable embedding models.

Project description

qmem

qmem for easy ingestion and retrieval with embeddings using qdrant Supports both CLI and Python API.


🚀 Installation

pip install -e .

⚙️ CLI Usage

1. Init (configure keys & embedding model)

qmem init

2. Ingest data

qmem ingest

You’ll be prompted for:

  • collection_name
  • data file path (JSON or JSONL)
  • field to embed (e.g. query, response, sql_query, doc_id)
  • payload fields (comma-separated, leave empty to keep all)

3. Retrieve results

qmem retrieve

You’ll be prompted for:

  • collection_name
  • query
  • top_k (number of results to return)

🐍 Python API

import qmem as qm

# Create a collection
qm.create(collection_name="test_learn", dim=1536, distance_metric="cosine")

# Ingest data from a file
qm.ingest(
    file="/home/User/data.jsonl",
    embed_field="sql_query",
    payload_field="query,response",  # optional, keep these fields in payload
)

# Retrieve results (pretty table by default)
table = qm.retrieve(query="list customers", top_k=5)
print(table)

📄 License

MIT

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

qmem-0.0.8.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

qmem-0.0.8-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file qmem-0.0.8.tar.gz.

File metadata

  • Download URL: qmem-0.0.8.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for qmem-0.0.8.tar.gz
Algorithm Hash digest
SHA256 2f5f4006a76b38a5e402999cee8204ed629186b4b3fffc6b062ddf713b25459e
MD5 08e079db8a12ccb892cb66757fa88e9b
BLAKE2b-256 b81048087728807ee37f56513b9181deb332005ae63314a63b0ef625655415e8

See more details on using hashes here.

File details

Details for the file qmem-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: qmem-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for qmem-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac4da66dd799ceb92c6a4904cb32dc2c65bf6d7fcb66a59fbe1a553b1f95314
MD5 088dd14a272de93a74711a8931e3b0c9
BLAKE2b-256 25fce91f8f11bfe7468ae1a6de49c4e27c6915c79141f5384c3ee6b9c7bc7187

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