pyapp-cli 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyapp_cli-0.1.2/LICENSE +21 -0
- pyapp_cli-0.1.2/PKG-INFO +57 -0
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/README.md +2 -2
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/pyproject.toml +2 -1
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/src/pyapp_cli/generator.py +5 -14
- pyapp_cli-0.1.2/src/pyapp_cli/templates.py +24 -0
- pyapp_cli-0.1.1/PKG-INFO +0 -36
- pyapp_cli-0.1.1/src/pyapp_cli/templates/fastapi.py +0 -8
- pyapp_cli-0.1.1/src/pyapp_cli/templates/flask.py +0 -8
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/src/pyapp_cli/__init__.py +0 -0
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/src/pyapp_cli/logger.py +0 -0
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/src/pyapp_cli/questions.py +0 -0
- {pyapp_cli-0.1.1 → pyapp_cli-0.1.2}/src/pyapp_cli/schemas.py +0 -0
pyapp_cli-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mrdsx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pyapp_cli-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: pyapp-cli
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
License: MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2026 mrdsx
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
Requires-Dist: colorama>=0.4.6
|
|
27
|
+
Requires-Dist: fire>=0.7.1
|
|
28
|
+
Requires-Dist: inquirerpy>=0.3.4
|
|
29
|
+
Requires-Dist: pydantic>=2.12.5
|
|
30
|
+
Requires-Python: >=3.12, <4.0
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# PyApp CLI
|
|
34
|
+
|
|
35
|
+
## About
|
|
36
|
+
|
|
37
|
+
PyApp CLI is a powerful tool that makes python project setup painless. With this CLI you can easily scaffold FastAPI, Flask or Django project with all necessary dependencies.
|
|
38
|
+
|
|
39
|
+
## Supported platforms
|
|
40
|
+
|
|
41
|
+
The CLI can be run on Ubuntu Linux, but it's not guaranteed the CLI will work on other platforms.
|
|
42
|
+
|
|
43
|
+
## Get started
|
|
44
|
+
|
|
45
|
+
Before setting up new project, install Python and appropriate package manager you'll use for your project. PyAPP CLI supports following package managers:
|
|
46
|
+
|
|
47
|
+
- pip
|
|
48
|
+
- poetry
|
|
49
|
+
- uv
|
|
50
|
+
|
|
51
|
+
## How to run
|
|
52
|
+
|
|
53
|
+
Install uv package manager. Then, run `uvx pyapp-cli@latest init` to use the CLI.
|
|
54
|
+
|
|
55
|
+
## Contributing
|
|
56
|
+
|
|
57
|
+
Feel free to open an issue if you have found a bug, have a feature request or you want to expand list of available libraries/frameworks/package managers. You also can open PR if you wish.
|
|
@@ -16,9 +16,9 @@ Before setting up new project, install Python and appropriate package manager yo
|
|
|
16
16
|
- poetry
|
|
17
17
|
- uv
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## How to run
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Install uv package manager. Then, run `uvx pyapp-cli@latest init` to use the CLI.
|
|
22
22
|
|
|
23
23
|
## Contributing
|
|
24
24
|
|
|
@@ -5,8 +5,9 @@ import subprocess
|
|
|
5
5
|
import sys
|
|
6
6
|
from typing import Literal
|
|
7
7
|
|
|
8
|
-
from InquirerPy import prompt
|
|
8
|
+
from InquirerPy import prompt # type: ignore
|
|
9
9
|
|
|
10
|
+
from .templates import templates
|
|
10
11
|
from .logger import Logger
|
|
11
12
|
from .questions import questions
|
|
12
13
|
from .schemas import Answers
|
|
@@ -16,8 +17,7 @@ venv_dir = ".venv"
|
|
|
16
17
|
|
|
17
18
|
class ProjectGenerator:
|
|
18
19
|
# frameworks without built-in CLI for scaffolding the project
|
|
19
|
-
|
|
20
|
-
_templates_dir = os.path.abspath("templates")
|
|
20
|
+
_no_cli_frameworks = set(["FastAPI", "Flask"])
|
|
21
21
|
|
|
22
22
|
def __init__(self, logger: Logger) -> None:
|
|
23
23
|
self._logger = logger
|
|
@@ -35,7 +35,7 @@ class ProjectGenerator:
|
|
|
35
35
|
elif answers.package_manager == "uv":
|
|
36
36
|
self._ensure_uv_installation()
|
|
37
37
|
|
|
38
|
-
if answers.framework == "None" or answers.framework in self.
|
|
38
|
+
if answers.framework == "None" or answers.framework in self._no_cli_frameworks:
|
|
39
39
|
self._create_main_file(answers.source_folder, answers.framework)
|
|
40
40
|
|
|
41
41
|
dependencies = answers.libraries
|
|
@@ -103,16 +103,7 @@ class ProjectGenerator:
|
|
|
103
103
|
python_file.parent.mkdir(parents=True, exist_ok=True)
|
|
104
104
|
self._logger.log("Added main.py")
|
|
105
105
|
|
|
106
|
-
project_template =
|
|
107
|
-
try:
|
|
108
|
-
template_path = os.path.join(
|
|
109
|
-
self._templates_dir, f"{self._framework_id(framework)}.py"
|
|
110
|
-
)
|
|
111
|
-
with open(template_path, "r") as template_file:
|
|
112
|
-
project_template = template_file.read()
|
|
113
|
-
self._logger.log(f"Applied {self._framework_id(framework)} template")
|
|
114
|
-
except FileNotFoundError:
|
|
115
|
-
pass
|
|
106
|
+
project_template = templates.get(self._framework_id(framework))
|
|
116
107
|
|
|
117
108
|
with open(python_file, "w") as f:
|
|
118
109
|
if project_template is not None:
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
fastapi_template = """from fastapi import FastAPI
|
|
2
|
+
|
|
3
|
+
app = FastAPI()
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@app.get("/")
|
|
7
|
+
def read_root():
|
|
8
|
+
return "Hello, World!"
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
flask_template = """from flask import Flask
|
|
12
|
+
|
|
13
|
+
app = Flask(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@app.get("/")
|
|
17
|
+
def hello_world():
|
|
18
|
+
return "Hello, World!"
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
templates = {
|
|
22
|
+
"fastapi": fastapi_template,
|
|
23
|
+
"flask": flask_template,
|
|
24
|
+
}
|
pyapp_cli-0.1.1/PKG-INFO
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: pyapp-cli
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Add your description here
|
|
5
|
-
Requires-Dist: colorama>=0.4.6
|
|
6
|
-
Requires-Dist: fire>=0.7.1
|
|
7
|
-
Requires-Dist: inquirerpy>=0.3.4
|
|
8
|
-
Requires-Dist: pydantic>=2.12.5
|
|
9
|
-
Requires-Python: >=3.12, <4.0
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
|
|
12
|
-
# PyApp CLI
|
|
13
|
-
|
|
14
|
-
## About
|
|
15
|
-
|
|
16
|
-
PyApp CLI is a powerful tool that makes python project setup painless. With this CLI you can easily scaffold FastAPI, Flask or Django project with all necessary dependencies.
|
|
17
|
-
|
|
18
|
-
## Supported platforms
|
|
19
|
-
|
|
20
|
-
The CLI can be run on Ubuntu Linux, but it's not guaranteed the CLI will work on other platforms.
|
|
21
|
-
|
|
22
|
-
## Get started
|
|
23
|
-
|
|
24
|
-
Before setting up new project, install Python and appropriate package manager you'll use for your project. PyAPP CLI supports following package managers:
|
|
25
|
-
|
|
26
|
-
- pip
|
|
27
|
-
- poetry
|
|
28
|
-
- uv
|
|
29
|
-
|
|
30
|
-
Use `uvx pyapp-cli` command with `uv` package manager to run the CLI without saving it.
|
|
31
|
-
|
|
32
|
-
Alertnatively, you can use python3 prefix when running command.
|
|
33
|
-
|
|
34
|
-
## Contributing
|
|
35
|
-
|
|
36
|
-
Feel free to open an issue if you have found a bug, have a feature request or you want to expand list of available libraries/frameworks/package managers. You also can open PR if you wish.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|