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.2.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.2.0.tar.gz | 508.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_lokalise_api-4.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 603.9 kB
Release files / python_lokalise_api-4.2.0.tar.gz
| Download URL | python_lokalise_api-4.2.0.tar.gz |
|---|---|
| Size | 508.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e9d64bdcc8f5c2811b555d4a21a1eb9e2dbb90c221f354ee4a02858d64b6771
|
|
BLAKE2b-256 checksum How to use checksums |
a7feac78632054f5f62adf17652c88c51ee3c05ba02e78598463c1f7b9707441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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.2.0-py3-none-any.whl
| Download URL | python_lokalise_api-4.2.0-py3-none-any.whl |
|---|---|
| Size | 95.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3f7c13129120524e0396f1eace6414e77d1a554dd1c237d96cebfb0333afd06
|
|
BLAKE2b-256 checksum How to use checksums |
e18b9b7b0a453c5a66b678ca185e076ef4e8bacb15053cbacb5a577f430e6782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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}
|