Skip to main content

Qdrant wrapper for simple ingestion & retrieval with pluggable embeddings

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: qmem-0.0.5.tar.gz
  • Upload date:
  • Size: 16.0 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.5.tar.gz
Algorithm Hash digest
SHA256 dec5d9fc517c764d17461caef68ab3e0b76deefce93330b6b2880f7c67c794de
MD5 8006bb0bf4a7f111fbbed5e1845f6332
BLAKE2b-256 15983c156d4f3db63b3fffa945dab3671f47758afa2a798bb6e7e9aa25e1f0b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qmem-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f1b4b9e1912104fa226eff1bc0c9fb2ef915b54fec03c91d19235030e2bd48d9
MD5 35d915ff615b312aafb88abcd7c0d758
BLAKE2b-256 dc02ae7eb74186fe68b5603eb1e78f788f4498f2d5bc7eb50ec5a86498e05841

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