Official Python interface for the Lokalise API v2
Project description
Lokalise API v2 official Python interface
Official Python 3 interface for the Lokalise APIv2 that represents returned data as Python objects.
Quick start
This plugin requires Python 3.6 and above. Install it:
pip install python-lokalise-api
Obtain a Lokalise API token (in your Personal profile) and use it:
import lokalise
client = lokalise.Client('YOUR_API_TOKEN')
project = client.project('123.abc')
print(project.name)
client.upload_file(project.project_id, {
"data": 'ZnI6DQogIHRlc3Q6IHRyYW5zbGF0aW9u',
"filename": 'python_upload.yml',
"lang_iso": 'en'
})
translation_keys = client.keys(project.project_id, {"page": 2,
"limit": 3,
"disable_references": "1"})
translation_keys.items[0].key_name['web'] # => "sign_up"
You can also use OAuth 2 tokens:
client = lokalise.OAuthClient('YOUR_OAUTH2_API_TOKEN')
project = client.project('123.abc')
Documentation
Find detailed documentation at python-lokalise-api.readthedocs.io.
License
This plugin is licensed under the BSD 3 Clause License.
Copyright (c) Lokalise team and Ilya Bodrov
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
python-lokalise-api-1.3.0.tar.gz
(56.9 kB
view hashes)
Built Distribution
Close
Hashes for python-lokalise-api-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 777850e790d56f258927be6c0ce584f1d51d929e71d8550d92bf58954e2197b4 |
|
MD5 | 46ff605d7729d9dd909a4a6b9abe47f9 |
|
BLAKE2b-256 | 1ddc3fe220e37da5a690e5aa8fb841cfbe85a2ec0829b2e4d12ac51cb485f621 |
Close
Hashes for python_lokalise_api-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44b04eb656ca311ccbf0a3c6190da91f610473bbc8b8bc350d1ad81bc30628db |
|
MD5 | 7cd7417ede17284e67b295f1749a93cc |
|
BLAKE2b-256 | a78eab4f34d8bd041d921db55a73830e91fce0982efbcd35cad1fe67cb5cc304 |