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.7 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 group and Ilya Krukowski
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-2.1.1.tar.gz
(24.9 kB
view hashes)
Built Distribution
Close
Hashes for python_lokalise_api-2.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa94290055ac08b8916a8ba744894c1787f5d7f857c9e83c2defd9535bfa6bc |
|
MD5 | 565476a81ce6fcf2403fef7b5d5a3854 |
|
BLAKE2b-256 | 7f3d62bbdd37e005cf12a5076d47cd0c1ecf32ed0fefafba0a4c98d7764b4245 |
Close
Hashes for python_lokalise_api-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b5d19907ebfd74d5d28e40a13fe73decdec9ebbe3fb459cbafd012a9ac38cbe |
|
MD5 | c6ebaa618ca604909477b555cd9c56bb |
|
BLAKE2b-256 | f148df33d52d884a2a9eaac1dd2b7ec0645cbc3358ac02f622549102790fff45 |