Chunkin
A Python library for document chunking and indexing into vector stores, built on LangChain.
Built on LangChain
Chunkin leverages LangChain for:
- Document Loaders: Load PDF, DOCX, TXT, MD, CSV, XLSX, PPT formats
- Text Splitters: 6 chunking strategies including semantic chunking
- Vector Stores: 50+ vector store integrations (FAISS, Chroma, Pinecone, etc.)
Learn more about LangChain's document processing capabilities.
Modules
| Module | Description |
|---|---|
chunkin |
Document chunking using LangChain text splitters |
chunkin_indexer |
Index chunks to 50+ vector stores via LangChain integrations |
chunkin_processor |
Unified end-to-end processing |
Quick Start
from chunkin_processor import DocProcessor
from langchain_openai import OpenAIEmbeddings
processor = DocProcessor(
embeddings=OpenAIEmbeddings(),
vector_store_type="faiss",
chunk_size=500,
)
processor.process_file("document.pdf")
results = processor.search("your query", k=3)
Installation
# Core only
pip install chunkin
# With OpenAI + FAISS (recommended)
pip install chunkin[core]
# With semantic chunking
pip install chunkin[semantic]
# Local vector stores (Chroma, Milvus, LanceDB, etc.)
pip install chunkin[local]
# Specific cloud providers
pip install chunkin[aws] # Amazon AWS
pip install chunkin[azure] # Microsoft Azure
pip install chunkin[gcp] # Google Cloud
# All vector stores
pip install chunkin[all]
Documentation
Supported Formats
Chunkin uses LangChain document loaders:
| Format | Extensions |
|---|---|
.pdf |
|
| Word | .docx, .doc |
| Text | .txt |
| Markdown | .md |
| CSV | .csv |
| Excel | .xlsx, .xls |
| PowerPoint | .pptx, .ppt |
Supported Vector Stores
Built on LangChain vector store integrations:
Local (No External Service)
FAISS, Chroma, Milvus, LanceDB, LambdaDB, Deep Lake, Annoy
Amazon AWS
OpenSearch, Valkey, DocumentDB
Microsoft Azure
Azure AI Search, Azure Cosmos DB, Azure Cosmos DB NoSQL
Google Cloud
Databricks Vector Search, Vertex AI Vector Search, BigQuery, AlloyDB
Other
Qdrant, Weaviate, Pinecone, MongoDB Atlas, PGVector, Astra DB, Elasticsearch, Oracle, Neo4j, SingleStore, Supabase, MyScale, Zilliz, Marqo, Vectara, Meilisearch, Typesense, and more...
See docs/indexer.md for full list.
Supported Chunking Strategies
Uses LangChain text splitters:
| Strategy | LangChain Class | Description |
|---|---|---|
recursive |
RecursiveCharacterTextSplitter | Recursively splits by paragraphs, sentences, words |
character |
CharacterTextSplitter | Simple character-based splitting |
markdown |
MarkdownTextSplitter | Markdown-aware splitting |
markdown_headers |
MarkdownHeaderTextSplitter | Split by markdown headers |
html_headers |
HTMLHeaderTextSplitter | Split by HTML header tags |
semantic |
SemanticChunker | Embedding-based semantic splitting |
See docs/strategies.md for details.
Project Structure
chunkin/
├── chunkin/ # Document chunking module
│ └── chunker.py # DocumentChunker class
├── chunkin_indexer/ # Vector store indexing module
│ └── indexer.py # DocIndexer class
├── chunkin_processor/ # Unified module
│ └── doc_processor.py # DocProcessor class
├── docs/ # MkDocs documentation
├── pyproject.toml # Package configuration
└── README.md
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Build package
python -m build
# Serve docs locally
cd docs && pip install -r requirements.txt && mkdocs serve
LangChain Resources
License
MIT License
Metadata
Release files for chunkin 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 | Actions |
|---|---|---|---|---|
| chunkin-0.1.4.tar.gz | 25.8 kB | Without provenance | Details for chunkin-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chunkin-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for chunkin-0.1.4-py3-none-any.whl |
Total release size: 57.9 kB
Release files / chunkin-0.1.4.tar.gz
| Download URL | chunkin-0.1.4.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98885fa6de19c57334932146321b8d5486ac6f1bfb5ffa176bb7b2d8a5dd1d77
|
|
BLAKE2b-256 checksum How to use checksums |
b8c67454943eecbeab67bcc1126b735f1592f6267137d4fb6e1736afbc8fa668
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / chunkin-0.1.4-py3-none-any.whl
| Download URL | chunkin-0.1.4-py3-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7616b5dc025838f97f2b34f933dd34306613e4a163fdeea15c0071ab5f525ca7
|
|
BLAKE2b-256 checksum How to use checksums |
387316b1741edcffd85f85fa55b3896627d8b2bc2d7fd2062530d5dae7eff76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for chunkin 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.