Skip to main content

A reusable RAG package and optional Streamlit app for academic question answering.

Project description

allyoucanRAG

This repository contains the allyoucanrag package, published under the public-facing brand name allyoucanRAG. The RAG core is packaged as a reusable Python library, while the Streamlit UI remains available as an optional frontend.

What the project provides

  • The allyoucanRAG package for reusable academic RAG workflows.
  • A Streamlit QA app for course-material and user-uploaded PDF retrieval.
  • A dual-vector-store RAG workflow based on Chroma and LangChain.
  • Runtime-managed data directories for uploads, vector stores, and local config.

Important packaging note

The following runtime data is intentionally excluded from package distributions:

  • CourseMaterials/
  • UserUploads/
  • chroma_db/
  • config.json
  • .streamlit/secrets.toml

This means your course materials are treated as external runtime data, not packaged assets. That matches your PyPI goal.

Current layout

MAC-Academy-QA-System/
├── app.py
├── pyproject.toml
├── MANIFEST.in
├── requirements.txt
├── config.example.json
├── src/
│   └── allyoucanrag/
│       ├── __init__.py
│       ├── batch_upload_helper.py
│       ├── config.py
│       ├── document_manager.py
│       ├── exceptions.py
│       ├── paths.py
│       ├── rag_system.py
│       ├── streamlit_app.py
│       └── utils.py
└── CourseMaterials/

Installation

Local development

pip install -r requirements.txt

Install the package only

pip install .

Install the package with the Streamlit frontend

pip install ".[streamlit]"

After you publish to PyPI, the install command will become:

pip install "allyoucanrag[streamlit]"

The public-facing brand is allyoucanRAG. The PyPI distribution name and the Python import path are both allyoucanrag.

CLI usage

After installing the package, start the interactive CLI with:

allyoucanrag start

The CLI can update API keys, upload supported text documents, and ask questions against the knowledge base.

Configuration

The package resolves API keys in this order:

  1. Streamlit secrets
  2. Environment variables
  3. config.json

Example local config.json:

{
  "OpenAIAPIKey": "your-openai-api-key",
  "LangChainAPIKey": "your-langchain-api-key"
}

Supported environment variables:

  • OPENAI_API_KEY
  • LANGCHAIN_API_KEY
  • MAC_ACADEMY_QA_HOME

If MAC_ACADEMY_QA_HOME is set, runtime directories are resolved from that base path. Otherwise the current working directory is used.

Run the Streamlit app

streamlit run app.py

Use as a package

from allyoucanrag import DualVectorStoreRAG, resolve_runtime_paths

runtime_paths = resolve_runtime_paths(base_docs_dir="D:/external-course-materials")
rag = DualVectorStoreRAG(runtime_paths=runtime_paths)
rag.initialize_base_vectorstore()
rag.initialize_user_vectorstore()

Runtime data directories

By default, the package expects these runtime paths under the active base directory:

  • CourseMaterials/
  • UserUploads/
  • chroma_db/base/
  • chroma_db/user/
  • config.json

These are not installed into site-packages and should be managed by the runtime environment.

Build distributions

python -m build --sdist --wheel

The generated files appear in dist/.

Publish checklist

  1. Choose and add a real LICENSE file.
  2. Verify README.md renders correctly on PyPI.
  3. Build with python -m build --sdist --wheel.
  4. Upload to TestPyPI first.
  5. Upload to PyPI.

Detailed release steps are in DEPLOYMENT.md.

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

allyoucanrag-0.1.1.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

allyoucanrag-0.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file allyoucanrag-0.1.1.tar.gz.

File metadata

  • Download URL: allyoucanrag-0.1.1.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for allyoucanrag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 383ff9afcb0043de745d520bc2274c0d1f731af5ced78138cbe076efe6e5d216
MD5 e0a4376c8349d92b2d9ae177c96686c9
BLAKE2b-256 dd1947d9150d3fb48a1cfc14b2b884b27bfe7ac6ecb92e6bda659dba28a77709

See more details on using hashes here.

File details

Details for the file allyoucanrag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: allyoucanrag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for allyoucanrag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cb8664ff8b12feb4651525368aa1eedb02439287ccf9471a079770f07284a3f
MD5 1c0d89054453927dffd1b8769d850497
BLAKE2b-256 e2a71aba3b6ab12f120249313f12b47551c0047b09d195ce8c4ec62ba9b799f1

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