Skip to content

Leanbase/leanbase-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leanbase-python

A client for the Leanbase API in python.

Usage

import leanbase as lb

lb.configure(api_key='api_key')

lb.await_initialisation(timeout=0.25) # optional

if lb.user(user).can_access('quarter_pounds'):
  # Do this
else:
  # Do that.

lb.user(user).completed('arduous_goal') # optional, recommended.

Architecture

The code and the runtime is divided into the following modules. Storage, Client, Models and API.

Using the client is effectively using the API provided with it. At configuration,

  1. a client and stores are created
  2. stores are connected to the client (for auto-updates)
  3. the client requests for the first payload and updates the store accordingly.

During usage,

  1. the stores are queried for the feature along with its segments definitions
  2. the evaluation algorithm is invoked.
  3. the client and stores ensure that the feature definition is always up-to-date

About

A client for the Leanbase API in python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages