An open API service indexing awesome lists of open source software.

https://github.com/maia14/streamer

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.
https://github.com/maia14/streamer

fastapi python stream

Last synced: 3 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# 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

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

```
> :memo: **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:
```bash
python3.8 -m venv venv

```

Activate virtual env:
```bash
. venv/bin/activate

```

Install requirements:
```bash
pip3 install -r requirements.txt

```
Run the server:
```bash
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
```bash
GET https://satisfied-berty-mai2-b6a31fff.koyeb.app/stats

```

image

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

```

image

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

```

image