Skip to content

tridge-hq/python-lokalise-api

 
 

Repository files navigation

Lokalise API v2 official Python interface

PyPI Build Status Test Coverage Downloads Docs

Official Python 3 interface for the Lokalise APIv2 that represents returned data as Python objects.

Quick start

This plugin requires Python 3.6 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.title)

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"

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, Ilya Bodrov

About

Lokalise API v2 official Python library

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%