AILabel
A tool for creating and managing labeled datasets for AI training.
Features
- Create and manage topics (categories for classification)
- Label text payloads within topics
- Predict labels for new data using AI (Google Gemini)
- Fast, Unix-style CLI with streaming and batch processing support
Quickstart
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install ailabel
uv tool install ailabel
# Set your gemini api key
export GOOGLE_API_KEY="AIz..."
# Example labelling
label "This product is amazing" --topic=sentiment --as=positive
label "This product is horrible" --topic=sentiment --as=negative
# Test the labelling
label -t sentiment "I'm not sure how i feel. i don't like it"
# negative
Installation
From PyPI
# Install from PyPI using uv
uv pip install ailabel
# For development, install test dependencies
uv pip install "ailabel[test]"
From Source
# Clone the repository
git clone https://github.com/thornewolf/ailabel.git
cd ailabel
# Install the package using uv
uv pip install -e .
# For development, install test dependencies
uv pip install -e ".[test]"
Usage
# Create a new topic
label topics new sentiment
# List all topics
label topics list
# Get information about a topic
label topics info sentiment --labels
# Label a payload
label label "This product is amazing!" --topic=sentiment --as=positive
# Label from stdin
echo "This product is amazing!" | label label - --topic=sentiment --as=positive
# Interactive labeling
label label --topic=sentiment --interactive
# JSON output format
label label "Product was great" --topic=sentiment --as=positive --json
# Predict a label for a new payload
label predict "I love this product" --topic=sentiment
# Predict from stdin and get JSON output
echo "I love this product" | label predict - --topic=sentiment --json
# Process multiple items in batch mode
cat items.txt | label predict - --topic=lang-or-animal --batch
# Show debug information
label --debug
Environment Variables
Create a .env.secret file with the following variables or export directly:
GOOGLE_API_KEY=your_gemini_api_key
Development
Running Tests
# Run all tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=ailabel
License
MIT
Metadata
Release files for ailabel 0.4.2
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 |
|---|---|---|---|---|
| ailabel-0.4.2.tar.gz | 15.4 kB | Without provenance | Details for ailabel-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ailabel-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for ailabel-0.4.2-py3-none-any.whl |
Total release size: 28.1 kB
Release files / ailabel-0.4.2.tar.gz
| Download URL | ailabel-0.4.2.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
040c879c42a6b0dcdd74cb4427d3b9d8eb9316d0a4f0694479b0577d2c79f054
|
|
BLAKE2b-256 checksum How to use checksums |
84aeac41c8eae5dee35bc55e0a3efc77c30a7851dd9af26d7a38e469e41383e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / ailabel-0.4.2-py3-none-any.whl
| Download URL | ailabel-0.4.2-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e29262b7f332200fbe952796855a44693ac7a3f6acfb6d9aab9e704d43ba9ddf
|
|
BLAKE2b-256 checksum How to use checksums |
ee62e7889e46d8aa12e6efee7f8681fc562cad40da36293c7cb2999f80cf8b13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Security for ailabel 0.4.2
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.