# 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/44/f8/974926139683674b546b5b921a9a5bba3865f85aefc45c5cb827117c7197/FlaskStarterApp-1.0.3.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.3",
"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": "5a12345e619b9bc3aebcc3ffce779918fec94c9de4d9b5f12744959d9235aed8",
"md5": "9fa330593529a999f5c5549a4c4c52f3",
"sha256": "bfbfd42098fbc5928238982b11dccb77524b406f2369285dc5afe942803c4d32"
},
"downloads": -1,
"filename": "FlaskStarterApp-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fa330593529a999f5c5549a4c4c52f3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8065,
"upload_time": "2024-09-09T12:12:02",
"upload_time_iso_8601": "2024-09-09T12:12:02.437353Z",
"url": "https://files.pythonhosted.org/packages/5a/12/345e619b9bc3aebcc3ffce779918fec94c9de4d9b5f12744959d9235aed8/FlaskStarterApp-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "44f8974926139683674b546b5b921a9a5bba3865f85aefc45c5cb827117c7197",
"md5": "be9edfd6dd52616d459c5d58eec086ab",
"sha256": "98196d6e603317ab4e9981350248c58771e5aa3b17cc7ea41c137fb6154c47c5"
},
"downloads": -1,
"filename": "FlaskStarterApp-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "be9edfd6dd52616d459c5d58eec086ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8550,
"upload_time": "2024-09-09T12:12:04",
"upload_time_iso_8601": "2024-09-09T12:12:04.333789Z",
"url": "https://files.pythonhosted.org/packages/44/f8/974926139683674b546b5b921a9a5bba3865f85aefc45c5cb827117c7197/FlaskStarterApp-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 12:12:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Hardvan",
"github_project": "FlaskStarter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "flaskstarterapp"
}