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.8 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.3.0.tar.gz
(24.5 kB
view hashes)
Built Distribution
Close
Hashes for python_lokalise_api-2.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6b5b336041fc085e37eecaaf73f69838dfd3f690c267abd2ad8663c281b25df |
|
MD5 | 9e1e67c3f8075ec79eeb481aff921eb4 |
|
BLAKE2b-256 | 893352a397e04db407b362a6a301be6a4ae83e8a6354cddbd0174e1c65ad97da |
Close
Hashes for python_lokalise_api-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c58a3172d60f4624c50c27307634acd6df5ad4d66f3a0f542c478c9f113e5f6 |
|
MD5 | 1dbf7d2c20206d2b9c7d90edd9e9fe83 |
|
BLAKE2b-256 | 1ccff5384e212ea92241c35b48bb9b700c47f9fd5e9af142a6b08ebbc453342c |