Skip to main content

A client for the leanbase API.

Project description


A client for the Leanbase API in python.


import leanbase as lb


lb.await_initialisation(timeout=0.25) # optional

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

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


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

Project details

Download files

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

Source Distribution

leanbase-1.6.0.tar.gz (12.1 kB view hashes)

Uploaded source

Built Distribution

leanbase-1.6.0-py3-none-any.whl (17.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page