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-3.0.0.tar.gz
(25.0 kB
view hashes)
Built Distribution
Close
Hashes for python_lokalise_api-3.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f60db426dbbc4d473560c9261fb424966fac830a62f3e7ecd64c8a4cc48977c |
|
MD5 | d520126dbd70fca5e454330e4fc404bb |
|
BLAKE2b-256 | 5bdc11718c82bfc7dcd55e4772e4d909cf8911899a5040246e54336b5ee8947a |
Close
Hashes for python_lokalise_api-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55d69ff53be2a21b0697e0635aa24d648bb5b0f54924a9c3f60558553dda9001 |
|
MD5 | e0d75bb39cbe43cddaebd65d0dc5b63c |
|
BLAKE2b-256 | 40a66fa8c208605334a3504985df96efff7fefbf577ed83affad7c20f6db8c32 |