Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/antonio-pedro99/irctc-backend

Backend for a train reservation System using FastAPI and MySQL
https://github.com/antonio-pedro99/irctc-backend

authentication flask python

Last synced: 24 days ago
JSON representation

Backend for a train reservation System using FastAPI and MySQL

Awesome Lists containing this project

README

        

# backend


Backend for IRCTC APP . This backend was used to maintain, secure and give access to the database through RestAPI calls.

## Inital setup for project
- checkout to dev branch
- git clone
- pip install virtualenv
- cd backend
- virtualenv venv
- venv\Scripts\activate (windows)
- source venv/bin/activate (UNIX systems)
- pip install -r requirements.txt

## MySQL Database
You need a mysql server running on your machine. Therefore, make sure you have an instance of mysql running. Furthermore, you now need to create the `railway_system` database, you can name it as per your wishes. After this, follow the steps:
- Go to `db` and run each .sql file starting from railway_system, views, triggers, data.
- Create .env file and fill the parameters accordingly. It should look like this
`MYSQL_DATABASE = ""
MYSQL_USER = ""
MYSQL_ROOT_PASSWORD = ""`
Now you will be able to acess the database.

## Run the backend
- uvicorn main:app --reload
- open http://localhost:8000/docs

## Testing
- open http://localhost:8000/docs

## Subsequent updations
- git pull
- venv\Scripts\activate (windows)
- source venv/bin/activate (UNIX systems)
- pip install -r requirements.txt

___
## Interactive Docs
- open http://localhost:8000/docs
- alternatively http://localhost:8000/redoc
___

# FastAPI GUIDE
https://fastapi.tiangolo.com/
# AWS GUIDE

# SQLALCHEMY GUIDE

https://docs.sqlalchemy.org/en/14/