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.
- Host: GitHub
- URL: https://github.com/maia14/streamer
- Owner: MaiA14
- Created: 2024-08-05T09:07:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-11T02:16:40.000Z (almost 2 years ago)
- Last Synced: 2025-02-22T04:41:10.437Z (over 1 year ago)
- Topics: fastapi, python, stream
- Language: Python
- Homepage:
- Size: 20.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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:

- Normalizing data:

- Matched rules:

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

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

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