https://github.com/nikhil25803/sns-processing
Python script to process data from AWS SNS and update in the local database. For ETHOS'23! ... Fun fact🤫 - We won!!
https://github.com/nikhil25803/sns-processing
aws aws-sns fastapi python3
Last synced: about 2 months ago
JSON representation
Python script to process data from AWS SNS and update in the local database. For ETHOS'23! ... Fun fact🤫 - We won!!
- Host: GitHub
- URL: https://github.com/nikhil25803/sns-processing
- Owner: nikhil25803
- License: mit
- Created: 2023-01-03T16:00:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T14:51:32.000Z (over 3 years ago)
- Last Synced: 2025-04-04T15:35:38.857Z (about 1 year ago)
- Topics: aws, aws-sns, fastapi, python3
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Setup
---
### Create and activate a virtual environment
```powershell
python -m venv env
```
```powershell
env\scripts\activate
```
### Install the dependenies
```
pip install -r requirements.txt
```
### Run the server on local system
First comment out the following section in `main.py`
```python
port = 8000
ngrok_tunnel = ngrok.connect(port)
print('Public URL:', ngrok_tunnel.public_url)
nest_asyncio.apply()
if __name__ == "__main__":
uvicorn.run(app, port=8000)
```
Then run the following command in the terminal
```powershell
uvicorn main:app --reload
```
**OR**
### Run the server on `ngrok`
In this case, do not make any changes in the `main.py`. Or if made, just uncomment the `ngrok_tunnel` code.
Then run the following command in the powershell
```
python main.py
```
> Run the server on a URL provided, ends with `.ngrok.io`
**Note**
Running the server will create a `cars_database.db` in the root directory.