# FlaskStarter
FlaskStarter is a project automation script designed to kickstart your Flask web application development. It helps you set up a Flask project structure, including a virtual environment creation, a bare-bones app.py file for the backend, templates & static folders along with the index.html, index.css & index.js files for the frontend.
## Features
- **Virtual Environment Creation**: FlaskStarter automates the creation of a virtual environment, isolating your project dependencies.
- **Flask App Boilerplate**: Generates a basic Flask application template with a Hello World home page.
- **Directory Structure**: Sets up a project structure with templates, static folders, and a .gitignore file to manage Flask assets and project files.
- **Dependency Management**: Includes a batch script for installing Flask and other project dependencies from a requirements.txt file.
- **Cleanup**: A separate script (deleter.py) is provided for testing and learning purposes. It deletes all project files and directories, leaving only FlaskStarter.py intact.
## Use Cases
- Quickly start a new Flask project with a clean structure.
- Prototype Flask web applications.
- Experiment with Flask and frontend development.
- Automate the setup and teardown of Flask projects for testing or learning purposes.
## Getting Started
1. Install the FlaskStarter package using the following command:
```bash
pip install FlaskStarterApp
```
OR
Clone this repository using the following command:
```bash
git clone https://github.com/Hardvan/FlaskStarter
cd FlaskStarter
pip install .
```
2. Call the `create_flask_project` function from the FlaskStarter package to create a new Flask project:
```python
from FlaskStarter import create_flask_project
create_flask_project()
```
After clicking on the link `http://127.0.0.1:5000`, you should see a Hello, World message h1 title on the webpage.
The function accepts the following parameters:
- **root_dir (str, optional):** Root directory for the project. Defaults to os.getcwd().
- **create_venv (bool, optional):** Create virtual environment. Defaults to True.
- **create_app (bool, optional):** Create app.py. Defaults to True.
- **create_html (bool, optional):** Create index.html. Defaults to True.
- **create_css (bool, optional):** Create index.css. Defaults to True.
- **create_js (bool, optional):** Create index.js. Defaults to True.
- **create_gitignore (bool, optional):** Create .gitignore. Defaults to True.
- **execute_batch (bool, optional):** Execute the batch file. Defaults to True.
3. View the [`run.py`](./run.py) file for a complete example.
## Project Files
- **FlaskStarter.py**: The main automation script that sets up your Flask project.
- **deleter.py**: A script for deleting project files and directories, leaving only FlaskStarter.py intact. Useful for cleaning up after your project is complete. Mainly for testing purposes, not recommended for production use.
- **after.bat**: A batch script for activating the virtual environment, installing Flask and other dependencies, and running your Flask app.
## Note
- FlaskStartApp is the name of the package on PyPI, while FlaskStarter is the name of the package in the repository.
- FlaskStarter.py is the primary automation script, while deleter.py is intended for cleaning up the project files after use.
- Make sure to customize your Flask app code in app.py and add any additional dependencies to requirements.txt.
- Happy coding! 😊
Raw data
{
"_id": null,
"home_page": "https://github.com/Hardvan/FlaskStarter",
"name": "FlaskStarterApp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "flask, automation, flask-starter, flask-starter-cli, web-development, web",
"author": "Hardik Pawar",
"author_email": "hardikpawarh@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/00/8d/785e9240bd9f1f010fd6ddff4420219d20b775e1b7e2b3b13fe14a22548f/FlaskStarterApp-1.0.2.tar.gz",
"platform": null,
"description": "# FlaskStarter\r\n\r\nFlaskStarter is a project automation script designed to kickstart your Flask web application development. It helps you set up a Flask project structure, including a virtual environment creation, a bare-bones app.py file for the backend, templates & static folders along with the index.html, index.css & index.js files for the frontend.\r\n\r\n## Features\r\n\r\n- **Virtual Environment Creation**: FlaskStarter automates the creation of a virtual environment, isolating your project dependencies.\r\n\r\n- **Flask App Boilerplate**: Generates a basic Flask application template with a Hello World home page.\r\n\r\n- **Directory Structure**: Sets up a project structure with templates, static folders, and a .gitignore file to manage Flask assets and project files.\r\n\r\n- **Dependency Management**: Includes a batch script for installing Flask and other project dependencies from a requirements.txt file.\r\n\r\n- **Cleanup**: A separate script (deleter.py) is provided for testing and learning purposes. It deletes all project files and directories, leaving only FlaskStarter.py intact.\r\n\r\n## Use Cases\r\n\r\n- Quickly start a new Flask project with a clean structure.\r\n- Prototype Flask web applications.\r\n- Experiment with Flask and frontend development.\r\n- Automate the setup and teardown of Flask projects for testing or learning purposes.\r\n\r\n## Getting Started\r\n\r\n1. Install the FlaskStarter package using the following command:\r\n\r\n ```bash\r\n pip install FlaskStarterApp\r\n ```\r\n\r\n OR\r\n\r\n Clone this repository using the following command:\r\n\r\n ```bash\r\n git clone https://github.com/Hardvan/FlaskStarter\r\n cd FlaskStarter\r\n pip install .\r\n ```\r\n\r\n2. Call the `create_flask_project` function from the FlaskStarter package to create a new Flask project:\r\n\r\n ```python\r\n from FlaskStarter import create_flask_project\r\n\r\n create_flask_project()\r\n ```\r\n\r\n After clicking on the link `http://127.0.0.1:5000`, you should see a Hello, World message h1 title on the webpage.\r\n\r\n The function accepts the following parameters:\r\n\r\n - **root_dir (str, optional):** Root directory for the project. Defaults to os.getcwd().\r\n - **create_venv (bool, optional):** Create virtual environment. Defaults to True.\r\n - **create_app (bool, optional):** Create app.py. Defaults to True.\r\n - **create_html (bool, optional):** Create index.html. Defaults to True.\r\n - **create_css (bool, optional):** Create index.css. Defaults to True.\r\n - **create_js (bool, optional):** Create index.js. Defaults to True.\r\n - **create_gitignore (bool, optional):** Create .gitignore. Defaults to True.\r\n - **execute_batch (bool, optional):** Execute the batch file. Defaults to True.\r\n\r\n3. View the [`run.py`](./run.py) file for a complete example.\r\n\r\n## Project Files\r\n\r\n- **FlaskStarter.py**: The main automation script that sets up your Flask project.\r\n\r\n- **deleter.py**: A script for deleting project files and directories, leaving only FlaskStarter.py intact. Useful for cleaning up after your project is complete. Mainly for testing purposes, not recommended for production use.\r\n\r\n- **after.bat**: A batch script for activating the virtual environment, installing Flask and other dependencies, and running your Flask app.\r\n\r\n## Note\r\n\r\n- FlaskStartApp is the name of the package on PyPI, while FlaskStarter is the name of the package in the repository.\r\n\r\n- FlaskStarter.py is the primary automation script, while deleter.py is intended for cleaning up the project files after use.\r\n\r\n- Make sure to customize your Flask app code in app.py and add any additional dependencies to requirements.txt.\r\n\r\n- Happy coding! \u00f0\u0178\u02dc\u0160\r\n\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "FlaskStarter is a project automation script designed to kickstart your Flask web application development. It helps you set up a Flask project structure, including a virtual environment creation, a bare-bones app.py file for the backend, templates & static folders along with the index.html, index.css & index.js files for the frontend.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/Hardvan/FlaskStarter"
},
"split_keywords": [
"flask",
" automation",
" flask-starter",
" flask-starter-cli",
" web-development",
" web"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97fad92005a6352b0fa8dbde5f65991706348de73675bc848dba1adaefcacd13",
"md5": "65dd49544c3b4310aac2258bf139c292",
"sha256": "804b06e79560eca1a4a82d8043a9ae6ec8e3f4ad9c87c5522dc7422f2ec10319"
},
"downloads": -1,
"filename": "FlaskStarterApp-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65dd49544c3b4310aac2258bf139c292",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8065,
"upload_time": "2024-03-21T13:27:45",
"upload_time_iso_8601": "2024-03-21T13:27:45.442231Z",
"url": "https://files.pythonhosted.org/packages/97/fa/d92005a6352b0fa8dbde5f65991706348de73675bc848dba1adaefcacd13/FlaskStarterApp-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "008d785e9240bd9f1f010fd6ddff4420219d20b775e1b7e2b3b13fe14a22548f",
"md5": "c997b7d7dab8aa43524578041c289f8e",
"sha256": "24a755be8363898194e0045e81181d5e0f0d4885cfc330f5711b9739b0a6c7d5"
},
"downloads": -1,
"filename": "FlaskStarterApp-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c997b7d7dab8aa43524578041c289f8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8519,
"upload_time": "2024-03-21T13:27:47",
"upload_time_iso_8601": "2024-03-21T13:27:47.151788Z",
"url": "https://files.pythonhosted.org/packages/00/8d/785e9240bd9f1f010fd6ddff4420219d20b775e1b7e2b3b13fe14a22548f/FlaskStarterApp-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-21 13:27:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Hardvan",
"github_project": "FlaskStarter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "blinker",
"specs": [
[
"==",
"1.7.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "Flask",
"specs": [
[
"==",
"3.0.2"
]
]
},
{
"name": "itsdangerous",
"specs": [
[
"==",
"2.1.2"
]
]
},
{
"name": "Jinja2",
"specs": [
[
"==",
"3.1.3"
]
]
},
{
"name": "MarkupSafe",
"specs": [
[
"==",
"2.1.5"
]
]
},
{
"name": "Werkzeug",
"specs": [
[
"==",
"3.0.1"
]
]
}
],
"lcname": "flaskstarterapp"
}