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.4.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

leanbase-1.4.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: leanbase-1.4.0.tar.gz
  • Upload date:
  • Size: 11.4 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.4.0.tar.gz
Algorithm Hash digest
SHA256 c52fcd22125963f4569370c7aa546a018d18f6c48ddbcc6be8e5475fb9cfa908
MD5 7ec21570193aea83417c33a617aba045
BLAKE2b-256 b6cf4a868776ca921955593570ebd14de31008558392297d919ac6e28a40b26a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: leanbase-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b398eadcc472e87f77c44c766806a94c4d03fa2ad2bcd1c78892794560166a6
MD5 8f23a172457aab8601952c35d1777723
BLAKE2b-256 82bf71f0f8c474e38da8ccc7644b3bef5ea57b63aff98ad86a2fbef3a5794ee4

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