python-lokalise-api


Namepython-lokalise-api JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/lokalise/python-lokalise-api
SummaryOfficial Python interface for the Lokalise API v2
upload_time2024-10-15 16:43:28
maintainerNone
docs_urlNone
authorIlya Krukowski
requires_python<4.0,>=3.9
licenseBSD-3-Clause
keywords lokalise api client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lokalise API v2 official Python interface

![PyPI](https://img.shields.io/pypi/v/python-lokalise-api)
![CI](https://github.com/lokalise/python-lokalise-api/actions/workflows/ci.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/lokalise/python-lokalise-api/badge.svg?branch=master)](https://coveralls.io/github/lokalise/python-lokalise-api?branch=master)
[![Downloads](https://pepy.tech/badge/python-lokalise-api)](https://pepy.tech/project/python-lokalise-api)
[![Docs](https://readthedocs.org/projects/python-lokalise-api/badge/?version=latest&style=flat)](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.8 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)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lokalise/python-lokalise-api",
    "name": "python-lokalise-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "lokalise, api, client",
    "author": "Ilya Krukowski",
    "author_email": "golosizpru@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/dc/11718c82bfc7dcd55e4772e4d909cf8911899a5040246e54336b5ee8947a/python_lokalise_api-3.0.0.tar.gz",
    "platform": null,
    "description": "# Lokalise API v2 official Python interface\n\n![PyPI](https://img.shields.io/pypi/v/python-lokalise-api)\n![CI](https://github.com/lokalise/python-lokalise-api/actions/workflows/ci.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/lokalise/python-lokalise-api/badge.svg?branch=master)](https://coveralls.io/github/lokalise/python-lokalise-api?branch=master)\n[![Downloads](https://pepy.tech/badge/python-lokalise-api)](https://pepy.tech/project/python-lokalise-api)\n[![Docs](https://readthedocs.org/projects/python-lokalise-api/badge/?version=latest&style=flat)](https://python-lokalise-api.readthedocs.io)\n\nOfficial Python 3 interface for the [Lokalise APIv2](https://developers.lokalise.com/reference/lokalise-rest-api) that represents returned data as Python objects.\n\n## Quick start\n\nThis plugin requires Python 3.8 and above. Install it:\n\n    pip install python-lokalise-api\n\nObtain a Lokalise API token (in your *Personal profile*) and use it:\n\n```python\nimport lokalise\nclient = lokalise.Client('YOUR_API_TOKEN')\nproject = client.project('123.abc')\nprint(project.name)\n\nclient.upload_file(project.project_id, {\n    \"data\": 'ZnI6DQogIHRlc3Q6IHRyYW5zbGF0aW9u',\n    \"filename\": 'python_upload.yml',\n    \"lang_iso\": 'en'\n})\n\ntranslation_keys = client.keys(project.project_id, {\"page\": 2,\n    \"limit\": 3,\n    \"disable_references\": \"1\"})\ntranslation_keys.items[0].key_name['web'] # => \"sign_up\"\n```\n\nYou can also use [OAuth 2 tokens](https://python-lokalise-api.readthedocs.io/en/latest/additional_info/oauth2_flow.html):\n\n```python\nclient = lokalise.OAuthClient('YOUR_OAUTH2_API_TOKEN')\n\nproject = client.project('123.abc')\n```\n\n## Documentation\n\nFind detailed documentation at [python-lokalise-api.readthedocs.io](https://python-lokalise-api.readthedocs.io).\n\n## License\n\nThis plugin is licensed under the [BSD 3 Clause License](https://github.com/lokalise/python-lokalise-api/blob/master/LICENSE).\n\nCopyright (c) [Lokalise group](https://lokalise.com) and [Ilya Krukowski](http://bodrovis.tech)\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Official Python interface for the Lokalise API v2",
    "version": "3.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/lokalise/python-lokalise-api/issues",
        "Documentation": "https://python-lokalise-api.readthedocs.io/",
        "Homepage": "https://github.com/lokalise/python-lokalise-api",
        "Repository": "https://github.com/lokalise/python-lokalise-api"
    },
    "split_keywords": [
        "lokalise",
        " api",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "40a66fa8c208605334a3504985df96efff7fefbf577ed83affad7c20f6db8c32",
                "md5": "e0d75bb39cbe43cddaebd65d0dc5b63c",
                "sha256": "55d69ff53be2a21b0697e0635aa24d648bb5b0f54924a9c3f60558553dda9001"
            },
            "downloads": -1,
            "filename": "python_lokalise_api-3.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e0d75bb39cbe43cddaebd65d0dc5b63c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 51230,
            "upload_time": "2024-10-15T16:43:27",
            "upload_time_iso_8601": "2024-10-15T16:43:27.111519Z",
            "url": "https://files.pythonhosted.org/packages/40/a6/6fa8c208605334a3504985df96efff7fefbf577ed83affad7c20f6db8c32/python_lokalise_api-3.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5bdc11718c82bfc7dcd55e4772e4d909cf8911899a5040246e54336b5ee8947a",
                "md5": "d520126dbd70fca5e454330e4fc404bb",
                "sha256": "6f60db426dbbc4d473560c9261fb424966fac830a62f3e7ecd64c8a4cc48977c"
            },
            "downloads": -1,
            "filename": "python_lokalise_api-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d520126dbd70fca5e454330e4fc404bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 25003,
            "upload_time": "2024-10-15T16:43:28",
            "upload_time_iso_8601": "2024-10-15T16:43:28.782651Z",
            "url": "https://files.pythonhosted.org/packages/5b/dc/11718c82bfc7dcd55e4772e4d909cf8911899a5040246e54336b5ee8947a/python_lokalise_api-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 16:43:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lokalise",
    "github_project": "python-lokalise-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-lokalise-api"
}
        
Elapsed time: 0.57280s