You can also read this README in English!
papygo
소개
papygo는 네이버 파파고를 더 쉽게 사용할 수 있도록 만든 라이브러리입니다. 네이버 공식 API 문서를 바탕으로 코드를 작성했습니다.
설치
pip로 쉽게 설치할 수 있습니다.
pip install papygo
사용 방법
from papygo.translator import Translator
# 실제 client_id와 client_secret으로 바꿔야 합니다.
client_id = 'your_client_id'
client_secret = 'your_client_secret'
# 네이버 클라우드에서 발급받은 경우 'naver_cloud'를, 네이버 클라우드 플랫폼 공공기관용에서 발급받은 경우 'naver_cloud_gov'를 입력합니다.
papago_type = 'naver_cloud'
# 번역 인스턴스 생성
translator = Translator(client_id, client_secret, papago_type)
# text 변수에 번역을 하고 싶은 문장을 입력합니다.
text = "Hello, world!"
# 이 예제에서는 text 변수값을 영어에서 한국어로 번역합니다.
try:
translated_text = translator.translate(text, "en", "ko")
print("Translated Text:", translated_text)
# 오류 발생 시 오류 내용이 출력됩니다.
except Exception as e:
print(f"An error occurred: {e}")
API 키 등록
네이버 클라우드, 네이버 클라우드 공공기관용 모두 발급 방법이 다르므로, 공식 문서를 읽으시기 바랍니다.
- 네이버 클라우드: https://guide.ncloud-docs.com/docs/papagotranslation-use-apis
- 네이버 클라우드 공공기관용: https://guide-gov.ncloud-docs.com/docs/papagotranslation-use-apis
한계점
- 네이버 개발자 센터에서 파파고 API 지원 종료로 인해 라이브러리 개발 단계에서 빠졌습니다. 파파고 API 지원 종료 안내와 관련한 자세한 내용은 네이버 개발자 센터 공지사항 - 파파고 API 지원 종료 안내 문서를 확인하세요!
- 문서 번역(Papago Doc Translation API), 웹사이트 번역(Papago Website Translation API), 언어 인식(Papago Language Detection API)은 본 라이브러리에서 지원하지 않습니다.
- Papago Text Translation 사용 시 번역 결과 화면 내 브랜드 가이드라인에 따라 반드시 Papago 저작권 표기를 해야 한다고 합니다. 자세한 내용은 네이버 클라우드 플랫폼 - Papago Translation 저작권 표기 정책 문서를 확인하시기 바랍니다.
기여
본 프로젝트를 지원할 수 있습니다. issue 등록 또는 Pull Request(PR)은 언제나 환영입니다!
라이선스
MIT 라이선스로 배포됩니다.
Metadata
Release files for papygo 1.0.2
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 |
|---|---|---|---|---|
| papygo-1.0.2.tar.gz | 5.1 kB | Without provenance | Details for papygo-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| papygo-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for papygo-1.0.2-py3-none-any.whl |
Total release size: 9.6 kB
Release files / papygo-1.0.2.tar.gz
| Download URL | papygo-1.0.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0aa3a84895a25e29741f054209b80c4953dcdaff92fd8f604fc7eca09c7f061
|
|
BLAKE2b-256 checksum How to use checksums |
bdf001200ff6776f6f4f10b4ea02ffc980c61407c5ede798c67f873a68efbaf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / papygo-1.0.2-py3-none-any.whl
| Download URL | papygo-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9878627573042c9f174ad81deba5be15e52335a262af6579f111da5563688a2a
|
|
BLAKE2b-256 checksum How to use checksums |
3fdc7d62765e01ca924e2709499cb0dbadcab6ef9aa7f70a297e23e09d7e3e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for papygo 1.0.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.