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 team 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-1.6.0.tar.gz
(59.5 kB
view hashes)
Built Distribution
Close
Hashes for python-lokalise-api-1.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb417d88a0a340aa15d736adade9f1b5e0a9edb7aa87a185807d9687be6859c7 |
|
MD5 | 265f8ee8b9681d6336e9183546a44612 |
|
BLAKE2b-256 | 831203f36f06a5d1a8bcbdc0cc452786037455dc22f5840d4bd9f0d749d0ef9c |
Close
Hashes for python_lokalise_api-1.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ca6bcd1f80618a2a3b601d2ff55357d41fd2c3d303a4614d8e966c1727537c2 |
|
MD5 | 799d3ecca2d61cb1a8804a3859c65a4f |
|
BLAKE2b-256 | 0689487e671464d7ef40b11f0b9193286a1ecc09330b7c55fe9363ecf0263e47 |