A REST client library for AICore.
Project description
Procaine is a REST client library for AICore API. Reduces the pain.
Installation
To use Procaine, first install it using pip:
$ pip install procaine
Usage
Run a flow:
>>> from procaine import aiapi >>> auth = {"url": AUTH_URL, "clientid": CLIENT_ID, "clientsecret": CLIENT_SECRET} >>> api = aiapi.Client(AI_API_URL, auth) >>> hello = api.execute_flow("hello-world") >>> hello {'id': 'e96bc32ee9bf9e63', 'message': 'Execution scheduled', 'status': 'UNKNOWN', 'targetStatus': 'COMPLETED'} >>> api.execution(hello) { ... 'status': 'COMPLETED', ... 'targetStatus': 'COMPLETED'} >>> logs = api.execution_logs(hello) >>> print(logs) _____________ < hello world > ------------- \ \ \ ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/
Documentation
More usage examples and detailed documentation could be found on https://procaine.readthedocs.io/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
procaine-0.1.0.tar.gz
(13.1 kB
view hashes)
Built Distributions
procaine-0.1.0-py3-none-any.whl
(15.1 kB
view hashes)
procaine-0.1.0-1-py3-none-any.whl
(15.2 kB
view hashes)
Close
Hashes for procaine-0.1.0-1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a590994a365e0ff13a238a1d3d377d72945fac84e58e1ddaf064cdaf2e9dc63 |
|
MD5 | 0c2a0d78b6b974220f30e8b7fd8752eb |
|
BLAKE2b-256 | 812d336de9f43609395a6675e1ae7b24bcfec486fbf4efd2328ea6d2f1f9bdd4 |