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,
- a client and stores are created
- stores are connected to the client (for auto-updates)
- the client requests for the first payload and updates the store accordingly.
During usage,
- the stores are queried for the feature along with its segments definitions
- the evaluation algorithm is invoked.
- 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.2.0.tar.gz
(9.1 kB
view hashes)
Built Distribution
leanbase-1.2.0-py3-none-any.whl
(13.6 kB
view hashes)