Basic Integration Platform
Provides a platform for automation with code-first approach, with embedded batteries:
- Tracing (journals)
- Internal and user-defined API
- Ultra-light but rich mobile-first UI
- Embedded key-value storage
It is heavily inspired by node-red and aims to provide same enjoyment during development but without mess of nodes and connections for tasks a little bit more complicated than just hello world.
The platform also tries to be easy in deployment and maintaining. Code could be stored in a SCM (ex: git) and persistent storage is just a single file that could be backed up and restored trivially.
Because memory and CPU consumption relatively low a solution based on the platform could be launched even on Raspberry Pi Zero with 512MB RAM.
Install
pip install binp uvicorn[standard]
Example:
from random import randint
from binp import BINP
binp = BINP()
@binp.app.post('/random', response_model=int)
@binp.journal
async def generate_random():
"""
Generate random number in range 0 ... 1024
"""
return randint(0, 1024)
@binp.action
@binp.journal
async def currency_rate():
"""
Fetch currency rate for EUR -> USD
"""
# go to external service
euro = 1.3
await binp.journal.record('rates fetched', base_currency='USD', euro=euro)
Save as 'example.py' and run it by
uvicorn example:binp.app
TIP: pass
--reloadflag touvicornto support automatic reload during development
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
Configuration
Default configuration can be changed by environment variables:
DEV- setDEV=trueto enable development modeDB_URL- database SQLITE URL, defaultsqlite:///data.db
HTTP port and binding address configured by uvicorn:
--port- set listening port, default8000--host- set binding host, default127.0.0.1
For uvicorn command should be like
uvicorn <python file without .py>:<binp instance>.app
Metadata
Release files for binp 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| binp-0.0.7.tar.gz | 131.6 kB | Without provenance | Details for binp-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binp-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for binp-0.0.7-py3-none-any.whl |
Total release size: 265.5 kB
Release files / binp-0.0.7.tar.gz
| Download URL | binp-0.0.7.tar.gz |
|---|---|
| Size | 131.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66adb104f66691362692ab97a737687faa1ec17aca8687c358910a2ac8933a14
|
|
BLAKE2b-256 checksum How to use checksums |
87ece72662d585d98c644be0ac23b2714137304e224844167ed8ee1f6c9e9201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / binp-0.0.7-py3-none-any.whl
| Download URL | binp-0.0.7-py3-none-any.whl |
|---|---|
| Size | 134.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdacdd66e739195f142e10886656e436fca79d1151b1e656cb565b5b0065cff7
|
|
BLAKE2b-256 checksum How to use checksums |
6a5f033c8a247cb9f26ade71a2fff6e60a9228585657f1aeca8ab932c1e1848d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for binp 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.