bulkllm
Enhancements over vanilla LiteLLM
bulkllm builds on top of litellm and adds a few extras:
- Automatic model registration. The package knows how to fetch the list of models from OpenAI, Anthropic, Gemini and OpenRouter and registers them with LiteLLM. Results are cached on disk so they can be reused offline.
- Centralised rate limiting. A
RateLimiterimplementation enforces RPM, TPM, input and output token limits per model (or regex group) and works with both async and sync code. - Retry‑aware completion wrappers. Thin wrappers around
litellm.completion/acompletionintegrate Tenacity retries, rate limiting and usage tracking. - Usage tracking with statistics. Per‑model usage is tracked in memory with
histograms, percentiles and cost calculations via the
UsageTrackerandUsageStathelpers. - Predefined LLM configurations. A large catalogue of model presets with cost information and convenient selection helpers is included.
Development
Always run make checku before committing.
Quick Commands
make initcreate the environment and install dependenciesmake helpsee available commandsmake autoformatformat codemake autoformat-unsafeformat code - including 'unsafe' fixesmake lintrun lintermake typecheckrun type checkermake testrun testsmake coveragerun tests with coverage reportmake checkrun all checks (format, lint, typecheck, test)make checkurun all checks (format-unsafe, lint, typecheck, test)
Code Conventions
Testing
- Use pytest (no test classes).
- Always set
match=inpytest.raises. - Prefer
monkeypatchover other mocks. - Mirror the source-tree layout in
tests/. - Always run
make checkuafter making changes.
Exceptions
- Catch only specific exceptions—never blanket
except:blocks. - Don’t raise bare
Exception.
Python
- Manage env/deps with uv (
uv add|remove,uv run -- …). - No logging config or side-effects at import time.
- Keep interfaces (CLI, web, etc.) thin; put logic elsewhere.
- Use
typerfor CLI interfaces,fastapifor web interfaces, andpydanticfor data models.
Metadata
Release files for bulkllm 0.5.12
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 |
|---|---|---|---|---|
| bulkllm-0.5.12.tar.gz | 241.6 kB | Without provenance | Details for bulkllm-0.5.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bulkllm-0.5.12-py3-none-any.whl | Python 3 | none | any | Details for bulkllm-0.5.12-py3-none-any.whl |
Total release size: 378.1 kB
Release files / bulkllm-0.5.12.tar.gz
| Download URL | bulkllm-0.5.12.tar.gz |
|---|---|
| Size | 241.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
098ba65ab7e9c1c3f72922cdb40017a24252d78fe960c9693f8b9180e62aa980
|
|
BLAKE2b-256 checksum How to use checksums |
85a394616bd5d208d60c0427a778afd52d0d39e6ac76675adc16eec72a32caf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / bulkllm-0.5.12-py3-none-any.whl
| Download URL | bulkllm-0.5.12-py3-none-any.whl |
|---|---|
| Size | 136.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca2d63747350e7714b547b85838e23b1c5b41dbffd0fe7f3d2f8e1cf3830fe45
|
|
BLAKE2b-256 checksum How to use checksums |
0b542fc030eebf5cc963cf98805cd9f5597f44be8da10b5cc6ba1b6a506e2d81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for bulkllm 0.5.12
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.