fastapp-new 0.0.1__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.
- fastapp_new-0.0.1/.gitignore +16 -0
- fastapp_new-0.0.1/.pre-commit-config.yaml +30 -0
- fastapp_new-0.0.1/.python-version +1 -0
- fastapp_new-0.0.1/LICENSE +21 -0
- fastapp_new-0.0.1/PKG-INFO +108 -0
- fastapp_new-0.0.1/README.md +75 -0
- fastapp_new-0.0.1/pyproject.toml +110 -0
- fastapp_new-0.0.1/src/fastapp_new/__init__.py +1 -0
- fastapp_new-0.0.1/src/fastapp_new/__main__.py +3 -0
- fastapp_new-0.0.1/src/fastapp_new/cli.py +11 -0
- fastapp_new-0.0.1/src/fastapp_new/new.py +495 -0
- fastapp_new-0.0.1/src/fastapp_new/py.typed +0 -0
- fastapp_new-0.0.1/src/fastapp_new/utils/__init__.py +0 -0
- fastapp_new-0.0.1/src/fastapp_new/utils/cli.py +31 -0
- fastapp_new-0.0.1/tests/__init__.py +1 -0
- fastapp_new-0.0.1/tests/test_cli.py +14 -0
- fastapp_new-0.0.1/tests/test_main.py +5 -0
- fastapp_new-0.0.1/tests/test_new.py +138 -0
- fastapp_new-0.0.1/uv.lock +595 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-added-large-files
|
|
6
|
+
- id: check-toml
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
args:
|
|
9
|
+
- --unsafe
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
- repo: local
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff-check
|
|
15
|
+
name: ruff check
|
|
16
|
+
entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix
|
|
17
|
+
language: system
|
|
18
|
+
types:
|
|
19
|
+
- python
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
name: ruff format
|
|
22
|
+
entry: uv run ruff format --force-exclude --exit-non-zero-on-format
|
|
23
|
+
language: system
|
|
24
|
+
types:
|
|
25
|
+
- python
|
|
26
|
+
- id: ty-check
|
|
27
|
+
name: ty check
|
|
28
|
+
entry: uv run ty check src
|
|
29
|
+
language: system
|
|
30
|
+
pass_filenames: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sebastián Ramírez
|
|
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
|
|
13
|
+
all 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
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fastapp-new
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Create a new FastApp project in one command
|
|
5
|
+
Project-URL: Homepage, https://github.com/taehalim/fastapp-new
|
|
6
|
+
Project-URL: Documentation, https://github.com/taehalim/fastapp-new
|
|
7
|
+
Project-URL: Repository, https://github.com/taehalim/fastapp-new
|
|
8
|
+
Project-URL: Issues, https://github.com/taehalim/fastapp-new/issues
|
|
9
|
+
Author: taeha
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Classifier: Topic :: Software Development
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Requires-Dist: rich-toolkit>=0.15.1
|
|
29
|
+
Requires-Dist: rich>=13.7.1
|
|
30
|
+
Requires-Dist: typer>=0.24.1
|
|
31
|
+
Requires-Dist: typing-extensions>=4.12.2
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# fastapp-new
|
|
35
|
+
|
|
36
|
+
Create a new FastApp project in one command.
|
|
37
|
+
|
|
38
|
+
## How to use
|
|
39
|
+
|
|
40
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) following their guide for your system.
|
|
41
|
+
|
|
42
|
+
Run:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uvx fastapp-new awesomeapp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This will create a new project `awesomeapp` with a full-stack FastAPI app, configured with uv.
|
|
49
|
+
|
|
50
|
+
Enter the directory:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd awesomeapp
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run the development server:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv run fastapi dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Open your browser and go to `http://localhost:8000` to see your new FastApp project running.
|
|
63
|
+
|
|
64
|
+
### Existing directory
|
|
65
|
+
|
|
66
|
+
If you want to create a new FastApp project in an existing directory, run the command without a project name:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
uvx fastapp-new
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Generated Stack
|
|
73
|
+
|
|
74
|
+
- `app/main.py` - FastAPI app assembly and `app.frontend()`
|
|
75
|
+
- `app/routes.py` - HTMX partial routes and JSON API routes
|
|
76
|
+
- `app/components.py` - htpy server-side HTML components
|
|
77
|
+
- `frontend/` - static HTML/CSS frontend served by FastAPI
|
|
78
|
+
- `modal_app.py` - Modal ASGI entrypoint for deploying the FastAPI app
|
|
79
|
+
- `pyproject.toml` - managed by `uv`
|
|
80
|
+
|
|
81
|
+
## Deploy
|
|
82
|
+
|
|
83
|
+
The generated project has two first-class deployment paths.
|
|
84
|
+
|
|
85
|
+
Deploy to FastAPI Cloud:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
uv run fastapi deploy
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Deploy to Modal:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
uv run modal serve modal_app.py
|
|
95
|
+
uv run modal deploy modal_app.py
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Positioning
|
|
99
|
+
|
|
100
|
+
`fastapi-new` creates a minimal general-purpose FastAPI project. `fastapp-new`
|
|
101
|
+
is positioned for app development where FastAPI owns both sides of the product:
|
|
102
|
+
static frontend serving, HTMX interactions, and JSON endpoints live in one
|
|
103
|
+
Python project without a Node build step. Server-rendered HTML fragments are
|
|
104
|
+
generated with htpy instead of raw string concatenation.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
This project is licensed under the terms of the MIT license.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# fastapp-new
|
|
2
|
+
|
|
3
|
+
Create a new FastApp project in one command.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) following their guide for your system.
|
|
8
|
+
|
|
9
|
+
Run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uvx fastapp-new awesomeapp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This will create a new project `awesomeapp` with a full-stack FastAPI app, configured with uv.
|
|
16
|
+
|
|
17
|
+
Enter the directory:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
cd awesomeapp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run the development server:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uv run fastapi dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Open your browser and go to `http://localhost:8000` to see your new FastApp project running.
|
|
30
|
+
|
|
31
|
+
### Existing directory
|
|
32
|
+
|
|
33
|
+
If you want to create a new FastApp project in an existing directory, run the command without a project name:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uvx fastapp-new
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Generated Stack
|
|
40
|
+
|
|
41
|
+
- `app/main.py` - FastAPI app assembly and `app.frontend()`
|
|
42
|
+
- `app/routes.py` - HTMX partial routes and JSON API routes
|
|
43
|
+
- `app/components.py` - htpy server-side HTML components
|
|
44
|
+
- `frontend/` - static HTML/CSS frontend served by FastAPI
|
|
45
|
+
- `modal_app.py` - Modal ASGI entrypoint for deploying the FastAPI app
|
|
46
|
+
- `pyproject.toml` - managed by `uv`
|
|
47
|
+
|
|
48
|
+
## Deploy
|
|
49
|
+
|
|
50
|
+
The generated project has two first-class deployment paths.
|
|
51
|
+
|
|
52
|
+
Deploy to FastAPI Cloud:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uv run fastapi deploy
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Deploy to Modal:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uv run modal serve modal_app.py
|
|
62
|
+
uv run modal deploy modal_app.py
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Positioning
|
|
66
|
+
|
|
67
|
+
`fastapi-new` creates a minimal general-purpose FastAPI project. `fastapp-new`
|
|
68
|
+
is positioned for app development where FastAPI owns both sides of the product:
|
|
69
|
+
static frontend serving, HTMX interactions, and JSON endpoints live in one
|
|
70
|
+
Python project without a Node build step. Server-rendered HTML fragments are
|
|
71
|
+
generated with htpy instead of raw string concatenation.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
This project is licensed under the terms of the MIT license.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fastapp-new"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Create a new FastApp project in one command"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
requires-python = ">=3.10"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "taeha" },
|
|
11
|
+
]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Programming Language :: Python",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
24
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
25
|
+
"Topic :: Software Development",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
27
|
+
"Typing :: Typed",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"rich>=13.7.1",
|
|
31
|
+
"rich-toolkit>=0.15.1",
|
|
32
|
+
"typer>=0.24.1",
|
|
33
|
+
"typing-extensions>=4.12.2",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
fastapp-new = "fastapp_new.cli:main"
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://github.com/taehalim/fastapp-new"
|
|
41
|
+
Documentation = "https://github.com/taehalim/fastapp-new"
|
|
42
|
+
Repository = "https://github.com/taehalim/fastapp-new"
|
|
43
|
+
Issues = "https://github.com/taehalim/fastapp-new/issues"
|
|
44
|
+
|
|
45
|
+
[dependency-groups]
|
|
46
|
+
dev = [
|
|
47
|
+
{ include-group = "tests" },
|
|
48
|
+
"pre-commit>=4.3.0",
|
|
49
|
+
"ruff>=0.15.15",
|
|
50
|
+
"ty>=0.0.25",
|
|
51
|
+
]
|
|
52
|
+
tests = [
|
|
53
|
+
"coverage[toml]>=7.6.1",
|
|
54
|
+
"pytest>=8.3.5",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[build-system]
|
|
58
|
+
requires = ["hatchling"]
|
|
59
|
+
build-backend = "hatchling.build"
|
|
60
|
+
|
|
61
|
+
[tool.pytest.ini_options]
|
|
62
|
+
addopts = [
|
|
63
|
+
"--strict-config",
|
|
64
|
+
"--strict-markers",
|
|
65
|
+
]
|
|
66
|
+
testpaths = ["tests"]
|
|
67
|
+
pythonpath = ["src"]
|
|
68
|
+
xfail_strict = true
|
|
69
|
+
junit_family = "xunit2"
|
|
70
|
+
|
|
71
|
+
[tool.coverage.run]
|
|
72
|
+
parallel = true
|
|
73
|
+
data_file = "coverage/.coverage"
|
|
74
|
+
source = [
|
|
75
|
+
"src/fastapp_new",
|
|
76
|
+
"tests",
|
|
77
|
+
]
|
|
78
|
+
context = '${CONTEXT}'
|
|
79
|
+
dynamic_context = "test_function"
|
|
80
|
+
relative_files = true
|
|
81
|
+
|
|
82
|
+
[tool.coverage.report]
|
|
83
|
+
show_missing = true
|
|
84
|
+
sort = "-Cover"
|
|
85
|
+
|
|
86
|
+
[tool.coverage.html]
|
|
87
|
+
show_contexts = true
|
|
88
|
+
|
|
89
|
+
[tool.ruff.lint]
|
|
90
|
+
select = [
|
|
91
|
+
"E",
|
|
92
|
+
"W",
|
|
93
|
+
"F",
|
|
94
|
+
"I",
|
|
95
|
+
"B",
|
|
96
|
+
"C4",
|
|
97
|
+
"UP",
|
|
98
|
+
]
|
|
99
|
+
ignore = [
|
|
100
|
+
"E501",
|
|
101
|
+
"B008",
|
|
102
|
+
"C901",
|
|
103
|
+
"W191",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
[tool.ruff.lint.pyupgrade]
|
|
107
|
+
keep-runtime-typing = true
|
|
108
|
+
|
|
109
|
+
[tool.ty.terminal]
|
|
110
|
+
error-on-warning = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|