Skip to main content

LumApps SDK for Python

Project description

LumApps SDK

CI Coverage Status Pypi package Python versions Black style

Please be aware the this sdk is still in beta version and is undergoing a fast paced evolution that may break change the behaviour of some helpers

Make sure of the version you are using (Git tags & releases)


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('/');
if (instance[1] == "a"){
    instance = instance[3]
}else{
    instance = instance[2]
}
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.0b17.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file lumapps-sdk-1.0.0b17.tar.gz.

File metadata

  • Download URL: lumapps-sdk-1.0.0b17.tar.gz
  • Upload date:
  • Size: 17.8 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.8.2

File hashes

Hashes for lumapps-sdk-1.0.0b17.tar.gz
Algorithm Hash digest
SHA256 97fc84a3f84bb95a7fac02e5aa86f09e703ede5030346a1a92a29f7a931d7bf7
MD5 e1e8c29c10bf72add6ed8b3a49ba3022
BLAKE2b-256 3499628cd74050e92977e5cdb898dffaa0b9d7fd3e83c8c6381a31d20049cc41

See more details on using hashes here.

File details

Details for the file lumapps_sdk-1.0.0b17-py3-none-any.whl.

File metadata

  • Download URL: lumapps_sdk-1.0.0b17-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.8.2

File hashes

Hashes for lumapps_sdk-1.0.0b17-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2235f524a8b58850385645056d4d75a36ee39d03544289ea5d45c827262a69
MD5 17f140ed7ff229b83e3032b70a9af187
BLAKE2b-256 4146aade82eacbc00aed686bafd140bfde59a597e8027617ccd6bf9c633bdf59

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