Skip to main content

LumApps SDK for Python

Project description

LumApps SDK

CI Coverage Status Pypi package Python versions Black style

LumApps SDK is a set of tools to manipulate the LumApps API.

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

pip install lumapps-sdk

Getting started

1- Get your token

LumApps supports multiple ways of authentication. The fastest one to implement is the following:

Get your token by logging to your LumApps account. Go to https://sites.lumapps.com and authenticate. Once connected, open the javascript console of your browser and run:

var instance = window.location.pathname.split('/');
instance = instance[1] == "a" ? instance[3] : instance[1]
fetch(window.location.origin+"/service/init?customerHost="+window.location.host+"&instanceSlug="+instance+"&    slug=").then(data=>{return data.json()}).then(res => {console.log(res.token)})

This will generate your personal LumApps token that will be active for 60 minutes, and that we will use in the following steps

2 - Authenticate

from lumapps.api import ApiClient
token = "MY TOKEN"
api = ApiClient(token=token)

3 - Make your first API call

Let’s display the full name of a registered user in lumapps

user_email = "YOUR EMAIL"
usr = api.get_call("user", "get", email=user_email)
print("Hello {}".format(usr.get("fullName", "")))

Documentation

The SDK documentation is available here.

Code convention

Docstring in PEP 484 type annotations format adapted to python 2.7 using comments.

How to get help, contribute, or provide feedback

Please refer to our contributing guidelines.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lumapps-sdk-1.0.4.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

lumapps_sdk-1.0.4-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file lumapps-sdk-1.0.4.tar.gz.

File metadata

  • Download URL: lumapps-sdk-1.0.4.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for lumapps-sdk-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5c439464f13a015254bef021eca6dbfea20b1a4d4ccacba9d029524ee861a1eb
MD5 dfcf747cc1157894616a8acb195dca73
BLAKE2b-256 90bd0eff86e50edd6178578b77810317212243929d6121e868ed288d88555311

See more details on using hashes here.

File details

Details for the file lumapps_sdk-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: lumapps_sdk-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for lumapps_sdk-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c1f0f8235248fd475480a998dceb23f3541b347633bf1ca3b67fb4d30d3cfea3
MD5 4b3db1d59f1d67786c124e978809ab8b
BLAKE2b-256 0390dd98cd1afb535ac057f45dec1fb062d860fbeb50697463e8f5239e99c897

See more details on using hashes here.

Supported by

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