Skip to main content

Official Python interface for the Lokalise API v2

Project description

Lokalise API v2 official Python interface

PyPI CI Coverage Status Downloads Docs

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

Project details


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-4.0.3.tar.gz (495.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_lokalise_api-4.0.3-py3-none-any.whl (90.7 kB view details)

Uploaded Python 3

File details

Details for the file python_lokalise_api-4.0.3.tar.gz.

File metadata

  • Download URL: python_lokalise_api-4.0.3.tar.gz
  • Upload date:
  • Size: 495.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}

File hashes

Hashes for python_lokalise_api-4.0.3.tar.gz
Algorithm Hash digest
SHA256 bbc283f94ee2d67bb164241e415f83c1c42d26b6f4672a0a0264149fc410a6bc
MD5 8de5c878a5088217e03f90be72148f21
BLAKE2b-256 a1a055bf29cca45bfe3687e2def59b7fe3e677f1ec062a68717b9e2fa69b75de

See more details on using hashes here.

File details

Details for the file python_lokalise_api-4.0.3-py3-none-any.whl.

File metadata

  • Download URL: python_lokalise_api-4.0.3-py3-none-any.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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}

File hashes

Hashes for python_lokalise_api-4.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b392e0be21d03c780a6aca91880494d08f18ae4e74e969c3aa05eb1d5e7c9b85
MD5 bcd801a931de51ca4e210ccf3a9fae52
BLAKE2b-256 49959ba67613f84b3bb07b40318a5056500cb12e4fdcc0ac9a2d1cbd105f0a9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page