ragchunker
A modular Python package for Retrieval-Augmented Generation (RAG) preprocessing. It supports:
- File Ingestion: Load documents from various formats (TXT, PDF, DOCX, PPTX, images with OCR, audio with Whisper, CSV/Excel/Parquet, HTML, JSON, ZIP/TAR).
- Chunking: Split documents into chunks using fixed-length, semantic, or recursive strategies.
- Provenance: Track metadata, checksums, and token counts for chunks.
- Embeddings: Generate embeddings using Sentence-Transformers or OpenAI.
- Storage: Save chunks and embeddings to JSONL, Parquet, SQLite, NumPy, or FAISS; optional integration with Pinecone or ChromaDB.
Installation
Install the core package:
pip install ragchunker
For Testing:
from ragchunker.rag_pipeline import run_rag_pipeline
from ragchunker.storage import store_from_result
VECTOR_DB = "chroma" # "faiss" or "chroma"
## For Open Source Embeddings
result = run_rag_pipeline(
data_dir="data", # Folder with your PDFs, docs, or txt files
output_dir="output", # Where JSONL, Chunks and embeddings will be saved
chunk_strategy="semantic", # or "fixed", "recursive"
chunk_size=800,
overlap=100,
embed_model="all-MiniLM-L6-v2", # or any other
embed_provider="sentence-transformers",
openai_api_key=None # or "sk-your-openai-key" if using OpenAI
)
print("\n✅ Pipeline executed successfully!")
# For Open AI Embeddings
result = run_rag_pipeline(
data_dir="data", # Folder with your PDFs, docs, or txt files
output_dir="output", # Where JSONL, Chunks and embeddings will be saved
chunk_strategy="semantic", # or "fixed", "recursive"
chunk_size=800,
overlap=100,
embed_model="text-embedding-3-small", # or any other
embed_provider="openai",
openai_api_key="" # or "sk-your-openai-key" if using OpenAI
)
print("\n✅ Pipeline executed successfully!")
print(f"\nStoring embeddings + chunks to: {VECTOR_DB}")
store_info = store_from_result(result, VECTOR_DB)
print("Store info:", store_info)
print("Done.")
Metadata
Release files for ragchunker 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ragchunker-0.1.4.tar.gz | 27.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ragchunker-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.0 kB
Release files / ragchunker-0.1.4.tar.gz
| Download URL | ragchunker-0.1.4.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6cf4e3630919268bb527d8fbe6c6b068b8bb7807907ea33e894665559355ae9
|
|
BLAKE2b-256 checksum How to use checksums |
ba29dc9cc81cb71f67a36611f50ba6fc8bc5cbe1d6bec24a875d92088cccc6da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / ragchunker-0.1.4-py3-none-any.whl
| Download URL | ragchunker-0.1.4-py3-none-any.whl |
|---|---|
| Size | 25.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac675efbec609d4658b3501f65d621184f05605b4b98d020d1832fe8a697cf55
|
|
BLAKE2b-256 checksum How to use checksums |
61ba7d27ddbdd2c955ff37a878251fea2fed1f2e61e81bfd7b77189cd96a1c72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for ragchunker 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.