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.9.tar.gz (21.7 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.9-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qmem-0.0.9.tar.gz
  • Upload date:
  • Size: 21.7 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.9.tar.gz
Algorithm Hash digest
SHA256 a01fa4c1bbb2c4d2d61b9fde2159f22328b5b8cdf62f0b082539bd634933bbff
MD5 c6cda6d59e6b89ef57b1d545578026e6
BLAKE2b-256 942d9319c683a8d57b51b9f029229f480480f41e1c10a0e6ce4c5f5db92a3f2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qmem-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 24.3 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bb6790c3ca0e6b1788eaa1a4818f204716d1ba2ebc9bcf2461eeaba9dee26920
MD5 93824a2f5565aea3ec7b386743d8036d
BLAKE2b-256 f91abfb21831f44494d4a59a4d9e1343d636876db390f9f80ad37959b661ec39

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