Skip to main content

A client for the leanbase API.

Project description

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

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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file leanbase-1.6.0.tar.gz.

File metadata

  • Download URL: leanbase-1.6.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9

File hashes

Hashes for leanbase-1.6.0.tar.gz
Algorithm Hash digest
SHA256 9e8a237fbe9f4ec6f616d1bd4512be2c3f60e2a0e4ed3ffe90ce514f912984fb
MD5 e3e4636668585382cbb153e37959b763
BLAKE2b-256 5d9707b146f6400c399c420aa04344eaae21a5115c38041038c97a9720b7b65e

See more details on using hashes here.

File details

Details for the file leanbase-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: leanbase-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9

File hashes

Hashes for leanbase-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c64748e84152edba085fcc1d06c6ba08c5a396ff5d803e3573ecaee402b6e5b1
MD5 9c313a6bd5f35bbf83bd8d38b5e8adee
BLAKE2b-256 50a3a0cbde85385917017837c086b4ed2933abb9c645466fd17b19dbaedbac7f

See more details on using hashes here.

Supported by

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