fastapi-spawn 0.4.31__tar.gz → 0.4.32__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.
Files changed (77) hide show
  1. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/PKG-INFO +4 -14
  2. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/README.md +3 -13
  3. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/cli.py +4 -4
  4. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/logging.py.j2 +33 -1
  5. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/main.py.j2 +0 -2
  6. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/pyproject.toml +1 -1
  7. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/.gitignore +0 -0
  8. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/LICENSE +0 -0
  9. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/__init__.py +0 -0
  10. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/config.py +0 -0
  11. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/constants.py +0 -0
  12. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/generator.py +0 -0
  13. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/interactive.py +0 -0
  14. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/alembic/alembic.ini.j2 +0 -0
  15. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/alembic/env.py.j2 +0 -0
  16. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/__init__.py.j2 +0 -0
  17. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/admin/setup.py.j2 +0 -0
  18. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/deps.py.j2 +0 -0
  19. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/graphql.py.j2 +0 -0
  20. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/auth/router.py.j2 +0 -0
  21. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/auth/sso.py.j2 +0 -0
  22. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/health/router.py.j2 +0 -0
  23. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/pagination/router.py.j2 +0 -0
  24. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/payments/router.py.j2 +0 -0
  25. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/permissions/router.py.j2 +0 -0
  26. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/router.py.j2 +0 -0
  27. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/streaming/router.py.j2 +0 -0
  28. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/uploads/router.py.j2 +0 -0
  29. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/api/v1/ws/router.py.j2 +0 -0
  30. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/ai.py.j2 +0 -0
  31. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/cache.py.j2 +0 -0
  32. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/config.py.j2 +0 -0
  33. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/email.py.j2 +0 -0
  34. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/exceptions.py.j2 +0 -0
  35. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/logger.py.j2 +0 -0
  36. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/monitoring.py.j2 +0 -0
  37. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/notifications.py.j2 +0 -0
  38. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/ocr.py.j2 +0 -0
  39. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/permissions.py.j2 +0 -0
  40. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/search.py.j2 +0 -0
  41. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/security.py.j2 +0 -0
  42. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/storage.py.j2 +0 -0
  43. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/vector_db.py.j2 +0 -0
  44. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/core/ws_manager.py.j2 +0 -0
  45. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/db/session.py.j2 +0 -0
  46. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/frontend/index.html.j2 +0 -0
  47. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/middleware/__init__.py.j2 +0 -0
  48. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/middleware/rate_limit.py.j2 +0 -0
  49. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/middleware/request_logger.py.j2 +0 -0
  50. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/app/middleware/response_format.py.j2 +0 -0
  51. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/Makefile.j2 +0 -0
  52. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/README.md.j2 +0 -0
  53. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/env.j2 +0 -0
  54. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/env_example.j2 +0 -0
  55. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/gitignore.j2 +0 -0
  56. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/pre_commit.j2 +0 -0
  57. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/base/pyproject.toml.j2 +0 -0
  58. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/ci/github/publish.yml.j2 +0 -0
  59. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/ci/github/tests.yml.j2 +0 -0
  60. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/ci/gitlab/gitlab-ci.yml.j2 +0 -0
  61. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/db/seed.py.j2 +0 -0
  62. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/docker/Dockerfile.j2 +0 -0
  63. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/docker/docker-compose.yml.j2 +0 -0
  64. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/docker/dockerignore.j2 +0 -0
  65. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/infra/docker/docker-compose.prod.yml.j2 +0 -0
  66. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/infra/helm/Chart.yaml.j2 +0 -0
  67. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/infra/helm/values.yaml.j2 +0 -0
  68. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/infra/terraform/main.tf.j2 +0 -0
  69. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/infra/terraform/variables.tf.j2 +0 -0
  70. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/root/main.py.j2 +0 -0
  71. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/tasks/arq_worker.py.j2 +0 -0
  72. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/tasks/celery_app.py.j2 +0 -0
  73. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/tasks/sample_tasks.py.j2 +0 -0
  74. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/tests/conftest.py.j2 +0 -0
  75. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/templates/tests/test_health.py.j2 +0 -0
  76. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/utils.py +0 -0
  77. {fastapi_spawn-0.4.31 → fastapi_spawn-0.4.32}/fastapi_spawn/validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-spawn
3
- Version: 0.4.31
3
+ Version: 0.4.32
4
4
  Summary: A powerful CLI tool to scaffold production-ready FastAPI projects with flexible database, auth, broker, and deployment options.
5
5
  Project-URL: Homepage, https://github.com/Bishwajitgarai/fastapi-spawn
6
6
  Project-URL: Documentation, https://github.com/Bishwajitgarai/fastapi-spawn#readme
@@ -117,11 +117,9 @@ To avoid confusion with nested projects (e.g., having a `pyproject.toml` in both
117
117
 
118
118
  #### Option B: Generate directly in the CURRENT folder
119
119
  If you already created a folder and opened it in VS Code:
120
- 1. Make sure the folder is empty.
121
- 2. Run the command with `--output .`:
122
- ```bash
123
- fastapi-spawn start custom my_project_name --output .
124
- ```
120
+ 1. Run `fastapi-spawn start`.
121
+ 2. When it asks *"Do you want to generate files directly in the current directory?"*, select **Yes**.
122
+ 3. It will generate all files directly in your current folder without creating a subfolder! (New in 0.4.29!)
125
123
 
126
124
  ---
127
125
 
@@ -608,14 +606,6 @@ $ fastapi-spawn add websockets
608
606
  | `beanie` | mongodb |
609
607
  | `none` | any |
610
608
 
611
- ## Recent Updates (v0.4.22)
612
-
613
- - **Ollama Integration**: Updated default model to `tinyllama` for faster testing.
614
- - **Supabase Fixes**: Fixed missing environment variables in configuration templates.
615
- - **Frontend & Admin Mounted**: Automatically mounts the static frontend at `/` and the `sqladmin` dashboard at `/admin` (if enabled).
616
- - **Service Health Checks**: Added connection checks for Elasticsearch, OpenSearch, Kafka, Vespa, Ollama, DuckDB, Chroma, and Supabase in the generated `/health/services` endpoint.
617
-
618
- ---
619
609
 
620
610
  ## Contributing
621
611
 
@@ -76,11 +76,9 @@ To avoid confusion with nested projects (e.g., having a `pyproject.toml` in both
76
76
 
77
77
  #### Option B: Generate directly in the CURRENT folder
78
78
  If you already created a folder and opened it in VS Code:
79
- 1. Make sure the folder is empty.
80
- 2. Run the command with `--output .`:
81
- ```bash
82
- fastapi-spawn start custom my_project_name --output .
83
- ```
79
+ 1. Run `fastapi-spawn start`.
80
+ 2. When it asks *"Do you want to generate files directly in the current directory?"*, select **Yes**.
81
+ 3. It will generate all files directly in your current folder without creating a subfolder! (New in 0.4.29!)
84
82
 
85
83
  ---
86
84
 
@@ -567,14 +565,6 @@ $ fastapi-spawn add websockets
567
565
  | `beanie` | mongodb |
568
566
  | `none` | any |
569
567
 
570
- ## Recent Updates (v0.4.22)
571
-
572
- - **Ollama Integration**: Updated default model to `tinyllama` for faster testing.
573
- - **Supabase Fixes**: Fixed missing environment variables in configuration templates.
574
- - **Frontend & Admin Mounted**: Automatically mounts the static frontend at `/` and the `sqladmin` dashboard at `/admin` (if enabled).
575
- - **Service Health Checks**: Added connection checks for Elasticsearch, OpenSearch, Kafka, Vespa, Ollama, DuckDB, Chroma, and Supabase in the generated `/health/services` endpoint.
576
-
577
- ---
578
568
 
579
569
  ## Contributing
580
570
 
@@ -625,10 +625,10 @@ def _print_summary(config: ProjectConfig) -> None:
625
625
 
626
626
 
627
627
  def _print_next_steps(config: ProjectConfig) -> None:
628
- steps = [
629
- f" [bold cyan]cd {config.project_name}[/bold cyan]",
630
- " [bold cyan]uv sync[/bold cyan]",
631
- ]
628
+ steps = []
629
+ if config.create_project_folder:
630
+ steps.append(f" [bold cyan]cd {config.project_name}[/bold cyan]")
631
+ steps.append(" [bold cyan]uv sync[/bold cyan]")
632
632
  if config.has_alembic:
633
633
  steps.append(" [bold cyan]uv run migrate[/bold cyan]")
634
634
  if config.has_docker:
@@ -18,6 +18,17 @@ def configure_logging() -> None:
18
18
  backtrace=True,
19
19
  diagnose=True,
20
20
  )
21
+ {% if log_dest == "local" %}
22
+ import os
23
+ os.makedirs("logs", exist_ok=True)
24
+ logger.add(
25
+ "logs/app.log",
26
+ rotation="10 MB",
27
+ retention="1 week",
28
+ level="DEBUG",
29
+ format="{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {name}:{function}:{line} - {message}",
30
+ )
31
+ {% endif %}
21
32
 
22
33
  # Intercept standard library logging
23
34
  class InterceptHandler(logging.Handler):
@@ -58,13 +69,34 @@ def configure_logging() -> None:
58
69
  cache_logger_on_first_use=True,
59
70
  )
60
71
 
72
+ handlers = [logging.StreamHandler(sys.stdout)]
73
+ {% if log_dest == "local" %}
74
+ import os
75
+ os.makedirs("logs", exist_ok=True)
76
+ handlers.append(logging.FileHandler("logs/app.log"))
77
+ {% endif %}
78
+
79
+ logging.basicConfig(
80
+ handlers=handlers,
81
+ level=logging.INFO,
82
+ force=True,
83
+ )
84
+
61
85
  {% else %}
62
86
  def configure_logging() -> None:
63
87
  """Configure standard library logging."""
88
+ handlers = [logging.StreamHandler(sys.stdout)]
89
+ {% if log_dest == "local" %}
90
+ import os
91
+ os.makedirs("logs", exist_ok=True)
92
+ handlers.append(logging.FileHandler("logs/app.log"))
93
+ {% endif %}
94
+
64
95
  logging.basicConfig(
65
96
  level=logging.INFO,
66
97
  format="%(asctime)s | %(levelname)-8s | %(name)s:%(funcName)s:%(lineno)d - %(message)s",
67
98
  datefmt="%Y-%m-%d %H:%M:%S",
68
- stream=sys.stdout,
99
+ handlers=handlers,
100
+ force=True,
69
101
  )
70
102
  {% endif %}
@@ -5,7 +5,6 @@ from typing import AsyncGenerator
5
5
 
6
6
  from fastapi import FastAPI
7
7
  from fastapi.middleware.cors import CORSMiddleware
8
- from fastapi.responses import ORJSONResponse
9
8
 
10
9
  from app.api.v1.router import router as api_v1_router
11
10
  {% if has_graphql %}
@@ -41,7 +40,6 @@ def create_application() -> FastAPI:
41
40
  docs_url="/docs",
42
41
  redoc_url="/redoc",
43
42
  openapi_url="/openapi.json",
44
- default_response_class=ORJSONResponse,
45
43
  lifespan=lifespan,
46
44
  )
47
45
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "fastapi-spawn"
7
- version = "0.4.31"
7
+ version = "0.4.32"
8
8
  description = "A powerful CLI tool to scaffold production-ready FastAPI projects with flexible database, auth, broker, and deployment options."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
File without changes