{"id":15008934,"url":"https://github.com/rtix/pyyandextranslateapi","last_synced_at":"2025-10-03T17:31:25.083Z","repository":{"id":161497861,"uuid":"150987600","full_name":"rtix/pyYandexTranslateAPI","owner":"rtix","description":"[DEPRECATED] Python library for Yandex Translate API","archived":true,"fork":false,"pushed_at":"2020-02-01T10:30:25.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-29T16:23:00.659Z","etag":null,"topics":["python","python-2","python-3","python-library","requests","translate","yandex","yandex-translate","yandex-translate-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-30T17:07:40.000Z","updated_at":"2023-01-28T10:06:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"6358f85a-0e50-48c7-bdb6-bf26009daf52","html_url":"https://github.com/rtix/pyYandexTranslateAPI","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtix%2FpyYandexTranslateAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtix%2FpyYandexTranslateAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtix%2FpyYandexTranslateAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtix%2FpyYandexTranslateAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtix","download_url":"https://codeload.github.com/rtix/pyYandexTranslateAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235165449,"owners_count":18946240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python-2","python-3","python-library","requests","translate","yandex","yandex-translate","yandex-translate-api"],"created_at":"2024-09-24T19:21:47.201Z","updated_at":"2025-10-03T17:31:19.797Z","avatar_url":"https://github.com/rtix.png","language":"Python","readme":"# pyYandexTranslateAPI\nPython library for Yandex Translate API. Available for both Python 2 and Python 3\n\n# Get pyYandexTranslateAPI\n```\npip install pyyandextranslateapi\n```\n\n# Usage\nIt's very simple to use. There is only one class: Translate\n\n## Import\n``` python\nfrom Yandex import Translate\n```\n\n## Initialize\nInitialize your Translate with your API key for Yandex.Translate.\nYou can get it for free on https://translate.yandex.com/developers/keys.\n``` python\nt = Translate(api_key=API_KEY)\n```\nJust in case, you can change your key any moment:\n``` python\nt.set_key(OTHER_API_KEY)\n```\n\n## Use it\n### Get list of supported languages\n``` python\nt.get_langs()\n# {'af': 'Afrikaans', 'am': 'Amharic', 'ar': 'Arabic', ...}\n```\nThere is an optional parameter `ui` here which is for language of definitions of language codes:\n``` python\nt.get_langs(ui='ru')\n# {'af': 'Африкаанс', 'am': 'Амхарский', 'ar': 'Арабский', ...}\n```\n\n### Detect the language of text\n``` python\nt.detect(text='Здравствуйте!')\n# ru\n```\nThere is an optional parameter `hint` where you can pass list of hints, if you have suggestions about text language:\n``` python\nt.detect('Здравствуйте!', hint=['ru', 'tt'])\n# ru\n```\nBut it's not the list from where API will choose language! API can ingore your hints if he thinks that you are wrong:\n``` python\nt.detect('Hello!', ['ru', 'tt'])\n# en\n```\n\n### Translate text\n``` python\nt.translate(text='Hello!', lang_to='ru')\n# Здравствуйте!\n```\nThere is an optional parameter `lang_from` where you can pass language of original text:\n``` python\nt.translate('Hello!', 'ru', lang_from='en')\n# Здравствуйте!\n```\n\n## Exceptions\nIf something went wrong, you will face exceptions:\n- `InvalidAPIKeyError` : Invalid API key\n- `BlockedAPIKeyError` : Blocked API key\n- `DailyLimitExceededError` : Exceeded the daily limit on the amount of translated text\n- `TextSizeExceededError` : Exceeded the maximum text size\n- `UntranslatableTextError` : The text cannot be translated\n- `DirectionNotSupportedError` : The specified translation direction is not supported\n- `YandexTranslateError` : Other kind of error\n\n## For more information\n### About API\nhttps://tech.yandex.com/translate/doc/dg/concepts/about-docpage/\n\n### About this library\nradif.tazetdinov@mail.ru\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtix%2Fpyyandextranslateapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtix%2Fpyyandextranslateapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtix%2Fpyyandextranslateapi/lists"}