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.10 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
Metadata
Release files for python-lokalise-api 4.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_lokalise_api-4.3.0.tar.gz | 511.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_lokalise_api-4.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 609.8 kB
Release files / python_lokalise_api-4.3.0.tar.gz
| Download URL | python_lokalise_api-4.3.0.tar.gz |
|---|---|
| Size | 511.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63675076eceae78e2d2e63078c8f5ba0b8a80bfb8ecba7c3e1087aa22901f342
|
|
BLAKE2b-256 checksum How to use checksums |
7e737f151b314195df712910eb43555eb2c6dcd4f37e4d78a2f9df742cf12d75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / python_lokalise_api-4.3.0-py3-none-any.whl
| Download URL | python_lokalise_api-4.3.0-py3-none-any.whl |
|---|---|
| Size | 98.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24e733b554fbfa6c4ca7a95fbbe9de22179b26d2c1dcb45790a8495c11f9d0bd
|
|
BLAKE2b-256 checksum How to use checksums |
80952c9c921fdd9d0efe11f9f2f31c95131d0e7b280fd2bad199f12a89b2d7a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|