Skip to content

Installation

Ready to install Chunklet-py? Here's how.

Requirements

Chunklet-py requires Python 3.11 or newer. We recommend using Python 3.12+ for the best experience.

chunklet-py (aka chunklet)

The old chunklet package is no longer maintained. Use chunklet-py to get the latest version.

The Easy Way

The most straightforward method to install Chunklet-py is by using pip:

# Install and verify version
pip install chunklet-py -U
chunklet --version

Termux (Android)

No rust toolchain on Termux (especially python 3.13)? Pydantic-core and cryptography won't build from source. Install pre-built wheels and dependencies:

pip install typing-extensions
pip install pydantic-core --index-url https://termux-user-repository.github.io/pypi/
pip install "pydantic>=2.12.4,<2.13"
pkg install python-cryptography

And that's all there is to it! You're now ready to start using Chunklet-py.

Optional Dependencies

Chunklet-py offers optional extras for document processing, code chunking, and more. Install them like this:

  • Structured Documents: For handling .pdf, .docx, .epub, .eml, .pptx, and other document formats:
    pip install "chunklet-py[struct-doc]"
    
  • Code Chunking: For Language-agnostic code chunking features:
    pip install "chunklet-py[code]"
    
  • Self-Tuning Chunking: For self-tuning mixed text/code chunking (bundles struct-doc, code, and auto):
    pip install "chunklet-py[self-tuning]"
    
  • Auto Language Detection: For automatic language detection (lang="auto"). Uses py3langid to detect the language of your text:
    pip install "chunklet-py[lang-detect]"
    
  • Indic Languages: For splitting text in Indic languages (Assamese, Gujarati, Kannada, Nepali, Odia, Punjabi, Sanskrit, Tamil, Telugu). Note: Bengali, Malayalam, and Hindi are already covered by the default install:
    pip install "chunklet-py[indic]"
    
  • Visualization: For the interactive web-based chunk visualizer:
    pip install "chunklet-py[viz]"
    
  • All Extras: Everything:
    pip install "chunklet-py[all]"
    

The Alternative Way

For those who prefer to build from source, clone the repository and install it manually. This gives you direct access to the source code and all optional features:

git clone https://github.com/speedyk-005/chunklet-py.git
cd chunklet-py
pip install .[all]

But why would you want to do that? The pip way is so much easier.

Contributing to Chunklet-py

Interested in helping make Chunklet-py even better? Before you dive in, please take a moment to review our Contributing Guide. Here's how you can set up your development environment:

git clone https://github.com/speedyk-005/chunklet-py.git
cd chunklet-py
# For basic development (testing, linting)
pip install -e ".[dev]"
# For documentation development
pip install -e ".[docs]"
# For comprehensive development (including all optional features)
pip install -e ".[dev-all]"

These commands install Chunklet-py in editable mode, so source changes take effect immediately. The [dev], [docs], and [dev-all] options include dependencies for specific development tasks.

Now, go forth and code! And remember, good developers always write tests. (Even in a Python project, we appreciate all forms of excellent code examples!)