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.0.tar.gz
(24.8 kB
view hashes)
Built Distribution
Close
Hashes for python_lokalise_api-2.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53d53c11645c5c26e74cbea04d6e468b4ff5d1f00e41fe2be140ab9a3424de15 |
|
MD5 | fea210e9175de14a6b72ad8d8fecbd15 |
|
BLAKE2b-256 | 32779d05c9be47e39114cdf95b152df152bf6dcdccd83fb557c02d0f54820ef2 |
Close
Hashes for python_lokalise_api-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c28895888e051799b29d4afb765491b4cc521e87598c2e5d31e4b7e12c43e6 |
|
MD5 | a59bbe20bcb3c67b1d07254590b27c69 |
|
BLAKE2b-256 | f035c22419fb1a6857e3ffc5852684599f53e32b54ec7fee0f0bf09e24bdf558 |