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.5.0.tar.gz
(59.2 kB
view hashes)
Built Distribution
Close
Hashes for python-lokalise-api-1.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e1fe794825bf063dd20f66195e3b103c375da18d1a3c7d37dc51a449b7c748 |
|
MD5 | 16449daab4ac6c5c5384851cf35327b6 |
|
BLAKE2b-256 | a11f508def974673da59dfefbd8263c802d9374c8105a141b14508acaffed866 |
Close
Hashes for python_lokalise_api-1.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d54ebc37722ec5153f19a401f83977db88edd115c81fcee3c5762d4af36bf14a |
|
MD5 | 0962c9e70fbbfe857ed0a117c1ced4cb |
|
BLAKE2b-256 | d73ae7848e9a6d3750577fbf5e55febdbac0fc10a6418a342b603864dce1d010 |