A simple, scalable, and powerful architecture for building production ready Flask application API services.
This is an attempt to present a way of creating Flask API services using the best tools in the ecosystem with a good project structure that scales very well.
Feel free to explore the codebase to get the most value out of the repo.
This is not supposed to be a template, boilerplate or a framework. It is an opinionated guide that shows how to do some things in a certain way. You are not forced to do everything exactly as it is shown here, decide what works best for you and your team and stay consistent with your style.
├── config
├── log # Required
├── services
│ ├── controller
│ │ ├── n1Controller.py
│ │ ├── n2Controller.py
│ │ ├── ...
│ │ └── nController.py
│ ├── dao
│ │ ├── n1Dao.py
│ │ ├── n2Dao.py
│ │ ├── ...
│ │ └── nDao.py
│ ├── model
│ │ ├── n1Model.py
│ │ ├── n2Model.py
│ │ ├── ...
│ │ └── nModel.py
│ ├── service
│ │ ├── n1Service.py
│ │ ├── n2Service.py
│ │ ├── ...
│ │ └── nService.py
│ │
│ ├── ...
│ │
│ └── app.py
│
├── requirements.txt
├── venv # Optional
├── .gitignore
├── LICENSE
└── README.md
- Fork the repo.
- Clone the repo.
git clone https://github.com/purveshmakode24/bulletproof-flask.git
cd bulletproof-flask
- Create & Activate virtual environment.
python -m venv venv
venv\Scripts\activate
- Install dependencies.
pip install -r requirements.txt
- Modify config.ini as per your requirements.
Note: Add log directory in root if not present.
cd services
python app.py [YOUR_DB_PASS]
- Head over to localhost:5000 in your browser.
Contributions are always welcome! If you have any ideas, suggestions, fixes, feel free to contribute. You can do that by going through the following steps:
- Clone this repo
- Create a branch:
git checkout -b your-feature
- Make some changes
- Test your changes
- Push your branch and open a Pull Request