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.1.tar.gz
(124.2 kB
view details)
Built Distribution
binp-0.0.1-py3-none-any.whl
(128.8 kB
view details)
File details
Details for the file binp-0.0.1.tar.gz
.
File metadata
- Download URL: binp-0.0.1.tar.gz
- Upload date:
- Size: 124.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d76a784718c85506ca8552c0f182e7865a5ac91260fe9b3486b30fbaa72e61b1 |
|
MD5 | 50f5f24bce1ae17d8d0a97ed2b5fedc9 |
|
BLAKE2b-256 | efe9978b542e6fc9b142a1fe005490297a3773c6cd5f39d872acba4560f75e7f |
File details
Details for the file binp-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: binp-0.0.1-py3-none-any.whl
- Upload date:
- Size: 128.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80309adffa14eea50771fbfc3a39321490698b3c736d291ac31f6fb2bfcf37c1 |
|
MD5 | c86bef821ec21b35a029c09d3d992155 |
|
BLAKE2b-256 | be68cc8c91231dc77065ba82ec703bc4a8078744e49d72a694cfc1a56d72ec85 |