krira-embed
krira-embed provides a Modal-powered embedding pipeline for chunked text and upserts vectors to Pinecone.
Features
- Batch chunk ingestion from JSONL (
text, optionalmetadata, optionalid) - Distributed embedding jobs with Modal
- Pinecone upsert with deterministic ID fallback
- Simple Python client API:
KriraEmbedding
Requirements
- Python
>=3.10,<3.13 - Modal account and token (
MODAL_TOKEN_ID,MODAL_TOKEN_SECRET) - Pinecone API key (
PINECONE_API_KEY) - Chunked JSONL file (for example,
chunks.jsonl)
Installation
pip install krira-embed
Quickstart
from krira_embed import KriraEmbedding
client = KriraEmbedding(
chunk_file_path="chunks.jsonl",
pinecone_api_key="YOUR_PINECONE_API_KEY",
pinecone_index_name="YOUR_INDEX_NAME",
namespace="default",
)
result = client.embed(
worker_batch_size=12000,
parallel_jobs=6,
model_batch_size=768,
upsert_batch_size=200,
)
print(result)
Credentials model
- End users provide Pinecone credentials explicitly in code (
pinecone_api_key,pinecone_index_name). - The package does not read local
.envfor Pinecone credentials. - Modal credentials can still be supplied via environment variables (
MODAL_TOKEN_ID,MODAL_TOKEN_SECRET) or existing Modal auth setup.
Modal CLI usage
When using the Modal entrypoint directly, pass both values explicitly:
modal run main.py --index-name YOUR_INDEX_NAME --pinecone-api-key YOUR_PINECONE_API_KEY
Use .env only for your local Modal tokens if needed (see .env.example).
Local validation (maintainers)
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
License
MIT License. See LICENSE.
Metadata
Release files for krira-embed 0.1.0
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 |
|---|---|---|---|---|
| krira_embed-0.1.0.tar.gz | 10.9 kB | Without provenance | Details for krira_embed-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| krira_embed-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for krira_embed-0.1.0-py3-none-any.whl |
Total release size: 22.2 kB
Release files / krira_embed-0.1.0.tar.gz
| Download URL | krira_embed-0.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3198f07b89ae172bc229f2e878c8396516481d240ebc3bbc608c290639c85bcb
|
|
BLAKE2b-256 checksum How to use checksums |
c74444108f2fd71d3b18ad1d0c43f3e6dd46eeff1b4a21fabdb148fd3fc673b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / krira_embed-0.1.0-py3-none-any.whl
| Download URL | krira_embed-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3aee6db9dbeacacb5300855f98c8439afc681c8e14dc50acdc1b4a885c89933f
|
|
BLAKE2b-256 checksum How to use checksums |
46a61a0f48ce5f5dc11910b40f4e8d009d77bdcf3179bc00977313299f58ff09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for krira-embed 0.1.0
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.