create-awesome-python-app 0.2.4__tar.gz → 0.2.6__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.
- create_awesome_python_app-0.2.6/PKG-INFO +621 -0
- create_awesome_python_app-0.2.6/README.md +605 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/pyproject.toml +2 -2
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/src/create_awesome_python_app/__init__.py +1 -1
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_catalog_resolve.py +6 -3
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_cpa_templates_integration.py +3 -3
- create_awesome_python_app-0.2.4/PKG-INFO +0 -42
- create_awesome_python_app-0.2.4/README.md +0 -26
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/.gitignore +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/assets/hero.svg +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/src/create_awesome_python_app/cache.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/src/create_awesome_python_app/catalog.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/src/create_awesome_python_app/cli.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/src/create_awesome_python_app/prompt_style.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_cache_cmds.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_cache_env.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_catalog.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_catalog_fetch.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_cli.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_flags.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_interactive.py +0 -0
- {create_awesome_python_app-0.2.4 → create_awesome_python_app-0.2.6}/tests/test_smoke.py +0 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: create-awesome-python-app
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Composable scaffolding CLI for production-ready Python apps
|
|
5
|
+
Project-URL: Homepage, https://github.com/Create-Python-App/create-python-app
|
|
6
|
+
Project-URL: Repository, https://github.com/Create-Python-App/create-python-app
|
|
7
|
+
Project-URL: Issues, https://github.com/Create-Python-App/create-python-app/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Create-Python-App/create-python-app/blob/main/CHANGELOG.md
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Requires-Dist: create-python-app-core>=0.2.6
|
|
12
|
+
Requires-Dist: questionary>=2.1.1
|
|
13
|
+
Requires-Dist: rich>=15.0.0
|
|
14
|
+
Requires-Dist: typer>=0.27.0
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
<!--lint disable double-link awesome-heading awesome-git-repo-age awesome-toc-->
|
|
18
|
+
|
|
19
|
+
<div align="center">
|
|
20
|
+
|
|
21
|
+
<img src="https://raw.githubusercontent.com/Create-Python-App/create-python-app/main/packages/create-awesome-python-app/assets/hero.svg" alt="Create Awesome Python App banner" width="100%" />
|
|
22
|
+
|
|
23
|
+
# Create Awesome Python App
|
|
24
|
+
|
|
25
|
+
**One command. Any stack.** Generate production-ready Python apps by composing templates, addons, and AI-ready conventions.
|
|
26
|
+
|
|
27
|
+
From blank folder to a working FastAPI, Django, Celery, CLI, or uv workspace project with modern tooling and team-friendly automation.
|
|
28
|
+
|
|
29
|
+
[![PyPI][pypiversion]][pypiurl]
|
|
30
|
+
[![Python][pythonbadge]][pythonurl]
|
|
31
|
+
[![Stars][starsbadge]][starsurl]
|
|
32
|
+
[![License: MIT][licensebadge]][licenseurl]
|
|
33
|
+
|
|
34
|
+
[![AUR][aurbadge]][aururl]
|
|
35
|
+
[![Homebrew][homebrewbadge]][homebrewurl]
|
|
36
|
+
[![Docker][dockerbadge]][dockerurl]
|
|
37
|
+
[![Smoke tests][smokebadge]][smokeurl]
|
|
38
|
+
|
|
39
|
+
[![Tests][testsbadge]][testsurl]
|
|
40
|
+
[![Lint][lintbadge]][linturl]
|
|
41
|
+
[![Typecheck][typecheckbadge]][typecheckurl]
|
|
42
|
+
[![MegaLinter][megalinterbadge]][megalinterurl]
|
|
43
|
+
[![Shellcheck][shellcheckbadge]][shellcheckurl]
|
|
44
|
+
[![Commit Activity][commitactivitybadge]][commitactivityurl]
|
|
45
|
+
|
|
46
|
+
**[Official Site](https://create-awesome-python-app.vercel.app)** · [Templates](https://create-awesome-python-app.vercel.app/templates) · [Extensions](https://create-awesome-python-app.vercel.app/extensions) · [Docs](https://create-awesome-python-app.vercel.app/docs) · [GitHub](https://github.com/Create-Python-App/create-python-app) · [PyPI](https://pypi.org/project/create-awesome-python-app/)
|
|
47
|
+
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
**uv (recommended):**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uvx create-awesome-python-app@latest my-app
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**pipx:**
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pipx run create-awesome-python-app my-app
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Homebrew (macOS / Linux):**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
brew tap Create-Python-App/tap
|
|
70
|
+
brew install create-awesome-python-app
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**AUR (Arch Linux):**
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
yay -S create-awesome-python-app # or: paru -S create-awesome-python-app
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Docker:**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
docker run --rm -it -v "${PWD}:/app" -w /app \
|
|
83
|
+
ulisesjeremias/create-awesome-python-app:latest my-app \
|
|
84
|
+
--template fastapi-starter
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Interactive by default outside CI. For automation, run headless with flags:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uvx create-awesome-python-app my-api \
|
|
91
|
+
--template fastapi-starter \
|
|
92
|
+
--addons github-setup \
|
|
93
|
+
--addons fastapi-sqlalchemy \
|
|
94
|
+
--no-interactive
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| If you want... | Start here |
|
|
98
|
+
| ----------------------------- | ------------------------------------------------------- |
|
|
99
|
+
| A guided local setup | `uvx create-awesome-python-app@latest my-app` |
|
|
100
|
+
| A repeatable CI/platform flow | `--no-interactive` with explicit flags |
|
|
101
|
+
| Your company starter | `--template <github-url>` or `--template file://` |
|
|
102
|
+
| Private standards layered in | `--extend <url>` |
|
|
103
|
+
|
|
104
|
+
### Shell completion
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
create-awesome-python-app --install-completion # bash / zsh / fish
|
|
108
|
+
create-awesome-python-app --show-completion # print script only
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
After installing, restart the shell (or `source` your profile) and tab-complete
|
|
112
|
+
flags such as `--template`, `--addons`, and `cache` subcommands.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Why CPA?
|
|
117
|
+
|
|
118
|
+
| Capability | Value |
|
|
119
|
+
| -------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
120
|
+
| **Composable by design** | Start with a template, then layer only the addons your project actually needs. |
|
|
121
|
+
| **Production-ready defaults** | uv, Ruff, Pyright, tests, docs, and practical DX defaults out of the box. |
|
|
122
|
+
| **AI-ready from day one** | Supported templates generate `AGENTS.md` so coding agents understand the project context. |
|
|
123
|
+
| **CI and platform friendly** | Use `--no-interactive`, `--set`, `--template <url>`, and `--extend <url>` for repeatable runs. |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Composition Model
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
template -> addons -> custom options -> install -> git init -> AI-ready project
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
You can mix catalog templates and addons with your own GitHub or `file://` sources.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## What You Can Generate
|
|
138
|
+
|
|
139
|
+
### Template Families
|
|
140
|
+
|
|
141
|
+
| Category | Example templates |
|
|
142
|
+
| -------- | ------------------------------------------------------ |
|
|
143
|
+
| Backend | `fastapi-starter`, `django-api`, `celery-worker` |
|
|
144
|
+
| CLI | `cli-starter` |
|
|
145
|
+
| Monorepo | `uv-workspace-starter` |
|
|
146
|
+
|
|
147
|
+
### Addon Families
|
|
148
|
+
|
|
149
|
+
| Category | Examples |
|
|
150
|
+
| -------------- | ------------------------------------------------------------- |
|
|
151
|
+
| CI / tooling | `github-setup`, `development-container` |
|
|
152
|
+
| Containers | `fastapi-docker`, `django-docker`, `celery-docker` |
|
|
153
|
+
| Database | `postgres`, `fastapi-sqlalchemy`, `fastapi-redis` |
|
|
154
|
+
| Observability | `fastapi-sentry` |
|
|
155
|
+
| Security | `fastapi-auth-jwt` |
|
|
156
|
+
|
|
157
|
+
Browse the live catalog on the [official site](https://create-awesome-python-app.vercel.app/templates) or in [`cpa-templates`](https://github.com/Create-Python-App/cpa-templates).
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Popular Recipes
|
|
162
|
+
|
|
163
|
+
### FastAPI + GitHub + SQLAlchemy
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
uvx create-awesome-python-app my-api \
|
|
167
|
+
--template fastapi-starter \
|
|
168
|
+
--addons github-setup \
|
|
169
|
+
--addons fastapi-sqlalchemy \
|
|
170
|
+
--no-interactive
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Django API + Postgres + Docker
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
uvx create-awesome-python-app my-django \
|
|
177
|
+
--template django-api \
|
|
178
|
+
--addons github-setup \
|
|
179
|
+
--addons postgres \
|
|
180
|
+
--addons django-docker \
|
|
181
|
+
--no-interactive
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Celery worker + Redis-friendly stack
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
uvx create-awesome-python-app my-worker \
|
|
188
|
+
--template celery-worker \
|
|
189
|
+
--addons github-setup \
|
|
190
|
+
--addons celery-docker \
|
|
191
|
+
--no-interactive
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Typer / Click CLI starter
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
uvx create-awesome-python-app my-cli \
|
|
198
|
+
--template cli-starter \
|
|
199
|
+
--addons github-setup \
|
|
200
|
+
--no-interactive
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### uv workspace monorepo
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
uvx create-awesome-python-app my-workspace \
|
|
207
|
+
--template uv-workspace-starter \
|
|
208
|
+
--addons github-setup \
|
|
209
|
+
--no-interactive
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Internal platform template (GitHub URL)
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
uvx create-awesome-python-app my-internal-app \
|
|
216
|
+
--template "https://github.com/your-org/platform-starters?subdir=templates/internal-app" \
|
|
217
|
+
--no-interactive
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Local template development (`file://`)
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
uvx create-awesome-python-app my-local-app \
|
|
224
|
+
--template "file:///absolute/path/to/cpa-templates?subdir=templates/fastapi-starter" \
|
|
225
|
+
--no-interactive
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
> `file://` template URLs should be absolute paths (for example `file:///Users/...` or `file:///home/...`).
|
|
229
|
+
|
|
230
|
+
### Layer a private extension
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
uvx create-awesome-python-app my-app \
|
|
234
|
+
--template fastapi-starter \
|
|
235
|
+
--addons github-setup \
|
|
236
|
+
--extend "https://github.com/your-org/platform-starters?subdir=extensions/company-ci"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Pass custom template values
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
uvx create-awesome-python-app my-app \
|
|
243
|
+
--template fastapi-starter \
|
|
244
|
+
--set "productName=Acme Cloud" \
|
|
245
|
+
--set "author=Platform Team" \
|
|
246
|
+
--no-interactive
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Built For Modern Teams
|
|
252
|
+
|
|
253
|
+
- Python 3.12+ runtime support.
|
|
254
|
+
- uv-first workflows (with pipx / Homebrew / AUR / Docker install paths).
|
|
255
|
+
- Interactive wizard for local workflows.
|
|
256
|
+
- `--no-interactive` mode for CI, scripts, and platform automation.
|
|
257
|
+
- GitHub URL and local `file://` template inputs.
|
|
258
|
+
- `--extend` support for private addon layering.
|
|
259
|
+
- `--set key=value` overrides for deterministic custom options.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Explore The Catalog
|
|
264
|
+
|
|
265
|
+
Browse visually at **[create-awesome-python-app.vercel.app](https://create-awesome-python-app.vercel.app)** or discover from the terminal:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# List all available templates
|
|
269
|
+
uvx create-awesome-python-app --list-templates
|
|
270
|
+
|
|
271
|
+
# List addons (optionally filtered by template)
|
|
272
|
+
uvx create-awesome-python-app --template fastapi-starter --list-addons
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Full catalog:
|
|
276
|
+
|
|
277
|
+
- **Templates:** [create-awesome-python-app.vercel.app/templates](https://create-awesome-python-app.vercel.app/templates)
|
|
278
|
+
- **Extensions:** [create-awesome-python-app.vercel.app/extensions](https://create-awesome-python-app.vercel.app/extensions)
|
|
279
|
+
- **Source data:** [`cpa-templates/templates.json`](https://github.com/Create-Python-App/cpa-templates/blob/main/templates.json)
|
|
280
|
+
|
|
281
|
+
Override the catalog URL with `CPA_CATALOG_URL` (HTTPS or `file://`) for forks and local testing.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## AI-Ready With `AGENTS.md`
|
|
286
|
+
|
|
287
|
+
Supported templates generate an `AGENTS.md` file so coding assistants understand project context before editing:
|
|
288
|
+
|
|
289
|
+
| Context | Why it matters |
|
|
290
|
+
| ---------------------- | ----------------------------------------------------------- |
|
|
291
|
+
| Project purpose | Agents understand what the app is for before changing code. |
|
|
292
|
+
| Directory layout | Suggestions align with the real structure. |
|
|
293
|
+
| Scripts and validation | Agents know how to lint, test, and verify changes. |
|
|
294
|
+
| Team conventions | Output follows naming and workflow expectations. |
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Interactive Wizard
|
|
299
|
+
|
|
300
|
+
Run the CLI without flags and CPA guides you through:
|
|
301
|
+
|
|
302
|
+
| Step | What you choose |
|
|
303
|
+
| ----------------- | ----------------------------------------------------------------------- |
|
|
304
|
+
| Project name | Confirm or set the target directory |
|
|
305
|
+
| Category | Backend, CLI, Monorepo, or custom URL |
|
|
306
|
+
| Template | Pick from curated starters with descriptions and labels |
|
|
307
|
+
| Addons | Multi-select compatible extensions grouped by purpose |
|
|
308
|
+
| Custom options | Answer `cpa.config.json` / registry prompts when present |
|
|
309
|
+
| Custom extensions | Layer extra URLs for internal standards |
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Requirements
|
|
314
|
+
|
|
315
|
+
- **Python >= 3.12**
|
|
316
|
+
- [uv](https://docs.astral.sh/uv/) recommended (or pipx / Homebrew / AUR / Docker)
|
|
317
|
+
- `git` available on `PATH` (required to clone templates)
|
|
318
|
+
|
|
319
|
+
Recommended quick start:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
uv python install 3.12
|
|
323
|
+
uvx create-awesome-python-app@latest my-app
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## CLI Reference
|
|
329
|
+
|
|
330
|
+
```text
|
|
331
|
+
Usage: create-awesome-python-app [OPTIONS] [project_directory]
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
| Flag | Description |
|
|
335
|
+
| ---------------------------- | ----------------------------------------------------- |
|
|
336
|
+
| `--interactive` | Force interactive wizard (default outside CI) |
|
|
337
|
+
| `--no-interactive` | Disable wizard and use flags only |
|
|
338
|
+
| `-t, --template <slug\|url>` | Template slug from catalog or remote/local URL |
|
|
339
|
+
| `--addons <slug\|url>` | Addon slug or URL (repeat the flag for multiple) |
|
|
340
|
+
| `--extend <url>` | Extra extension URL layered on top (repeatable) |
|
|
341
|
+
| `--set <key=value>` | Set custom template options; quote values with spaces |
|
|
342
|
+
| `--no-install` | Generate files without installing dependencies |
|
|
343
|
+
| `-f, --force` | Allow scaffolding into a non-empty target directory |
|
|
344
|
+
| `--list-templates` | Print all templates |
|
|
345
|
+
| `--list-addons` | Print addons, optionally filtered by `--template` |
|
|
346
|
+
| `--offline` | Use the local cache only; do not refresh templates |
|
|
347
|
+
| `--no-cache` | Disable the catalog cache; force a refresh each run |
|
|
348
|
+
| `--cache-dir <path>` | Override the cache root (default: `~/.cache/cpa`) |
|
|
349
|
+
| `--refresh <mode>` | When to refresh: `always` \| `stale` \| `manual` |
|
|
350
|
+
| `--pin <ref>` | Pin template to a specific commit SHA, tag, or branch |
|
|
351
|
+
| `--strict-version` | Fail if a newer CLI version is available |
|
|
352
|
+
| `--keep-on-failure` | Keep partial output if scaffolding fails |
|
|
353
|
+
| `-v, --verbose` | Output resolved generation config as JSON |
|
|
354
|
+
| `-i, --info` | Print Python, uv, git, and OS diagnostics |
|
|
355
|
+
| `--version` | Print CLI version |
|
|
356
|
+
| `--help` | Show help |
|
|
357
|
+
|
|
358
|
+
### `cache` subcommand
|
|
359
|
+
|
|
360
|
+
```text
|
|
361
|
+
Usage: create-awesome-python-app cache [OPTIONS] COMMAND [ARGS]...
|
|
362
|
+
|
|
363
|
+
Commands:
|
|
364
|
+
dir Print the cache root directory
|
|
365
|
+
list List cached templates and extensions
|
|
366
|
+
clean Remove one or all entries
|
|
367
|
+
verify Run `git fsck` on one or all entries
|
|
368
|
+
outdated List cached entries that are behind their remote tip
|
|
369
|
+
update Refresh one or all cached entries from their remote
|
|
370
|
+
doctor Diagnose cache health (git, network, permissions)
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Inspect and manage the on-disk cache:
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Where is my cache?
|
|
377
|
+
uvx create-awesome-python-app cache dir
|
|
378
|
+
# /home/<you>/.cache/cpa
|
|
379
|
+
|
|
380
|
+
# What's in it?
|
|
381
|
+
uvx create-awesome-python-app cache list
|
|
382
|
+
|
|
383
|
+
# Verify integrity
|
|
384
|
+
uvx create-awesome-python-app cache verify
|
|
385
|
+
|
|
386
|
+
# Clear everything
|
|
387
|
+
uvx create-awesome-python-app cache clean
|
|
388
|
+
|
|
389
|
+
# Check for outdated entries
|
|
390
|
+
uvx create-awesome-python-app cache outdated
|
|
391
|
+
|
|
392
|
+
# Refresh a specific entry (or all)
|
|
393
|
+
uvx create-awesome-python-app cache update
|
|
394
|
+
|
|
395
|
+
# Diagnose cache health
|
|
396
|
+
uvx create-awesome-python-app cache doctor
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Cache & Updates
|
|
402
|
+
|
|
403
|
+
CPA caches both the **template catalog** (`templates.json` from
|
|
404
|
+
`raw.githubusercontent.com`) and the **template git repos** themselves. The
|
|
405
|
+
cache lives at `~/.cache/cpa` by default; override with `--cache-dir
|
|
406
|
+
<path>` or `CPA_CACHE_DIR`.
|
|
407
|
+
|
|
408
|
+
| Path | Contents |
|
|
409
|
+
| ----------------------- | ---------------------------------- |
|
|
410
|
+
| `~/.cache/cpa/catalog/` | Cached `templates.json` |
|
|
411
|
+
| `~/.cache/cpa/repos/` | Shallow clones of templates / addons |
|
|
412
|
+
|
|
413
|
+
### Refresh modes (set with `--refresh <mode>` or `CPA_REFRESH=<mode>`)
|
|
414
|
+
|
|
415
|
+
- **`stale`** (default): pull only when the cache is older than
|
|
416
|
+
`CPA_REFRESH_AFTER_HOURS` (default `24`). No network on a warm cache.
|
|
417
|
+
- **`always`**: pull on every run.
|
|
418
|
+
- **`manual`**: never pull unless `--refresh` is passed.
|
|
419
|
+
|
|
420
|
+
### Pinning templates
|
|
421
|
+
|
|
422
|
+
Pin a template to a specific commit SHA, tag, or branch:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
uvx create-awesome-python-app my-app \
|
|
426
|
+
--template fastapi-starter \
|
|
427
|
+
--pin abc123def456abc123def456abc123def456abc1 \
|
|
428
|
+
--no-interactive
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
The `--pin` flag is equivalent to appending `?ref=<ref>` to the template URL.
|
|
432
|
+
Combine with `CPA_STRICT_REPRO=1` to enforce full 40-character SHAs.
|
|
433
|
+
|
|
434
|
+
### CI and offline usage
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
# Fully offline CI: use the local cache only, no network.
|
|
438
|
+
uvx create-awesome-python-app my-app \
|
|
439
|
+
--template fastapi-starter \
|
|
440
|
+
--offline \
|
|
441
|
+
--no-interactive
|
|
442
|
+
|
|
443
|
+
# Pin the cache to a project-local directory (useful in monorepos and CI).
|
|
444
|
+
CPA_CACHE_DIR="$PWD/.cpa-cache" uvx create-awesome-python-app my-app \
|
|
445
|
+
--template fastapi-starter \
|
|
446
|
+
--no-interactive
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Programmatic Usage
|
|
452
|
+
|
|
453
|
+
Need to integrate CPA into your own tooling? The core is importable:
|
|
454
|
+
|
|
455
|
+
```python
|
|
456
|
+
import asyncio
|
|
457
|
+
from create_python_app_core import create_python_app
|
|
458
|
+
|
|
459
|
+
asyncio.run(
|
|
460
|
+
create_python_app(
|
|
461
|
+
"my-app",
|
|
462
|
+
{
|
|
463
|
+
"template": (
|
|
464
|
+
"https://github.com/Create-Python-App/cpa-templates"
|
|
465
|
+
"?subdir=templates/fastapi-starter"
|
|
466
|
+
),
|
|
467
|
+
"addons": [],
|
|
468
|
+
"install": False,
|
|
469
|
+
},
|
|
470
|
+
)
|
|
471
|
+
)
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
> The programmatic API is experimental and subject to change. Prefer the CLI for stable usage.
|
|
475
|
+
|
|
476
|
+
See also: [`create-python-app-core` README](https://github.com/Create-Python-App/create-python-app/blob/main/packages/create-python-app-core/README.md).
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## Security
|
|
481
|
+
|
|
482
|
+
CPA downloads templates from remote sources. Prefer catalog slugs or hash-pinned
|
|
483
|
+
refs (`--pin` / `?ref=`), audit custom URLs before use, and report vulnerabilities
|
|
484
|
+
via GitHub Security Advisories on
|
|
485
|
+
[Create-Python-App/create-python-app](https://github.com/Create-Python-App/create-python-app).
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## FAQ
|
|
490
|
+
|
|
491
|
+
<details>
|
|
492
|
+
<summary><strong>Why another scaffolder?</strong></summary>
|
|
493
|
+
|
|
494
|
+
Most scaffolders lock you into one stack. CPA is composable: choose a template, layer focused addons, and plug in your own GitHub/local blueprints — mirroring [Create Awesome Node App](https://github.com/Create-Node-App/create-node-app) for the Python ecosystem.
|
|
495
|
+
|
|
496
|
+
</details>
|
|
497
|
+
|
|
498
|
+
<details>
|
|
499
|
+
<summary><strong>Can I use my own template?</strong></summary>
|
|
500
|
+
|
|
501
|
+
Yes. Pass a GitHub URL or local `file://` URL with `--template` (supports `?subdir=` and `?ref=`).
|
|
502
|
+
|
|
503
|
+
</details>
|
|
504
|
+
|
|
505
|
+
<details>
|
|
506
|
+
<summary><strong>Can I use private/internal extensions?</strong></summary>
|
|
507
|
+
|
|
508
|
+
Yes. Use `--extend <url>` to layer private extensions on top of a template and addon set.
|
|
509
|
+
|
|
510
|
+
</details>
|
|
511
|
+
|
|
512
|
+
<details>
|
|
513
|
+
<summary><strong>Are addons order-sensitive?</strong></summary>
|
|
514
|
+
|
|
515
|
+
Yes. Addons are applied in sequence. If two addons modify the same file, later addons win.
|
|
516
|
+
|
|
517
|
+
</details>
|
|
518
|
+
|
|
519
|
+
<details>
|
|
520
|
+
<summary><strong>Does it support monorepos?</strong></summary>
|
|
521
|
+
|
|
522
|
+
Yes. Use `uv-workspace-starter` to bootstrap a multi-package uv workspace with shared tooling.
|
|
523
|
+
|
|
524
|
+
</details>
|
|
525
|
+
|
|
526
|
+
<details>
|
|
527
|
+
<summary><strong>Can I use it in CI?</strong></summary>
|
|
528
|
+
|
|
529
|
+
Yes. Pass all required flags and use `--no-interactive` for deterministic automation. Set `CI=true` to disable the wizard by default.
|
|
530
|
+
|
|
531
|
+
</details>
|
|
532
|
+
|
|
533
|
+
<details>
|
|
534
|
+
<summary><strong>Is Python 3.12 required?</strong></summary>
|
|
535
|
+
|
|
536
|
+
Yes. CPA targets Python 3.12+ to keep runtime behavior modern and predictable.
|
|
537
|
+
|
|
538
|
+
</details>
|
|
539
|
+
|
|
540
|
+
<details>
|
|
541
|
+
<summary><strong>Does CPA work with AI coding assistants?</strong></summary>
|
|
542
|
+
|
|
543
|
+
Yes. Supported templates generate `AGENTS.md`, helping assistants understand project layout, scripts, and conventions.
|
|
544
|
+
|
|
545
|
+
</details>
|
|
546
|
+
|
|
547
|
+
<details>
|
|
548
|
+
<summary><strong>Docker says `git executable not found`</strong></summary>
|
|
549
|
+
|
|
550
|
+
Images from `0.2.5` onward ship `git`. Pull `ulisesjeremias/create-awesome-python-app:latest` (or `0.2.5+`) and retry.
|
|
551
|
+
|
|
552
|
+
</details>
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Roadmap
|
|
557
|
+
|
|
558
|
+
- More framework templates and vertical starters.
|
|
559
|
+
- Additional testing and observability packs.
|
|
560
|
+
- Diff-based upgrade paths for pinned templates.
|
|
561
|
+
- Richer template analytics and usage insights.
|
|
562
|
+
|
|
563
|
+
Track progress in [Issues](https://github.com/Create-Python-App/create-python-app/issues) and [Discussions](https://github.com/Create-Python-App/create-python-app/discussions).
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## Contributing
|
|
568
|
+
|
|
569
|
+
Templates, addons, bug fixes, docs, recipes, and ideas are all welcome.
|
|
570
|
+
|
|
571
|
+
- **Main repo:** [github.com/Create-Python-App/create-python-app](https://github.com/Create-Python-App/create-python-app)
|
|
572
|
+
- **Template and extension data:** [github.com/Create-Python-App/cpa-templates](https://github.com/Create-Python-App/cpa-templates)
|
|
573
|
+
- **Contributing guide:** [CONTRIBUTING.md](https://github.com/Create-Python-App/create-python-app/blob/main/CONTRIBUTING.md)
|
|
574
|
+
- **Troubleshooting:** [docs/TROUBLESHOOTING.md](https://github.com/Create-Python-App/create-python-app/blob/main/docs/TROUBLESHOOTING.md)
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## License
|
|
579
|
+
|
|
580
|
+
MIT © [Create Python App Contributors](https://github.com/Create-Python-App/create-python-app/graphs/contributors)
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
<div align="center">
|
|
585
|
+
|
|
586
|
+
**[create-awesome-python-app.vercel.app](https://create-awesome-python-app.vercel.app)**
|
|
587
|
+
|
|
588
|
+
_Built for developers who value speed, composability, craft, and AI-ready workflows._
|
|
589
|
+
|
|
590
|
+
</div>
|
|
591
|
+
|
|
592
|
+
<!-- Reference links -->
|
|
593
|
+
|
|
594
|
+
[testsbadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml/badge.svg
|
|
595
|
+
[lintbadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml/badge.svg
|
|
596
|
+
[typecheckbadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml/badge.svg
|
|
597
|
+
[shellcheckbadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/shellcheck.yml/badge.svg
|
|
598
|
+
[megalinterbadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/mega-linter.yml/badge.svg
|
|
599
|
+
[pypiversion]: https://img.shields.io/pypi/v/create-awesome-python-app.svg?style=flat-square&color=3775A9
|
|
600
|
+
[pythonbadge]: https://img.shields.io/pypi/pyversions/create-awesome-python-app.svg?style=flat-square
|
|
601
|
+
[starsbadge]: https://img.shields.io/github/stars/Create-Python-App/create-python-app?style=flat-square&color=yellow
|
|
602
|
+
[licensebadge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square
|
|
603
|
+
[testsurl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml
|
|
604
|
+
[linturl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml
|
|
605
|
+
[typecheckurl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml
|
|
606
|
+
[shellcheckurl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/shellcheck.yml
|
|
607
|
+
[megalinterurl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/mega-linter.yml
|
|
608
|
+
[pypiurl]: https://pypi.org/project/create-awesome-python-app/
|
|
609
|
+
[pythonurl]: https://pypi.org/project/create-awesome-python-app/
|
|
610
|
+
[licenseurl]: https://github.com/Create-Python-App/create-python-app/blob/main/LICENSE
|
|
611
|
+
[starsurl]: https://github.com/Create-Python-App/create-python-app/stargazers
|
|
612
|
+
[commitactivitybadge]: https://img.shields.io/github/commit-activity/m/Create-Python-App/create-python-app?style=flat-square&logo=github&label=commits
|
|
613
|
+
[commitactivityurl]: https://github.com/Create-Python-App/create-python-app/pulse
|
|
614
|
+
[aururl]: https://aur.archlinux.org/packages/create-awesome-python-app
|
|
615
|
+
[aurbadge]: https://img.shields.io/aur/version/create-awesome-python-app?style=flat-square&label=AUR&logo=archlinux
|
|
616
|
+
[homebrewurl]: https://github.com/Create-Python-App/homebrew-tap
|
|
617
|
+
[homebrewbadge]: https://img.shields.io/badge/homebrew-Create--Python--App%2Ftap-orange?style=flat-square&logo=homebrew
|
|
618
|
+
[dockerurl]: https://hub.docker.com/r/ulisesjeremias/create-awesome-python-app
|
|
619
|
+
[dockerbadge]: https://img.shields.io/docker/v/ulisesjeremias/create-awesome-python-app?style=flat-square&label=Docker&logo=docker&color=2496ED
|
|
620
|
+
[smokebadge]: https://github.com/Create-Python-App/create-python-app/actions/workflows/smoke-distribution.yml/badge.svg?event=schedule
|
|
621
|
+
[smokeurl]: https://github.com/Create-Python-App/create-python-app/actions/workflows/smoke-distribution.yml
|