https://github.com/lokalise/python-lokalise-api
Lokalise API v2 official Python library
https://github.com/lokalise/python-lokalise-api
api client interface lokalise lokalise-api python sdk sdk-python
Last synced: 22 days ago
JSON representation
Lokalise API v2 official Python library
- Host: GitHub
- URL: https://github.com/lokalise/python-lokalise-api
- Owner: lokalise
- License: other
- Created: 2019-07-11T17:05:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2026-01-01T14:30:53.000Z (about 2 months ago)
- Last Synced: 2026-01-06T17:28:08.224Z (about 2 months ago)
- Topics: api, client, interface, lokalise, lokalise-api, python, sdk, sdk-python
- Language: Python
- Homepage: https://python-lokalise-api.readthedocs.io
- Size: 2.8 MB
- Stars: 15
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Lokalise API v2 official Python interface


[](https://coveralls.io/github/lokalise/python-lokalise-api?branch=master)
[](https://pepy.tech/project/python-lokalise-api)
[](https://python-lokalise-api.readthedocs.io)
Official Python 3 interface for the [Lokalise APIv2](https://developers.lokalise.com/reference/lokalise-rest-api) 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:
```python
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](https://python-lokalise-api.readthedocs.io/en/latest/additional_info/oauth2_flow.html):
```python
client = lokalise.OAuthClient('YOUR_OAUTH2_API_TOKEN')
project = client.project('123.abc')
```
## Documentation
Find detailed documentation at [python-lokalise-api.readthedocs.io](https://python-lokalise-api.readthedocs.io).
## License
This plugin is licensed under the [BSD 3 Clause License](https://github.com/lokalise/python-lokalise-api/blob/master/LICENSE).
Copyright (c) [Lokalise group](https://lokalise.com) and [Ilya Krukowski](http://bodrovis.tech)