Skip to main content

No project description provided

Project description

Lumapps SDK

Action Status Pypi Coverage Black Black

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

Requirements

Python >= 3.7

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 BaseClient
    
    token = "MY TOKEN"
    client = BaseClient(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["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.

Copyright and license

LumApps SDK is released under the MIT license.

Project details


Release history Release notifications | RSS feed

This version

1.2.0

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.2.0.tar.gz (83.1 kB view hashes)

Uploaded source

Built Distribution

lumapps_sdk-1.2.0-py3-none-any.whl (198.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page