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

Uploaded Python 3

File details

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

File metadata

  • Download URL: qmem-0.0.7.tar.gz
  • Upload date:
  • Size: 16.6 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.7.tar.gz
Algorithm Hash digest
SHA256 549b37ff25db047c1551cec54bfa6ef02da0f9ce5e75c82e328009b871fad754
MD5 a37ce75ff597f0c41307dd5e4d4c0422
BLAKE2b-256 3cf6375403032c34baaa08ae689e9e0031e8b2c5358f55800d844bbb4d5a9a2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qmem-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d0a280f2574ecd79d62e7e1d7b61a5227eaad0574d3b5478c0a07c3b63dd4854
MD5 09b829d76377a60abaafd4557b375831
BLAKE2b-256 ed45c12f02a7edf81170a17d593c9e39439d2bee1c2cc92de57103cf08c78fcf

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