Basic Integration Platform
Project description
Basic Integration Platform
Provides all-in-one package with:
- tracing
- journal
- Web UI
Tends to help to create basic integration solutions. Heavily inspired by node-red.
Install
pip install binp uvicorn
Example:
from random import randint
from binp import BINP
bip = BINP()
@bip.app.post('/random', response_model=int)
@bip.journal
async def generate_random():
"""
Generate random number in range 0 ... 1024
"""
return randint(0, 1024)
@bip.action
@bip.journal
async def currency_rate():
"""
Fetch currency rate for EUR -> USD
"""
# go to external service
euro = 1.3
await bip.journal.record('rates fetched', base_currency='USD', euro=euro)
Save as 'example.py' and run it by
uvicorn example:bip.app
It will expose
- http://127.0.0.1:8000 - UI and API
- http://127.0.0.1:8000/docs - Swagger docs for user-defined APIs
- http://127.0.0.1:8000/internal/docs - Swagger docs for internal APIs
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
binp-0.0.2.tar.gz
(121.0 kB
view details)
Built Distribution
binp-0.0.2-py3-none-any.whl
(122.3 kB
view details)
File details
Details for the file binp-0.0.2.tar.gz
.
File metadata
- Download URL: binp-0.0.2.tar.gz
- Upload date:
- Size: 121.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f45dca763df1407519248f07f49f977c2c3a5953a0bf4c6a67c52babbfa93102 |
|
MD5 | 2e144096ad44250860473dec1fc0f69f |
|
BLAKE2b-256 | 18ef99a8b2415628f8397d91b00b15c33eeb7c43981c32b1b17861e6239a228d |
File details
Details for the file binp-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: binp-0.0.2-py3-none-any.whl
- Upload date:
- Size: 122.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a73963a3b4c45f6a5267dc89df5aaf3131f03b408cef31f71380fc35c30199c |
|
MD5 | ecfcd10323d94d8cadacee95766839b5 |
|
BLAKE2b-256 | 0351f6086433a5ba8271514f3aca4557c9b26795b1a093d14c2f40967384b2b4 |