Shared translation infrastructure — ToolboxClient, error hierarchy, base schemas
Project description
Django Utils Translator
Shared translation infrastructure for Volkanos translator modules: HTTP client for the remote AI toolbox, unified error hierarchy, base Pydantic request/response schemas, HTML sanitization, and DRF error mapping. Pure library code — no models, no migrations, no endpoints.
Quick Start
Requires Python 3.11+.
make install # uv sync, incl. extras
make test # pytest (respx-mocked httpx, no database)
Other commands
make check # ruff check + format-check
make fix # auto-fix lint + format
Usage
Add django_utils_translator to INSTALLED_APPS and set AI_TOOLBOX_BASE_URL +
AI_TOOLBOX_API_KEY in settings.
from django_utils_translator.clients import ToolboxClient
with ToolboxClient() as client:
estimate = client.estimate(items)
Details
See AGENTS.md for architecture, error hierarchy, and settings reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file entirius_django_utils_translator-2.0.0.tar.gz.
File metadata
- Download URL: entirius_django_utils_translator-2.0.0.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bacabbd4b10d3f13b3e8f9c320fe6b605e155ec5753ee8c3c5f3da57cd83c490
|
|
| MD5 |
4915a76a42435a627ad2bb9801cb3b3b
|
|
| BLAKE2b-256 |
c81ad14c23aa0a1a9a772eed3dfc920f1aa07ead8a86e688dea573324c404fbb
|
File details
Details for the file entirius_django_utils_translator-2.0.0-py3-none-any.whl.
File metadata
- Download URL: entirius_django_utils_translator-2.0.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7412e7331f785d3922e48bc8b206c0e44df85a6377631fc74242d1fc5741c19
|
|
| MD5 |
abaed4374622eaf5f8c402182e1b093b
|
|
| BLAKE2b-256 |
f1bbfe3d692498cbbb275fb0519a6683ae024f31cdfcde0a2c114659d9d7d2e4
|