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.2.tar.gz
(24.5 kB
view hashes)
Built Distribution
Close
Hashes for python_lokalise_api-2.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4b39b3f294c8e83728b302c6c2b88105d447436f38527d19be1db6530cb188 |
|
MD5 | 6f9805652cb77e34ae4fecbe6a99eaf1 |
|
BLAKE2b-256 | 559d7e1b162e5f696dd758e32f7036ef7e237b345a5db5a4c9f599a46503c618 |
Close
Hashes for python_lokalise_api-2.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbd7e926715c40ed4b5ff6aa073d0c29f824f953306072c95d0da41f95c38fba |
|
MD5 | d44e590ecbe19ed04feea6ebba8e9f9b |
|
BLAKE2b-256 | dd71c7485933ef0b20c7d42f5983355ec6e845598730e44b6a3e6128618d730d |