Python SDK for Pinaca Lab's APIs.
Project description
pinaca-python-sdk
Pinaca Labs' Python SDK
Installation
pip install --upgrade pinaca
Translation
from pinaca import Translation
# TRANSLATION_URL, TRANSLATION_PASSWORD, TRANSLATION_USERNAME environment variables
# can be used without the need of passing the credentials as arguments to Translation
translation = Translation("https://gputwo.pinacalabs.com/translation/cn_en/sync", "USERNAME", "PASSWORD")
# Translating single texts
input_text = "就上述四人的年龄来看,郭和平年龄最大,系50后;庞建军、赵宾方为70后;张志兵为60后。"
translation_id = translation.run(input_text)
# Returns string
translated_text = translation.get_result(translation_id)
# Translating multiple texts at once
input_texts = ["就上述四人的年龄来看,郭和平年龄最大,系50后;庞建军、赵宾方为70后;张志兵为60后。",
"资料显示,壶化股份2020年9月22日登陆A股市场,至今不足一年时间。据壶化股份彼时披露的招股书显示"]
translation_id = translation.run(input_texts)
# Returns list of strings
translated_texts = translation.get_result(translation_id)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pinaca-0.0.1.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinaca-0.0.1.tar.gz.
File metadata
- Download URL: pinaca-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
162dd49e3f13ac10eddc7eece3c855b9d2ba5cfb402e9ea3ccf77a784bbd8e4e
|
|
| MD5 |
c7f469e1552185626b8ad77d65812d1d
|
|
| BLAKE2b-256 |
cc7f480c5bc0703e306a914aaa2e309e95de9d6fd0b58d5b3703928225973574
|
File details
Details for the file pinaca-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: pinaca-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
083e6208914e6a97fc8276838ba3cce681d11beb3ed827861556352d1049e09a
|
|
| MD5 |
4f59b7dd136feec7588565e838d3e41b
|
|
| BLAKE2b-256 |
ca1d998ea9adbe042b6db0b8be7b4bef64a038ab3c60a42f5961c8301a4ca080
|