A Python Fast API app that integrate with a stream.
- 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
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.
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
- Original data from stream:
- Normalizing data:
- Matched rules:
- Stats (Bonus) - Retrieve the current metrics
GET https://satisfied-berty-mai2-b6a31fff.koyeb.app/stats
- Rules get - Retrieve the current rules from the configuration
GET https://satisfied-berty-mai2-b6a31fff.koyeb.app/get_rules
- Update rules - Update the rules from the configuration.
POST https://satisfied-berty-mai2-b6a31fff.koyeb.app/update_rules