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.2.0.tar.gz
(54.1 kB
view hashes)
Built Distribution
Close
Hashes for python-lokalise-api-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f52cee7a0b781fecf7f29897ca3173607a80390eaae787373e3ffd9d4cd331 |
|
MD5 | d9f862957c54c615b0fa211fef203cfd |
|
BLAKE2b-256 | 9395b023ad491492beafa7532788eda3c2a93c8c57a8571eb9d2a1c2c33ade0d |
Close
Hashes for python_lokalise_api-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8898f141a8b60cc4216722776e97191a679bc42b558ed3124ad51325e9d3d8db |
|
MD5 | df19c83566dcb2e547b45cf2251227b1 |
|
BLAKE2b-256 | 6bbec32295fb4f3cae4810773b2cef487dbbf70328445b3561839b2df502279c |