Flask application scaffolding tool
Project description
flask-kickstart
This is a Python-based command-line tool for scaffolding a Flask project with a predefined structure. It generates a boilerplate for a Flask application, including basic configuration, routes, templates, and testing setup.
Features
Automatically sets up a Flask project with a basic directory structure. Includes boilerplate code for:
- app/init.py: Flask application factory.
- app/routes.py: Sample route with HTML template rendering.
- config.py: Configurable settings (e.g., SECRET_KEY).
- run.py: Application entry point.
- tests/test_app.py: Basic unit test for Flask routes.
- templates/base.html: Basic HTML template.
- requirements.txt: List of required dependencies (Flask, Flask-SQLAlchemy).
- Object-oriented design to ensure modularity and scalability.
Prerequisites
Before using this tool, ensure you have the following installed:
- Python 3.6+
- Flask (pip install Flask)
Customization
You can modify the template files in the templates/ directory to customize the structure of your Flask project. Placeholders like {{secret_key}} in config.py.template can be dynamically replaced by the tool if needed.
Usage
Create a virtual environment by executing the following command.
python -m venv .venv
Activate the virtual environment using the following script
On Windows
.venv\Scripts\activate
On Linux
source ./.venv/bin/activate
Install flask-kickstart.
pip install flask-kickstart
Once installed, you will be able to run flask_kickstart
Default configuration file is given below.
{
"project": {
"name": "NewFlaskProject",
"author": "Harikumar G",
"description": "Generated using Kickstarter",
"blueprints": [
"main",
"auth",
"api"
]
},
"outputFolder": "../generated"
}
You can customize the behavior by creating a new configuration file in similar format and passing it using '--setting'
flask_kickstart --setting myconfig.json
Contribution
If you'd like to contribute to this project, feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flask_kickstart-0.3.tar.gz
.
File metadata
- Download URL: flask_kickstart-0.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 377c3cc93636c5a2a27c6a0a4fb6cf3388f85c992663a7b1eaafdb901767626c |
|
MD5 | b63bfa3b33ff3bd83fac4a58362b9b61 |
|
BLAKE2b-256 | 5449622e760213752a6a64a8098c249f02f83d4d77dead8f4d7fc9ac5fe6944f |
File details
Details for the file flask_kickstart-0.3-py3-none-any.whl
.
File metadata
- Download URL: flask_kickstart-0.3-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb6d0d2240d838e6fcd2d5d348859181d5b9ea9a177fa30ac1ac1ce3b59549f8 |
|
MD5 | 6579508b57ae8067005d528b407b0399 |
|
BLAKE2b-256 | 725246f487c1a6f5768fb756e77da65274ae7fc4cdb940ff4954055de3159235 |