- Flask API
- Waitress
This project is a Flask-based web application packaged for production and served with Waitress.
app/
: Directory containing the Flask application code.__init__.py
: Initializes the Flask appmain.py
: App init file
pyproject.toml
: Configuration fileMANIFEST.in
: Track additional filesREADME.md
: Project details.
- Packaging: Perform packaging of the application and generate a build file (.whl)
- Waitress: Serve the web application using the build file
- Python >=3.10.7
git clone https://github.com/dpralay07/python-flask-web-app-packaging.git
cd python-flask-web-app-packaging
pip install -r requirements.txt
python -m build
This will build the application and generate a build file (.whl) inside the dist/ directory.
Copy the "flask_app_packaging-0.1.0-py3-none-any.whl" file from the dist/ directory and move to the deployment directory.
Install the build with the following command:
pip install flask_app_packaging-0.1.0-py3-none-any.whl
Execute the following command:
waitress-serve --port=80 app.main:app
The Flask API will be available at http://<your_ip_address>:80
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request to improve this project.
For any questions or feedback, please contact [email protected].