Skip to content

A Python Fast API app that integrate with a stream, manipulate the data and route the data back to the sender based on a configuration.

Notifications You must be signed in to change notification settings

MaiA14/streamer

Repository files navigation

Streamer

A Python Fast API app that integrate with a stream.

Features

  • HTTPS (Bonus)
  • Handle data according rules config
  • Support both partial & complete objects of supplied proto
  • Validate specified headers
  • Normalizing data
  • Route data to downstream services based on a configuration file.
  • Stats of stream (Bonus)
  • Get current rules
  • Update rules

Running this server

POST https://satisfied-berty-mai2-b6a31fff.koyeb.app/stream_start

📝 Note: No need to pass body in order to get data. The required parameters are stored in the config file.


Reasons:
  • Accessibility - this POST request won't work with a private email, because the hiring url supports the email you supplied.

  • Security - configuration files or environment variables can be protected with access controls and encryption, ensuring that only authorized processes or personnel can access the key.

Running this server locally

Create virtual env:

python3.8 -m venv venv

Activate virtual env:

. venv/bin/activate

Install requirements:

pip3 install -r requirements.txt

Run the server:

python3.8 -m uvicorn main:app --reload

Data:

  • Original data from stream:

image

  • Normalizing data:

image

  • Matched rules:

image

  • Stats (Bonus) - Retrieve the current metrics
GET https://satisfied-berty-mai2-b6a31fff.koyeb.app/stats

image

  • Rules get - Retrieve the current rules from the configuration
GET https://satisfied-berty-mai2-b6a31fff.koyeb.app/get_rules

image

  • Update rules - Update the rules from the configuration.
POST https://satisfied-berty-mai2-b6a31fff.koyeb.app/update_rules

image

About

A Python Fast API app that integrate with a stream, manipulate the data and route the data back to the sender based on a configuration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages