Adtr Translation Client
A simple Python client for the Adtr Translation API.
Installation
Install the client using pip:
pip install adtr_client
Usage
Use the client to translate or creatively rewrite text via the Adtr Translation API. The API accepts several languages, with English-to-Russian and Russian-to-English as the primary translation directions.
Translate English to Russian
from adtr_client import translate
result = translate(
user_id=123,
api_key="your_api_key",
text="English title to translate",
source_language="en",
target_language="ru",
)
print(result)
Use source_language="Auto" (the default) when the source language should be
detected automatically. Existing calls that only provide target_language
continue to work.
Translation text can be up to 50,000 characters. For long descriptions, set a
larger timeout if needed because the API translates them in smaller sections.
Pass optional context to identify the medium or subject without including it
in the translated result:
result = translate(
user_id=123,
api_key="your_api_key",
text="Game title to translate",
target_language="ru",
context="This is the title of an adult flash game",
)
context also works with synonymize; its title limit remains 300 characters.
Translate Russian to English
from adtr_client import translate
result = translate(
user_id=123,
api_key="your_api_key",
text="Текст для перевода",
source_language="ru",
target_language="en",
)
print(result)
Creatively rewrite in the same language
from adtr_client import synonymize
result = synonymize(
user_id=123,
api_key="your_api_key",
text="Text to rewrite",
)
print(result)
Configuration
- Obtain your
user_idandapi_keyfrom the rkn.name service - Replace the example credentials and text with your own values.
Metadata
Release files for adtr-client 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adtr_client-0.0.7.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adtr_client-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / adtr_client-0.0.7.tar.gz
| Download URL | adtr_client-0.0.7.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b4ed9552a501fc9ea7d3d440fd952bec009cce3dc5e816defdb8512fa43d85c
|
|
BLAKE2b-256 checksum How to use checksums |
5efebe7662ad7f79c2018c7c5ea622de845a94637b2aaae0966bebb109132443
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / adtr_client-0.0.7-py3-none-any.whl
| Download URL | adtr_client-0.0.7-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a7e9f4d40c151b4df047a24e91594d87ce304b4e9aac18c3f9c7e71a64eaba0
|
|
BLAKE2b-256 checksum How to use checksums |
a0ca9c2af8adbb7c06cbe80ee94fd77fe36d6b9640a9df2a2e1e930fac84e09a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|