# Lumapps SDK
<p style="text-align:center">
<a href="https://github.com/lumapps/lumapps-sdk/actions?query=workflow%3ACI"><img alt="Action Status" src="https://github.com/lumapps/lumapps-sdk/workflows/CI/badge.svg"></a>
<a href="https://pypi.org/project/lumapps-sdk/"><img alt="Pypi" src="https://img.shields.io/pypi/v/lumapps-sdk"></a>
<a href="https://codecov.io/gh/lumapps/lumapps-sdk/branch/master"><img alt="Coverage" src="https://codecov.io/gh/lumapps/lumapps-sdk/branch/master/graph/badge.svg"></a>
<a href="https://github.com/ambv/black"><img alt="Black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="#"><img alt="Black" src="https://img.shields.io/badge/python-3.8%7C3.9-blue"></a>
</p>
LumApps SDK is a set of tools to manipulate the [LumApps API](https://apiv1.lumapps.com/)
This includes:
- A client that support all the routes of the API (located in folder lumapps)
- A set of helper classes to easily manipulate LumApps elements as Python Objects and classes (folder lumapps/helpers)
## Installation
```bash
pip install lumapps-sdk
```
## Requirements
Python >= 3.8
## Getting started
1. Set up your OAuth application
Before anything else, you need to set up an OAuth application by following the steps in the [LumApps Developer Portal](https://developer.lumapps.com/documentation/oauth.html).
2. Authenticate
Once your application set up, get a hand on its client ID and secret, then you can write the following
to get an access token for a particular user.
```python
from lumapps.api import BaseClient
token = "MY TOKEN"
base_client = BaseClient(
api_info={"base_url": "https://your-cell.api.lumapps.com"}, # e.g. "https://go-cell-001.api.lumapps.com"
auth_info={
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}
)
api = base_client.get_new_client_as("user.email@yourcompany.com", customer_id="your-organization-id")
```
3. Make your first API call
Let's display the full name of a registered user in lumapps
```python
usr = api.get_call("user/get", email="user.email@yourcompany.com")
print("Hello {}".format(usr["fullName"]))
```
## Documentation
The SDK documentation is available [here](https://lumapps.github.io/lumapps-sdk/).
## Code convention
Docstring in PEP 484 type annotations format adapted to python 3.x using comments.
## How to get help, contribute, or provide feedback
Please refer to our [contributing guidelines](CONTRIBUTING.md).
## Copyright and license
LumApps SDK is released under the [MIT license](LICENSE.md).
Raw data
{
"_id": null,
"home_page": "https://github.com/lumapps/lumapps-sdk",
"name": "lumapps-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "lumapps-sdk, sdk, python",
"author": "Aur\u00e9lien Dentan",
"author_email": "aurelien@lumapps.com",
"download_url": "https://files.pythonhosted.org/packages/9f/26/96ddcacec6f22acf3b9f539576879c2f3257440b5ac3b36927a1adc5435d/lumapps_sdk-2.0.3.tar.gz",
"platform": null,
"description": "# Lumapps SDK\n\n<p style=\"text-align:center\">\n <a href=\"https://github.com/lumapps/lumapps-sdk/actions?query=workflow%3ACI\"><img alt=\"Action Status\" src=\"https://github.com/lumapps/lumapps-sdk/workflows/CI/badge.svg\"></a>\n <a href=\"https://pypi.org/project/lumapps-sdk/\"><img alt=\"Pypi\" src=\"https://img.shields.io/pypi/v/lumapps-sdk\"></a>\n <a href=\"https://codecov.io/gh/lumapps/lumapps-sdk/branch/master\"><img alt=\"Coverage\" src=\"https://codecov.io/gh/lumapps/lumapps-sdk/branch/master/graph/badge.svg\"></a>\n <a href=\"https://github.com/ambv/black\"><img alt=\"Black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n <a href=\"#\"><img alt=\"Black\" src=\"https://img.shields.io/badge/python-3.8%7C3.9-blue\"></a>\n</p>\n\n\nLumApps SDK is a set of tools to manipulate the [LumApps API](https://apiv1.lumapps.com/)\n\nThis includes:\n\n- A client that support all the routes of the API (located in folder lumapps)\n- A set of helper classes to easily manipulate LumApps elements as Python Objects and classes (folder lumapps/helpers)\n\n\n## Installation\n\n```bash\npip install lumapps-sdk\n```\n\n## Requirements\n\nPython >= 3.8\n\n## Getting started\n\n1. Set up your OAuth application\n\n Before anything else, you need to set up an OAuth application by following the steps in the [LumApps Developer Portal](https://developer.lumapps.com/documentation/oauth.html).\n\n2. Authenticate\n\n Once your application set up, get a hand on its client ID and secret, then you can write the following\n to get an access token for a particular user.\n ```python\n from lumapps.api import BaseClient\n\n token = \"MY TOKEN\"\n base_client = BaseClient(\n api_info={\"base_url\": \"https://your-cell.api.lumapps.com\"}, # e.g. \"https://go-cell-001.api.lumapps.com\"\n auth_info={\n \"client_id\": \"your-client-id\",\n \"client_secret\": \"your-client-secret\"\n }\n )\n\n api = base_client.get_new_client_as(\"user.email@yourcompany.com\", customer_id=\"your-organization-id\")\n ```\n\n3. Make your first API call\n\n Let's display the full name of a registered user in lumapps\n\n ```python\n usr = api.get_call(\"user/get\", email=\"user.email@yourcompany.com\")\n print(\"Hello {}\".format(usr[\"fullName\"]))\n ```\n\n## Documentation\n\nThe SDK documentation is available [here](https://lumapps.github.io/lumapps-sdk/).\n\n## Code convention\n\nDocstring in PEP 484 type annotations format adapted to python 3.x using comments.\n\n## How to get help, contribute, or provide feedback\n\nPlease refer to our [contributing guidelines](CONTRIBUTING.md).\n\n## Copyright and license\n\nLumApps SDK is released under the [MIT license](LICENSE.md).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "2.0.3",
"project_urls": {
"Homepage": "https://github.com/lumapps/lumapps-sdk",
"Repository": "https://github.com/lumapps/lumapps-sdk"
},
"split_keywords": [
"lumapps-sdk",
" sdk",
" python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e1e21413d5b8a8442fb595733b68ae1f4ce380167506d640d85aa8cfc337fb0",
"md5": "0fd37d94380279518ad2e83564c146f0",
"sha256": "3e97848b7d7d00dc5e765043cd8787bc3ce6d6a737ef76b4e4c5578e4df2a4ad"
},
"downloads": -1,
"filename": "lumapps_sdk-2.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0fd37d94380279518ad2e83564c146f0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 196521,
"upload_time": "2024-10-24T13:40:55",
"upload_time_iso_8601": "2024-10-24T13:40:55.002730Z",
"url": "https://files.pythonhosted.org/packages/3e/1e/21413d5b8a8442fb595733b68ae1f4ce380167506d640d85aa8cfc337fb0/lumapps_sdk-2.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9f2696ddcacec6f22acf3b9f539576879c2f3257440b5ac3b36927a1adc5435d",
"md5": "38ba4434a0679812382076977347bfac",
"sha256": "37cb7a273025e169030b26ffd132f92c1fa8da1bb46c56e283edeb3373cdd100"
},
"downloads": -1,
"filename": "lumapps_sdk-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "38ba4434a0679812382076977347bfac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 80004,
"upload_time": "2024-10-24T13:40:56",
"upload_time_iso_8601": "2024-10-24T13:40:56.550759Z",
"url": "https://files.pythonhosted.org/packages/9f/26/96ddcacec6f22acf3b9f539576879c2f3257440b5ac3b36927a1adc5435d/lumapps_sdk-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-24 13:40:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lumapps",
"github_project": "lumapps-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "lumapps-sdk"
}