{"id":42513313,"url":"https://github.com/foyoux/pygtrans","last_synced_at":"2026-01-28T14:16:56.581Z","repository":{"id":44923883,"uuid":"380164327","full_name":"foyoux/pygtrans","owner":"foyoux","description":"谷歌翻译, 支持 APIKEY 一口气翻译十万条","archived":false,"fork":false,"pushed_at":"2025-07-15T03:10:40.000Z","size":230,"stargazers_count":243,"open_issues_count":8,"forks_count":43,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-25T19:53:53.275Z","etag":null,"topics":["apikey","cloud","google","python","python-library","translate","translation","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foyoux.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,"zenodo":null}},"created_at":"2021-06-25T07:48:23.000Z","updated_at":"2025-10-17T07:23:21.000Z","dependencies_parsed_at":"2024-11-14T18:31:37.586Z","dependency_job_id":null,"html_url":"https://github.com/foyoux/pygtrans","commit_stats":{"total_commits":68,"total_committers":3,"mean_commits":"22.666666666666668","dds":"0.27941176470588236","last_synced_commit":"a30212fc73d5b3555de1dccfbcd9e44d7436cb6d"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/foyoux/pygtrans","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyoux%2Fpygtrans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyoux%2Fpygtrans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyoux%2Fpygtrans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyoux%2Fpygtrans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foyoux","download_url":"https://codeload.github.com/foyoux/pygtrans/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyoux%2Fpygtrans/sbom","scorecard":{"id":408312,"data":{"date":"2025-08-11","repo":{"name":"github.com/foyoux/pygtrans","commit":"f63220ca7eb89e8ca49f3d52f457b4b6a1c1c433"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/foyoux/pygtrans/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/foyoux/pygtrans/python-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/foyoux/pygtrans/python-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/foyoux/pygtrans/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:34","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/python-publish.yml:17","Warn: no topLevel permission defined: .github/workflows/started-notify.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/python-publish.yml:20"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.6.2 not signed: https://api.github.com/repos/foyoux/pygtrans/releases/232387017","Warn: release artifact v1.6.1 not signed: https://api.github.com/repos/foyoux/pygtrans/releases/180925285","Warn: release artifact v1.6.0 not signed: https://api.github.com/repos/foyoux/pygtrans/releases/180924221","Warn: release artifact v1.5.3 not signed: https://api.github.com/repos/foyoux/pygtrans/releases/113787417","Warn: release artifact v1.5.2 not signed: https://api.github.com/repos/foyoux/pygtrans/releases/101198354","Warn: release artifact v1.6.2 does not have provenance: https://api.github.com/repos/foyoux/pygtrans/releases/232387017","Warn: release artifact v1.6.1 does not have provenance: https://api.github.com/repos/foyoux/pygtrans/releases/180925285","Warn: release artifact v1.6.0 does not have provenance: https://api.github.com/repos/foyoux/pygtrans/releases/180924221","Warn: release artifact v1.5.3 does not have provenance: https://api.github.com/repos/foyoux/pygtrans/releases/113787417","Warn: release artifact v1.5.2 does not have provenance: https://api.github.com/repos/foyoux/pygtrans/releases/101198354"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T21:57:39.381Z","repository_id":44923883,"created_at":"2025-08-18T21:57:39.381Z","updated_at":"2025-08-18T21:57:39.381Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T13:02:32.985Z","status":"ssl_error","status_checked_at":"2026-01-28T13:02:04.945Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apikey","cloud","google","python","python-library","translate","translation","tts"],"created_at":"2026-01-28T14:16:56.509Z","updated_at":"2026-01-28T14:16:56.575Z","avatar_url":"https://github.com/foyoux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pygtrans\n\n谷歌翻译, 支持 **APIKEY**\n\n[![](https://img.shields.io/github/v/release/foyoux/pygtrans)](https://github.com/foyoux/pygtrans/releases) ![](https://img.shields.io/github/last-commit/foyoux/pygtrans) [![Downloads](https://static.pepy.tech/personalized-badge/pygtrans?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Downloads)](https://pepy.tech/project/pygtrans)\n\n## 安装\n\n[![](https://img.shields.io/pypi/pyversions/pygtrans)](https://pypi.org/project/pygtrans/)\n\n```shell\n# 推荐\npip install -U pygtrans\n```\n\n```shell\n# 可选\npip install git+ssh://git@github.com/foyoux/pygtrans.git\npip install git+https://github.com/foyoux/pygtrans.git\n```\n\n## 快速入门\n\n```python\nfrom pygtrans import Translate\n\nclient = Translate(proxies={'https': 'http://localhost:10809'})\n\n# 检测语言\ntext = client.detect('Answer the question.')\nassert text.language == 'en'\n\n# 翻译句子\ntext = client.translate('Look at these pictures and answer the questions.')\nassert text.translatedText == '看这些图片，回答问题。'\n\n# 批量翻译\ntexts = client.translate([\n    'Good morning. What can I do for you?',\n    'Read aloud and underline the sentences about booking a flight.',\n    'May I have your name and telephone number?'\n])\nassert [text.translatedText for text in texts] == [\n    '早上好。我能为你做什么？',\n    '大声朗读并在有关预订航班的句子下划线。',\n    '可以给我你的名字和电话号码吗？'\n]\n\n# 翻译到日语\ntext = client.translate('请多多指教', target='ja')\nassert text.translatedText == 'お知らせ下さい'\n\n# 翻译到韩语\ntext = client.translate('请多多指教', target='ko')\nassert text.translatedText == '조언 부탁드립니다'\n\n# 文本到语音\ntts = client.tts('やめて', target='ja')\nopen('やめて.mp3', 'wb').write(tts)\n```\n\n## 支持的语言\n\n\u003cdetails\u003e\u003csummary\u003e支持的源语言，共 242 种\u003c/summary\u003e\n\u003cp\u003e\n\n```json\n{\n  \"auto\": \"检测语言\",\n  \"ab\": \"阿布哈兹语\",\n  \"sq\": \"阿尔巴尼亚语\",\n  \"aa\": \"阿法尔语\",\n  \"ar\": \"阿拉伯语\",\n  \"alz\": \"阿卢尔语\",\n  \"am\": \"阿姆哈拉语\",\n  \"ach\": \"阿乔利语\",\n  \"as\": \"阿萨姆语\",\n  \"az\": \"阿塞拜疆语\",\n  \"awa\": \"阿瓦德语\",\n  \"av\": \"阿瓦尔语\",\n  \"ee\": \"埃维语\",\n  \"ay\": \"艾马拉语\",\n  \"ga\": \"爱尔兰语\",\n  \"et\": \"爱沙尼亚语\",\n  \"oc\": \"奥克语\",\n  \"or\": \"奥利亚语\",\n  \"om\": \"奥罗莫语\",\n  \"os\": \"奥塞梯语\",\n  \"tpi\": \"巴布亚皮钦语\",\n  \"bew\": \"巴达维语\",\n  \"ban\": \"巴厘语\",\n  \"ba\": \"巴什基尔语\",\n  \"eu\": \"巴斯克语\",\n  \"btx\": \"巴塔克卡罗语\",\n  \"bbc\": \"巴塔克托巴语\",\n  \"bts\": \"巴塔克西马隆贡语\",\n  \"bci\": \"巴乌雷语\",\n  \"be\": \"白俄罗斯语\",\n  \"bm\": \"班巴拉语\",\n  \"pag\": \"邦阿西楠语\",\n  \"pam\": \"邦板牙语\",\n  \"bg\": \"保加利亚语\",\n  \"nso\": \"北索托语\",\n  \"bem\": \"奔巴语\",\n  \"bik\": \"比科尔语\",\n  \"bal\": \"俾路支语\",\n  \"is\": \"冰岛语\",\n  \"pl\": \"波兰语\",\n  \"bs\": \"波斯尼亚语\",\n  \"fa\": \"波斯语\",\n  \"bho\": \"博杰普尔语\",\n  \"bua\": \"布里亚特语\",\n  \"br\": \"布列塔尼语\",\n  \"bo\": \"藏语\",\n  \"chm\": \"草原马里语\",\n  \"ch\": \"查莫罗语\",\n  \"ce\": \"车臣语\",\n  \"chk\": \"楚克语\",\n  \"cv\": \"楚瓦什语\",\n  \"tn\": \"茨瓦纳语\",\n  \"ts\": \"聪加语\",\n  \"fa-AF\": \"达里语\",\n  \"tt\": \"鞑靼语\",\n  \"da\": \"丹麦语\",\n  \"shn\": \"掸语\",\n  \"tet\": \"德顿语\",\n  \"de\": \"德语\",\n  \"dv\": \"迪维希语\",\n  \"dyu\": \"迪尤拉语\",\n  \"tiv\": \"蒂夫语\",\n  \"din\": \"丁卡语\",\n  \"doi\": \"多格拉语\",\n  \"ru\": \"俄语\",\n  \"ndc-ZW\": \"恩道语\",\n  \"nr\": \"恩德贝莱语（南部）\",\n  \"dov\": \"恩敦贝语\",\n  \"bm-Nkoo\": \"恩科字母（西非书面文字）\",\n  \"fo\": \"法罗语\",\n  \"fr\": \"法语\",\n  \"sa\": \"梵语\",\n  \"tl\": \"菲律宾语\",\n  \"fj\": \"斐济语\",\n  \"fi\": \"芬兰语\",\n  \"fon\": \"丰语\",\n  \"fy\": \"弗里西语\",\n  \"fur\": \"弗留利语\",\n  \"ff\": \"富拉尼语\",\n  \"kg\": \"刚果语\",\n  \"km\": \"高棉语\",\n  \"kl\": \"格陵兰语\",\n  \"ka\": \"格鲁吉亚语\",\n  \"gom\": \"贡根语\",\n  \"gu\": \"古吉拉特语\",\n  \"gn\": \"瓜拉尼语\",\n  \"cnh\": \"哈卡钦语\",\n  \"kk\": \"哈萨克语\",\n  \"ht\": \"海地克里奥尔语\",\n  \"ko\": \"韩语\",\n  \"ha\": \"豪萨语\",\n  \"nl\": \"荷兰语\",\n  \"hrx\": \"洪斯吕克语\",\n  \"ky\": \"吉尔吉斯语\",\n  \"ktu\": \"吉土巴语\",\n  \"gl\": \"加利西亚语\",\n  \"ca\": \"加泰罗尼亚语\",\n  \"gaa\": \"加语\",\n  \"cs\": \"捷克语\",\n  \"kac\": \"景颇语\",\n  \"kn\": \"卡纳达语\",\n  \"kr\": \"卡努里语\",\n  \"kha\": \"卡西语\",\n  \"kek\": \"凯克其语\",\n  \"kv\": \"科米语\",\n  \"xh\": \"科萨语\",\n  \"co\": \"科西嘉语\",\n  \"crh\": \"克里米亚鞑靼语\",\n  \"hr\": \"克罗地亚语\",\n  \"qu\": \"克丘亚语\",\n  \"ku\": \"库尔德语（库尔曼吉语）\",\n  \"ckb\": \"库尔德语（索拉尼）\",\n  \"trp\": \"廓克博若克语\",\n  \"la\": \"拉丁语\",\n  \"ltg\": \"拉特加莱语\",\n  \"lv\": \"拉脱维亚语\",\n  \"lo\": \"老挝语\",\n  \"lt\": \"立陶宛语\",\n  \"lij\": \"利古里亚语\",\n  \"li\": \"林堡语\",\n  \"ln\": \"林加拉语\",\n  \"rn\": \"隆迪语\",\n  \"luo\": \"卢奥语\",\n  \"lg\": \"卢干达语\",\n  \"lb\": \"卢森堡语\",\n  \"rw\": \"卢旺达语\",\n  \"lmo\": \"伦巴第语\",\n  \"ro\": \"罗马尼亚语\",\n  \"rom\": \"罗姆语\",\n  \"mad\": \"马都拉语\",\n  \"gv\": \"马恩岛语\",\n  \"mg\": \"马尔加什语\",\n  \"mwr\": \"马尔瓦迪语\",\n  \"mt\": \"马耳他语\",\n  \"mr\": \"马拉地语\",\n  \"ml\": \"马拉雅拉姆语\",\n  \"ms\": \"马来语\",\n  \"ms-Arab\": \"马来语（爪夷文）\",\n  \"mk\": \"马其顿语\",\n  \"mh\": \"马绍尔语\",\n  \"mam\": \"玛姆语\",\n  \"mai\": \"迈蒂利语\",\n  \"mfe\": \"毛里裘斯克里奥耳语\",\n  \"mi\": \"毛利语\",\n  \"mni-Mtei\": \"梅泰语（曼尼普尔语）\",\n  \"mn\": \"蒙古语\",\n  \"bn\": \"孟加拉语\",\n  \"min\": \"米南语\",\n  \"lus\": \"米佐语\",\n  \"my\": \"缅甸语\",\n  \"hmn\": \"苗语\",\n  \"nhe\": \"纳瓦特尔语（东部瓦斯特卡）\",\n  \"af\": \"南非荷兰语\",\n  \"st\": \"南索托语\",\n  \"ne\": \"尼泊尔语\",\n  \"new\": \"尼泊尔语言（尼瓦尔语）\",\n  \"nus\": \"努尔语\",\n  \"no\": \"挪威语\",\n  \"pap\": \"帕皮阿门托语\",\n  \"pa\": \"旁遮普语（果鲁穆奇文）\",\n  \"pa-Arab\": \"旁遮普语（沙木基文）\",\n  \"pt\": \"葡萄牙语（巴西）\",\n  \"pt-PT\": \"葡萄牙语（葡萄牙）\",\n  \"ps\": \"普什图语\",\n  \"ny\": \"齐切瓦语\",\n  \"cgg\": \"奇加语\",\n  \"ak\": \"契维语\",\n  \"ja\": \"日语\",\n  \"sv\": \"瑞典语\",\n  \"zap\": \"萨巴特克语\",\n  \"se\": \"萨米语（北部）\",\n  \"sm\": \"萨摩亚语\",\n  \"sr\": \"塞尔维亚语\",\n  \"kri\": \"塞拉利昂克里奥尔语\",\n  \"crs\": \"塞舌尔克里奥尔语\",\n  \"sg\": \"桑戈语\",\n  \"sat-Latn\": \"桑塔利语\",\n  \"si\": \"僧伽罗语\",\n  \"eo\": \"世界语\",\n  \"sk\": \"斯洛伐克语\",\n  \"sl\": \"斯洛文尼亚语\",\n  \"ss\": \"斯瓦特语\",\n  \"sw\": \"斯瓦希里语\",\n  \"gd\": \"苏格兰盖尔语\",\n  \"sus\": \"苏苏语\",\n  \"ceb\": \"宿务语\",\n  \"so\": \"索马里语\",\n  \"tg\": \"塔吉克语\",\n  \"ber\": \"塔马齐格特语（提非纳文）\",\n  \"ber-Latn\": \"塔马塞特语\",\n  \"ty\": \"塔希提语\",\n  \"te\": \"泰卢固语\",\n  \"ta\": \"泰米尔语\",\n  \"th\": \"泰语\",\n  \"to\": \"汤加语\",\n  \"ti\": \"提格里尼亚语\",\n  \"tcy\": \"图鲁语\",\n  \"tum\": \"图姆布卡语\",\n  \"tyv\": \"图瓦语\",\n  \"tr\": \"土耳其语\",\n  \"tk\": \"土库曼语\",\n  \"war\": \"瓦瑞语\",\n  \"mak\": \"望加锡语\",\n  \"cy\": \"威尔士语\",\n  \"vec\": \"威尼斯语\",\n  \"ug\": \"维吾尔语\",\n  \"ve\": \"文达语\",\n  \"wo\": \"沃洛夫语\",\n  \"udm\": \"乌德穆尔特语\",\n  \"ur\": \"乌尔都语\",\n  \"uk\": \"乌克兰语\",\n  \"uz\": \"乌兹别克语\",\n  \"es\": \"西班牙语\",\n  \"szl\": \"西里西亚语\",\n  \"scn\": \"西西里语\",\n  \"iw\": \"希伯来语\",\n  \"el\": \"希腊语\",\n  \"hil\": \"希利盖农语\",\n  \"haw\": \"夏威夷语\",\n  \"sd\": \"信德语\",\n  \"hu\": \"匈牙利语\",\n  \"sn\": \"修纳语\",\n  \"su\": \"巽他语\",\n  \"jam\": \"牙买加土语\",\n  \"sah\": \"雅库特语\",\n  \"hy\": \"亚美尼亚语\",\n  \"ace\": \"亚齐语\",\n  \"iba\": \"伊班语\",\n  \"ig\": \"伊博语\",\n  \"ilo\": \"伊洛卡诺语\",\n  \"it\": \"意大利语\",\n  \"yi\": \"意第绪语\",\n  \"hi\": \"印地语\",\n  \"id\": \"印尼语\",\n  \"en\": \"英语\",\n  \"yua\": \"尤卡坦玛雅语\",\n  \"yo\": \"约鲁巴语\",\n  \"yue\": \"粤语\",\n  \"vi\": \"越南语\",\n  \"jw\": \"爪哇语\",\n  \"zh-CN\": \"中文\",\n  \"dz\": \"宗卡语\",\n  \"zu\": \"祖鲁语\"\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e支持的目标语言，共 243 种\u003c/summary\u003e\n\u003cp\u003e\n\n```json\n {\n  \"ab\": \"阿布哈兹语\",\n  \"sq\": \"阿尔巴尼亚语\",\n  \"aa\": \"阿法尔语\",\n  \"ar\": \"阿拉伯语\",\n  \"alz\": \"阿卢尔语\",\n  \"am\": \"阿姆哈拉语\",\n  \"ach\": \"阿乔利语\",\n  \"as\": \"阿萨姆语\",\n  \"az\": \"阿塞拜疆语\",\n  \"awa\": \"阿瓦德语\",\n  \"av\": \"阿瓦尔语\",\n  \"ee\": \"埃维语\",\n  \"ay\": \"艾马拉语\",\n  \"ga\": \"爱尔兰语\",\n  \"et\": \"爱沙尼亚语\",\n  \"oc\": \"奥克语\",\n  \"or\": \"奥利亚语\",\n  \"om\": \"奥罗莫语\",\n  \"os\": \"奥塞梯语\",\n  \"tpi\": \"巴布亚皮钦语\",\n  \"bew\": \"巴达维语\",\n  \"ban\": \"巴厘语\",\n  \"ba\": \"巴什基尔语\",\n  \"eu\": \"巴斯克语\",\n  \"btx\": \"巴塔克卡罗语\",\n  \"bbc\": \"巴塔克托巴语\",\n  \"bts\": \"巴塔克西马隆贡语\",\n  \"bci\": \"巴乌雷语\",\n  \"be\": \"白俄罗斯语\",\n  \"bm\": \"班巴拉语\",\n  \"pag\": \"邦阿西楠语\",\n  \"pam\": \"邦板牙语\",\n  \"bg\": \"保加利亚语\",\n  \"nso\": \"北索托语\",\n  \"bem\": \"奔巴语\",\n  \"bik\": \"比科尔语\",\n  \"bal\": \"俾路支语\",\n  \"is\": \"冰岛语\",\n  \"pl\": \"波兰语\",\n  \"bs\": \"波斯尼亚语\",\n  \"fa\": \"波斯语\",\n  \"bho\": \"博杰普尔语\",\n  \"bua\": \"布里亚特语\",\n  \"br\": \"布列塔尼语\",\n  \"bo\": \"藏语\",\n  \"chm\": \"草原马里语\",\n  \"ch\": \"查莫罗语\",\n  \"ce\": \"车臣语\",\n  \"chk\": \"楚克语\",\n  \"cv\": \"楚瓦什语\",\n  \"tn\": \"茨瓦纳语\",\n  \"ts\": \"聪加语\",\n  \"fa-AF\": \"达里语\",\n  \"tt\": \"鞑靼语\",\n  \"da\": \"丹麦语\",\n  \"shn\": \"掸语\",\n  \"tet\": \"德顿语\",\n  \"de\": \"德语\",\n  \"dv\": \"迪维希语\",\n  \"dyu\": \"迪尤拉语\",\n  \"tiv\": \"蒂夫语\",\n  \"din\": \"丁卡语\",\n  \"doi\": \"多格拉语\",\n  \"ru\": \"俄语\",\n  \"ndc-ZW\": \"恩道语\",\n  \"nr\": \"恩德贝莱语（南部）\",\n  \"dov\": \"恩敦贝语\",\n  \"bm-Nkoo\": \"恩科字母（西非书面文字）\",\n  \"fo\": \"法罗语\",\n  \"fr\": \"法语\",\n  \"sa\": \"梵语\",\n  \"tl\": \"菲律宾语\",\n  \"fj\": \"斐济语\",\n  \"fi\": \"芬兰语\",\n  \"fon\": \"丰语\",\n  \"fy\": \"弗里西语\",\n  \"fur\": \"弗留利语\",\n  \"ff\": \"富拉尼语\",\n  \"kg\": \"刚果语\",\n  \"km\": \"高棉语\",\n  \"kl\": \"格陵兰语\",\n  \"ka\": \"格鲁吉亚语\",\n  \"gom\": \"贡根语\",\n  \"gu\": \"古吉拉特语\",\n  \"gn\": \"瓜拉尼语\",\n  \"cnh\": \"哈卡钦语\",\n  \"kk\": \"哈萨克语\",\n  \"ht\": \"海地克里奥尔语\",\n  \"ko\": \"韩语\",\n  \"ha\": \"豪萨语\",\n  \"nl\": \"荷兰语\",\n  \"hrx\": \"洪斯吕克语\",\n  \"ky\": \"吉尔吉斯语\",\n  \"ktu\": \"吉土巴语\",\n  \"gl\": \"加利西亚语\",\n  \"ca\": \"加泰罗尼亚语\",\n  \"gaa\": \"加语\",\n  \"cs\": \"捷克语\",\n  \"kac\": \"景颇语\",\n  \"kn\": \"卡纳达语\",\n  \"kr\": \"卡努里语\",\n  \"kha\": \"卡西语\",\n  \"kek\": \"凯克其语\",\n  \"kv\": \"科米语\",\n  \"xh\": \"科萨语\",\n  \"co\": \"科西嘉语\",\n  \"crh\": \"克里米亚鞑靼语\",\n  \"hr\": \"克罗地亚语\",\n  \"qu\": \"克丘亚语\",\n  \"ku\": \"库尔德语（库尔曼吉语）\",\n  \"ckb\": \"库尔德语（索拉尼）\",\n  \"trp\": \"廓克博若克语\",\n  \"la\": \"拉丁语\",\n  \"ltg\": \"拉特加莱语\",\n  \"lv\": \"拉脱维亚语\",\n  \"lo\": \"老挝语\",\n  \"lt\": \"立陶宛语\",\n  \"lij\": \"利古里亚语\",\n  \"li\": \"林堡语\",\n  \"ln\": \"林加拉语\",\n  \"rn\": \"隆迪语\",\n  \"luo\": \"卢奥语\",\n  \"lg\": \"卢干达语\",\n  \"lb\": \"卢森堡语\",\n  \"rw\": \"卢旺达语\",\n  \"lmo\": \"伦巴第语\",\n  \"ro\": \"罗马尼亚语\",\n  \"rom\": \"罗姆语\",\n  \"mad\": \"马都拉语\",\n  \"gv\": \"马恩岛语\",\n  \"mg\": \"马尔加什语\",\n  \"mwr\": \"马尔瓦迪语\",\n  \"mt\": \"马耳他语\",\n  \"mr\": \"马拉地语\",\n  \"ml\": \"马拉雅拉姆语\",\n  \"ms\": \"马来语\",\n  \"ms-Arab\": \"马来语（爪夷文）\",\n  \"mk\": \"马其顿语\",\n  \"mh\": \"马绍尔语\",\n  \"mam\": \"玛姆语\",\n  \"mai\": \"迈蒂利语\",\n  \"mfe\": \"毛里裘斯克里奥耳语\",\n  \"mi\": \"毛利语\",\n  \"mni-Mtei\": \"梅泰语（曼尼普尔语）\",\n  \"mn\": \"蒙古语\",\n  \"bn\": \"孟加拉语\",\n  \"min\": \"米南语\",\n  \"lus\": \"米佐语\",\n  \"my\": \"缅甸语\",\n  \"hmn\": \"苗语\",\n  \"nhe\": \"纳瓦特尔语（东部瓦斯特卡）\",\n  \"af\": \"南非荷兰语\",\n  \"st\": \"南索托语\",\n  \"ne\": \"尼泊尔语\",\n  \"new\": \"尼泊尔语言（尼瓦尔语）\",\n  \"nus\": \"努尔语\",\n  \"no\": \"挪威语\",\n  \"pap\": \"帕皮阿门托语\",\n  \"pa\": \"旁遮普语（果鲁穆奇文）\",\n  \"pa-Arab\": \"旁遮普语（沙木基文）\",\n  \"pt\": \"葡萄牙语（巴西）\",\n  \"pt-PT\": \"葡萄牙语（葡萄牙）\",\n  \"ps\": \"普什图语\",\n  \"ny\": \"齐切瓦语\",\n  \"cgg\": \"奇加语\",\n  \"ak\": \"契维语\",\n  \"ja\": \"日语\",\n  \"sv\": \"瑞典语\",\n  \"zap\": \"萨巴特克语\",\n  \"se\": \"萨米语（北部）\",\n  \"sm\": \"萨摩亚语\",\n  \"sr\": \"塞尔维亚语\",\n  \"kri\": \"塞拉利昂克里奥尔语\",\n  \"crs\": \"塞舌尔克里奥尔语\",\n  \"sg\": \"桑戈语\",\n  \"sat-Latn\": \"桑塔利语\",\n  \"si\": \"僧伽罗语\",\n  \"eo\": \"世界语\",\n  \"sk\": \"斯洛伐克语\",\n  \"sl\": \"斯洛文尼亚语\",\n  \"ss\": \"斯瓦特语\",\n  \"sw\": \"斯瓦希里语\",\n  \"gd\": \"苏格兰盖尔语\",\n  \"sus\": \"苏苏语\",\n  \"ceb\": \"宿务语\",\n  \"so\": \"索马里语\",\n  \"tg\": \"塔吉克语\",\n  \"ber\": \"塔马齐格特语（提非纳文）\",\n  \"ber-Latn\": \"塔马塞特语\",\n  \"ty\": \"塔希提语\",\n  \"te\": \"泰卢固语\",\n  \"ta\": \"泰米尔语\",\n  \"th\": \"泰语\",\n  \"to\": \"汤加语\",\n  \"ti\": \"提格里尼亚语\",\n  \"tcy\": \"图鲁语\",\n  \"tum\": \"图姆布卡语\",\n  \"tyv\": \"图瓦语\",\n  \"tr\": \"土耳其语\",\n  \"tk\": \"土库曼语\",\n  \"war\": \"瓦瑞语\",\n  \"mak\": \"望加锡语\",\n  \"cy\": \"威尔士语\",\n  \"vec\": \"威尼斯语\",\n  \"ug\": \"维吾尔语\",\n  \"ve\": \"文达语\",\n  \"wo\": \"沃洛夫语\",\n  \"udm\": \"乌德穆尔特语\",\n  \"ur\": \"乌尔都语\",\n  \"uk\": \"乌克兰语\",\n  \"uz\": \"乌兹别克语\",\n  \"es\": \"西班牙语\",\n  \"szl\": \"西里西亚语\",\n  \"scn\": \"西西里语\",\n  \"iw\": \"希伯来语\",\n  \"el\": \"希腊语\",\n  \"hil\": \"希利盖农语\",\n  \"haw\": \"夏威夷语\",\n  \"sd\": \"信德语\",\n  \"hu\": \"匈牙利语\",\n  \"sn\": \"修纳语\",\n  \"su\": \"巽他语\",\n  \"jam\": \"牙买加土语\",\n  \"sah\": \"雅库特语\",\n  \"hy\": \"亚美尼亚语\",\n  \"ace\": \"亚齐语\",\n  \"iba\": \"伊班语\",\n  \"ig\": \"伊博语\",\n  \"ilo\": \"伊洛卡诺语\",\n  \"it\": \"意大利语\",\n  \"yi\": \"意第绪语\",\n  \"hi\": \"印地语\",\n  \"id\": \"印尼语\",\n  \"en\": \"英语\",\n  \"yua\": \"尤卡坦玛雅语\",\n  \"yo\": \"约鲁巴语\",\n  \"yue\": \"粤语\",\n  \"vi\": \"越南语\",\n  \"jw\": \"爪哇语\",\n  \"zh-TW\": \"中文（繁体）\",\n  \"zh-CN\": \"中文（简体）\",\n  \"dz\": \"宗卡语\",\n  \"zu\": \"祖鲁语\"\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n在库中访问\n\n```python\nfrom pygtrans import SOURCE_LANGUAGES, TARGET_LANGUAGES\n\nprint('支持的源语言:')\nfor code, lang in SOURCE_LANGUAGES.items():\n    print(code, lang)\n\nprint('支持的目标语言:')\nfor code, lang in TARGET_LANGUAGES.items():\n    print(code, lang)\n\n```\n\n## 必看说明\n\n1. `pygtrans`中包含两个翻译模块\n    1. `Translate`:\n        - 完全免费，支持批量\n        - 从2021年9月15日开始, 需要科学上网才能使用, 具体参考 [#8](https://github.com/foyoux/pygtrans/issues/8)\n    2. `ApiKeyTranslate`: 需要有效的谷歌翻译 **API KEY**，[谷歌提供免费试用](https://cloud.google.com/translate/docs/quickstarts)\n2. `Translate`的最佳实践:\n    1. `http` 代理：`Translate(proxies={\"https\": \"http://localhost:10809\"})`\n    2. `socks5` 代理: `Translate(proxies={\"https\": \"socks5://localhost:10808\"})`\n    3. **重要**：尽量一次性多翻译，减少请求次数，参考 [#13](https://github.com/foyoux/pygtrans/issues/13)，比如一次性翻译\n       2000 / 5000 / 10000，甚至一次性 100000 条\n3. 如果 `429`, 可尝试切换 domain, 具体参考 [#37](https://github.com/foyoux/pygtrans/issues/37)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoyoux%2Fpygtrans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoyoux%2Fpygtrans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoyoux%2Fpygtrans/lists"}