Kakaotrans
Unofficial python API for Kakao translate service.
Installation
$ pip install kakaotrans
Usage
Basic Usage
>>> from kakaotrans import Translator
>>> translator = Translator()
>>> translator.translate("Try your best rather than be the best.")
# '최고가 되기보다는 최선을 다하라.'
>>> translator.translate("최고가 되기보다는 최선을 다하라.", src='kr', tgt='de')
# 'Tun Sie Ihr Bestes, anstatt das Beste zu sein.'
Separate the query into multiple sentences
Translation query might include multiple sentences. If you set separate_lines=True, translator will automatically separate the query and return the list of multiple sentences.
from kakaotrans import Translator
translator = Translator()
translator.translate("""지난해 3월 오픈한 카카오톡 주문하기는 현재까지 약 250만명의 회원을 확보했다.
전 국민에게 친숙한 카카오톡 UI를 활용하기 때문에 별도의 앱을 설치할 필요 없이 카카오톡 내에서 모든 과정이 이뤄지는 것이 특징이다.""",
src='kr', tgt='en', separate_lines=True)
# ['The ordering of KakaoTalk, which opened in March last year, has secured about 2.5 million members to date.', 'Because it uses KakaoTalk UI, which is familiar to the whole nation, it is characterized by all the processes in KakaoTalk without having to install a separate app.']
Save translated result as file
>>> from kakaotrans import Translator
>>> translator = Translator()
>>> translator.translate("Try your best rather than be the best.", save_as_file=True, file_name='result.txt')
Reference
Metadata
Release files for kakaotrans 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kakaotrans-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for kakaotrans-0.1.2-py3-none-any.whl |
Release files / kakaotrans-0.1.2-py3-none-any.whl
| Download URL | kakaotrans-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0476385b9a26d8f820274421cbcf72cc44af044e3cb08855dae8478b78f6428b
|
|
BLAKE2b-256 checksum How to use checksums |
d40df425ca254bf69c513c7c0150ba5dfcb095cc5d0c694af328dba7f42582b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.27.0 CPython/3.6.6
|
Security for kakaotrans 0.1.2
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.