Skip to main content

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:

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

Docker stuff

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

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 1.6.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eric-api 1.6.0.9
File Size Uploaded
eric_api-1.6.0.9.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eric-api 1.6.0.9
File Interpreter ABI Platform
eric_api-1.6.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / eric_api-1.6.0.9.tar.gz

Download URL eric_api-1.6.0.9.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
60b4107d69d93b3364ff93232bb24596b3af3c0aeb3f72470499f45fb910bc95
BLAKE2b-256 checksum
How to use checksums
c0c183fa00e2e43e9dcb99dc5093368cbd09e786d3112948310edd8ba894d31d
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-94-generic

Release files / eric_api-1.6.0.9-py3-none-any.whl

Download URL eric_api-1.6.0.9-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
148b20f2b4d14c7b1ce7321b8c2202d8ca11c866241470a1fd4239edd305fb0a
BLAKE2b-256 checksum
How to use checksums
4c64d1862845e8509e2f059009f376a51f50fc4da1d918a1e3921be69b9863eb
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-94-generic
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page