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.6.tar.gz (16.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.6-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qmem-0.0.6.tar.gz
  • Upload date:
  • Size: 16.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.6.tar.gz
Algorithm Hash digest
SHA256 a5873b954ffb131705431675020be29d6529b4d7c0de347bf1582414541a7c70
MD5 8b48a19750128517f926d9e3b71afc4c
BLAKE2b-256 e506b5346157f27fe8d6a7f8e0b244968414af6fdb4268237bdf780d9e92f810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qmem-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e3fdbd0a3b9e1f103e04ed354aaaff41b7ec2d971edf840349c36befa26106b
MD5 e5e1fc95cbf2c8c09378ec5428053c41
BLAKE2b-256 43642f3bbd6e22627d3a0262cd63452519bdd1449ff81bb7c6e4c09bde0b5504

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