Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/antonio-pedro99/irctc-backend
- Owner: antonio-pedro99
- License: apache-2.0
- Created: 2022-03-28T11:00:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T15:52:14.000Z (almost 2 years ago)
- Last Synced: 2023-03-10T01:17:10.192Z (over 1 year ago)
- Topics: authentication, flask, python
- Language: Python
- Homepage:
- Size: 19.9 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: License
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/