django-text-translator
A Django application that supports adding multiple third-party engines for text translation.
Currently, it supports the following engines:
- DeepL
- DeepLX
- OpenAI
- ClaudeAI
- Azure OpenAI
- Google Gemini
- Google Translate(Web)
- Microsoft Translate API
- Caiyun API
- Moonshot AI
Installation
- Install:
pip install django-text-translator - Add "django_text_translator" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., "django_text_translator", ] - Run
python manage.py makemigrationsandpython manage.py migrateto create the models. - Start the development server and visit the admin to add a translator.
- Translate a text:
from django_text_translator.models import OpenAITranslator openai_translator = OpenAITranslator.filter(valid=True).first() results = openai_translator.translate(text="Hello, world!",target_language="Chinese") print(results.text) # 你好,世界! print(results.tokens) # 51 - More details can be found in the models.py file.
Metadata
Release files for django-text-translator 2024.5.1
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 |
|---|---|---|---|---|
| django_text_translator-2024.5.1.tar.gz | 15.5 kB | Without provenance | Details for django_text_translator-2024.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_text_translator-2024.5.1-py3-none-any.whl | Python 3 | none | any | Details for django_text_translator-2024.5.1-py3-none-any.whl |
Total release size: 61.8 kB
Release files / django_text_translator-2024.5.1.tar.gz
| Download URL | django_text_translator-2024.5.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64aa3021cc6a71c2ade57de25a6931641aed2c3f5d391cf5b56e3201f27556e3
|
|
BLAKE2b-256 checksum How to use checksums |
646d67eb685244714389d7b2f2f2b04fbd62c7d23a9bda3df9cf575f32ecc020
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / django_text_translator-2024.5.1-py3-none-any.whl
| Download URL | django_text_translator-2024.5.1-py3-none-any.whl |
|---|---|
| Size | 46.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1304d71d9bb130a28a73a73add9ae18d47ee34c88f50927750c85d37255c853c
|
|
BLAKE2b-256 checksum How to use checksums |
cfdce0031be786c792c4cf910380d5b19f931ef5b573161c3e3e38092c0b7be2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for django-text-translator 2024.5.1
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.