A ready-to-use SSE messaging microservice implementation.
Introduction
Backend documentation https://laxertu.github.io/eric/docs.html
REST services rely on FastApi + Uvicorn
Features:
- channel subscription
- broadcasting
- message deliver to one client
- SSE compliant streaming
Installation
Docker
Here you can find a couple of prefabs for redis and api itself
Services exposed are
http://127.0.0.1:5540/ Redis Insights. Host to use when creating dbs have to be "redis", as per service definition http://127.0.0.1:8000/docs Swagger
Pip
pip install eric-api
Start webserver
uvicorn eric_api:app
API documentation is available at http://127.0.0.1:8000/docs by default
See correspondant uvicorn configuration https://www.uvicorn.org/deployment/#running-from-the-command-line
Bug Tracker: https://github.com/laxertu/eric-api/issues
Environment setup
Configuration file is /.eric-api.env
Logging
Setup logging level
Activate it by setting .eric-api.env LOGLEVEL variable according to literals supported by python logger, for example:
LOGLEVEL=DEBUG
LOGGING_CHANNEL activates a channel identified by its value that receive broadcasts from logger used in the API. You can enable it if you want to open a real time SSE alerting service.
LOGGING_CHANNEL=logging_channel_id
Redis persistence support
Setup it with the following:
QUEUES_FACTORY=redis
Redis host is configured by
REDIS_HOST=[host to use]
REDIS_PORT=[port]
REDIS_DB=[db number]
Metadata
Release files for eric-api 2.0.0
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 |
|---|---|---|---|---|
| eric_api-2.0.0.tar.gz | 4.5 kB | Without provenance | Details for eric_api-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eric_api-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for eric_api-2.0.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / eric_api-2.0.0.tar.gz
| Download URL | eric_api-2.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
258f690f36ca08df00592dc7db1608b87b994c041c5a3e43fcb0a759f540c576
|
|
BLAKE2b-256 checksum How to use checksums |
8ca7ca41edf5dc4bb6f2d2bf0eb4eef03dca866269c698afef86eaccf17d2999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-149-generic
|
Release files / eric_api-2.0.0-py3-none-any.whl
| Download URL | eric_api-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edd2543449b1c46d761307d04fbdef71757432d77e027a4e73ceaa69b6660d05
|
|
BLAKE2b-256 checksum How to use checksums |
f5fea266d9ab883ca57fc0b7bbc719b3e298935b492b23ae86aff70c1ccb7f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-149-generic
|
Security for eric-api 2.0.0
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.