-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f94acde
commit e2b0db8
Showing
15 changed files
with
265 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
# pitcherflask | ||
|
||
pitcherflask is a tool that helps you set up a basic Flask project structure quickly and easily. Inspired by Rust's Cargo, pitcherflask aims to streamline the process of creating Flask web applications by providing a simple command-line interface (CLI). | ||
|
||
## Features | ||
- Project Creation: Create a new Flask project with the required directory structure (templates, static, static/img). | ||
|
||
|
||
|
||
## Getting Started | ||
|
||
To get started with pitcherflask, follow these steps: | ||
|
||
|
||
Install pitcherflask using pip: | ||
|
||
```bash | ||
pip install pitcherflask | ||
``` | ||
|
||
Create a new pitcherflask project: | ||
```bash | ||
pitcherflask create <your_project_name> | ||
``` | ||
Change into the project directory: | ||
|
||
|
||
```bash | ||
cd <your_project_name> | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
pitcherflask provides the following commands: | ||
|
||
`create <your_project_name>`: Create a new pitcherflask project. | ||
|
||
Feel free to open issues in-case of bugs or suggestions | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE file for details. | ||
|
||
## Roadmap | ||
- Make it more robust | ||
- Perhaps add generative AI capabilities to deploy apps faster | ||
- Solve bugs if any | ||
# pitcherflask | ||
|
||
pitcherflask is a tool that helps you set up a basic Flask project structure quickly and easily. Inspired by Rust's Cargo, pitcherflask aims to streamline the process of creating Flask web applications by providing a simple command-line interface (CLI). | ||
|
||
## Features | ||
- Project Creation: Create a new Flask project with the required directory structure (templates, static, static/img). | ||
|
||
|
||
|
||
## Getting Started | ||
|
||
To get started with pitcherflask, follow these steps: | ||
|
||
|
||
Install pitcherflask using pip: | ||
|
||
```bash | ||
pip install pitcherflask | ||
``` | ||
|
||
Create a new pitcherflask project: | ||
```bash | ||
pitcherflask create <your_project_name> | ||
``` | ||
Change into the project directory: | ||
|
||
|
||
```bash | ||
cd <your_project_name> | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
pitcherflask provides the following commands: | ||
|
||
`create <your_project_name>`: Create a new pitcherflask project. | ||
|
||
Feel free to open issues in-case of bugs or suggestions | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE file for details. | ||
|
||
## Roadmap | ||
- Make it more robust | ||
- Perhaps add generative AI capabilities to deploy apps faster | ||
- Solve bugs if any |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import argparse | ||
import os | ||
|
||
def create_project(args): | ||
project_name = args.project_name | ||
os.mkdir(project_name) | ||
os.mkdir(f'{project_name}/templates') | ||
os.mkdir(f'{project_name}/static') | ||
os.mkdir(f'{project_name}/static/img') | ||
with open(f"{project_name}/templates/index.html",'w') as f: | ||
f.write(""" | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<p>Hello, World!</p> | ||
</body> | ||
</html> | ||
""") | ||
with open(f"{project_name}/main.py",'w') as f: | ||
f.write("""from flask import Flask, render_template | ||
app = Flask(__name__) | ||
@app.route('/') | ||
def index(): | ||
return render_template('index.html') | ||
if __name__ == "__main__": | ||
app.run()""") | ||
with open(f"{project_name}/requirements.txt",'w') as f: | ||
f.write("flask") | ||
with open(f"{project_name}/README.md",'w') as f: | ||
f.write("# A really cool project!") | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='pitcherflask - start developing flask applications without wasting time on setup.', formatter_class=argparse.RawTextHelpFormatter, add_help=False) | ||
subparsers = parser.add_subparsers() | ||
|
||
create_parser = subparsers.add_parser('create', help='Create a new Flask project') | ||
create_parser.add_argument('project_name', type=str, help='Name of the project') | ||
create_parser.set_defaults(func=create_project) | ||
|
||
parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') | ||
|
||
args = parser.parse_args() | ||
if not vars(args): | ||
parser.print_help() | ||
parser.exit() | ||
args.func(args) | ||
|
||
if __name__ == '__main__': | ||
main() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Metadata-Version: 2.1 | ||
Name: pitcherflask | ||
Version: 0.0.6 | ||
Summary: Build a basic flask project without wasting time on setup. | ||
Home-page: http://github.com/divine-architect/pitcherflask | ||
Author: divine-architect | ||
Author-email: solarhatesbeing@gmail.com | ||
License: MIT | ||
Keywords: flask web api | ||
Classifier: Development Status :: 1 - Planning | ||
Classifier: Topic :: Utilities | ||
Classifier: License :: OSI Approved :: MIT License | ||
Description-Content-Type: text/markdown | ||
|
||
# pitcherflask | ||
|
||
pitcherflask is a tool that helps you set up a basic Flask project structure quickly and easily. Inspired by Rust's Cargo, pitcherflask aims to streamline the process of creating Flask web applications by providing a simple command-line interface (CLI). | ||
|
||
## Features | ||
- Project Creation: Create a new Flask project with the required directory structure (templates, static, static/img). | ||
|
||
|
||
|
||
## Getting Started | ||
|
||
To get started with pitcherflask, follow these steps: | ||
|
||
|
||
Install pitcherflask using pip: | ||
|
||
```bash | ||
pip install pitcherflask | ||
``` | ||
|
||
Create a new pitcherflask project: | ||
```bash | ||
pitcherflask create <your_project_name> | ||
``` | ||
Change into the project directory: | ||
|
||
|
||
```bash | ||
cd <your_project_name> | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
pitcherflask provides the following commands: | ||
|
||
`create <your_project_name>`: Create a new pitcherflask project. | ||
|
||
Feel free to open issues in-case of bugs or suggestions | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE file for details. | ||
|
||
## Roadmap | ||
- Make it more robust | ||
- Perhaps add generative AI capabilities to deploy apps faster | ||
- Solve bugs if any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
README.md | ||
setup.py | ||
pitcherflask/__init__.py | ||
pitcherflask/pitcherflask.py | ||
pitcherflask.egg-info/PKG-INFO | ||
pitcherflask.egg-info/SOURCES.txt | ||
pitcherflask.egg-info/dependency_links.txt | ||
pitcherflask.egg-info/entry_points.txt | ||
pitcherflask.egg-info/top_level.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[console_scripts] | ||
pitcherflask = pitcherflask.pitcherflask:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pitcherflask |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import argparse | ||
import os | ||
|
||
def create_project(args): | ||
project_name = args.project_name | ||
os.mkdir(project_name) | ||
os.mkdir(f'{project_name}/templates') | ||
os.mkdir(f'{project_name}/static') | ||
os.mkdir(f'{project_name}/static/img') | ||
with open(f"{project_name}/templates/index.html",'w') as f: | ||
f.write(""" | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<p>Hello, World!</p> | ||
</body> | ||
</html> | ||
""") | ||
with open(f"{project_name}/main.py",'w') as f: | ||
f.write("""from flask import Flask, render_template | ||
app = Flask(__name__) | ||
@app.route('/') | ||
def index(): | ||
return render_template('index.html') | ||
if __name__ == "__main__": | ||
app.run()""") | ||
with open(f"{project_name}/requirements.txt",'w') as f: | ||
f.write("flask") | ||
with open(f"{project_name}/README.md",'w') as f: | ||
f.write("# A really cool project!") | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='pitcherflask - start developing flask applications without wasting time on setup.', formatter_class=argparse.RawTextHelpFormatter, add_help=False) | ||
subparsers = parser.add_subparsers() | ||
|
||
create_parser = subparsers.add_parser('create', help='Create a new Flask project') | ||
create_parser.add_argument('project_name', type=str, help='Name of the project') | ||
create_parser.set_defaults(func=create_project) | ||
|
||
parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') | ||
|
||
args = parser.parse_args() | ||
if not vars(args): | ||
parser.print_help() | ||
parser.exit() | ||
args.func(args) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import os | ||
from setuptools import setup, find_packages | ||
|
||
with open("README.md",'r') as f: | ||
x = f.read() | ||
|
||
setup( | ||
name = "pitcherflask", | ||
version = "0.0.6", | ||
author = "divine-architect", | ||
author_email = "solarhatesbeing@gmail.com", | ||
description = ("Build a flask projects without wasting time on setup."), | ||
license = "MIT", | ||
keywords = "flask web api", | ||
url = "http://github.com/divine-architect/pitcherflask", | ||
packages=find_packages(), | ||
long_description=x, | ||
long_description_content_type='text/markdown', | ||
classifiers=[ | ||
"Development Status :: 1 - Planning", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
entry_points={ | ||
'console_scripts': [ | ||
'pitcherflask = pitcherflask.pitcherflask:main' | ||
] | ||
}, | ||
|
||
) |