fastapi-gen 0.9.3.dev4__tar.gz → 0.11.0__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 (76) hide show
  1. {fastapi_gen-0.9.3.dev4 → fastapi_gen-0.11.0}/.gitignore +4 -4
  2. {fastapi_gen-0.9.3.dev4 → fastapi_gen-0.11.0}/PKG-INFO +72 -111
  3. fastapi_gen-0.11.0/README.md +224 -0
  4. fastapi_gen-0.11.0/packages/template-advanced/Makefile +18 -0
  5. fastapi_gen-0.11.0/packages/template-advanced/README.md +153 -0
  6. fastapi_gen-0.11.0/packages/template-advanced/pyproject.toml +37 -0
  7. {fastapi_gen-0.9.3.dev4/src/templates → fastapi_gen-0.11.0/packages/template-advanced/src}/advanced/main.py +1 -3
  8. {fastapi_gen-0.9.3.dev4/src/templates/advanced → fastapi_gen-0.11.0/packages/template-advanced}/tests/test_main.py +1 -1
  9. fastapi_gen-0.11.0/packages/template-hello-world/.env_dev +1 -0
  10. fastapi_gen-0.11.0/packages/template-hello-world/Makefile +18 -0
  11. fastapi_gen-0.11.0/packages/template-hello-world/README.md +107 -0
  12. fastapi_gen-0.11.0/packages/template-hello-world/pyproject.toml +30 -0
  13. {fastapi_gen-0.9.3.dev4/src/templates/hello_world → fastapi_gen-0.11.0/packages/template-hello-world}/tests/test_main.py +1 -1
  14. fastapi_gen-0.11.0/packages/template-langchain/.env_dev +2 -0
  15. fastapi_gen-0.11.0/packages/template-langchain/Makefile +18 -0
  16. fastapi_gen-0.11.0/packages/template-langchain/README.md +171 -0
  17. fastapi_gen-0.11.0/packages/template-langchain/pyproject.toml +36 -0
  18. {fastapi_gen-0.9.3.dev4/src/templates/langchain → fastapi_gen-0.11.0/packages/template-langchain}/tests/test_main.py +1 -1
  19. fastapi_gen-0.11.0/packages/template-llama/.env_dev +15 -0
  20. fastapi_gen-0.11.0/packages/template-llama/Makefile +34 -0
  21. fastapi_gen-0.11.0/packages/template-llama/README.md +245 -0
  22. fastapi_gen-0.11.0/packages/template-llama/pyproject.toml +30 -0
  23. {fastapi_gen-0.9.3.dev4/src/templates/llama → fastapi_gen-0.11.0/packages/template-llama}/tests/test_main.py +1 -1
  24. fastapi_gen-0.11.0/packages/template-nlp/.env_dev +37 -0
  25. fastapi_gen-0.11.0/packages/template-nlp/.gitignore +163 -0
  26. fastapi_gen-0.11.0/packages/template-nlp/Makefile +18 -0
  27. fastapi_gen-0.11.0/packages/template-nlp/README.md +160 -0
  28. fastapi_gen-0.11.0/packages/template-nlp/pyproject.toml +33 -0
  29. {fastapi_gen-0.9.3.dev4/src/templates/nlp → fastapi_gen-0.11.0/packages/template-nlp}/tests/test_main.py +1 -1
  30. {fastapi_gen-0.9.3.dev4 → fastapi_gen-0.11.0}/pyproject.toml +29 -23
  31. fastapi_gen-0.11.0/src/cli/__main__.py +204 -0
  32. fastapi_gen-0.9.3.dev4/README.md +0 -259
  33. fastapi_gen-0.9.3.dev4/src/cli/__main__.py +0 -120
  34. fastapi_gen-0.9.3.dev4/src/templates/advanced/Makefile +0 -18
  35. fastapi_gen-0.9.3.dev4/src/templates/advanced/README.md +0 -372
  36. fastapi_gen-0.9.3.dev4/src/templates/advanced/requirements.txt +0 -26
  37. fastapi_gen-0.9.3.dev4/src/templates/advanced/ruff.toml +0 -3
  38. fastapi_gen-0.9.3.dev4/src/templates/hello_world/Makefile +0 -18
  39. fastapi_gen-0.9.3.dev4/src/templates/hello_world/README.md +0 -194
  40. fastapi_gen-0.9.3.dev4/src/templates/hello_world/requirements.txt +0 -8
  41. fastapi_gen-0.9.3.dev4/src/templates/langchain/Makefile +0 -18
  42. fastapi_gen-0.9.3.dev4/src/templates/langchain/README.md +0 -385
  43. fastapi_gen-0.9.3.dev4/src/templates/langchain/requirements.txt +0 -14
  44. fastapi_gen-0.9.3.dev4/src/templates/langchain/ruff.toml +0 -3
  45. fastapi_gen-0.9.3.dev4/src/templates/llama/Makefile +0 -57
  46. fastapi_gen-0.9.3.dev4/src/templates/llama/README.md +0 -442
  47. fastapi_gen-0.9.3.dev4/src/templates/llama/models/.gitkeep +0 -0
  48. fastapi_gen-0.9.3.dev4/src/templates/llama/requirements.txt +0 -8
  49. fastapi_gen-0.9.3.dev4/src/templates/llama/ruff.toml +0 -3
  50. fastapi_gen-0.9.3.dev4/src/templates/nlp/Makefile +0 -21
  51. fastapi_gen-0.9.3.dev4/src/templates/nlp/README.md +0 -518
  52. fastapi_gen-0.9.3.dev4/src/templates/nlp/__init__.py +0 -0
  53. fastapi_gen-0.9.3.dev4/src/templates/nlp/conftest.py +0 -9
  54. fastapi_gen-0.9.3.dev4/src/templates/nlp/requirements.txt +0 -11
  55. fastapi_gen-0.9.3.dev4/src/templates/nlp/ruff.toml +0 -3
  56. fastapi_gen-0.9.3.dev4/src/templates/nlp/tests/__init__.py +0 -0
  57. {fastapi_gen-0.9.3.dev4 → fastapi_gen-0.11.0}/LICENSE +0 -0
  58. {fastapi_gen-0.9.3.dev4/src/templates/hello_world → fastapi_gen-0.11.0/packages/template-advanced}/.gitignore +0 -0
  59. {fastapi_gen-0.9.3.dev4/src → fastapi_gen-0.11.0/packages/template-advanced/src/advanced}/__init__.py +0 -0
  60. {fastapi_gen-0.9.3.dev4/src/cli → fastapi_gen-0.11.0/packages/template-advanced/tests}/__init__.py +0 -0
  61. {fastapi_gen-0.9.3.dev4/src/templates/langchain → fastapi_gen-0.11.0/packages/template-hello-world}/.gitignore +0 -0
  62. {fastapi_gen-0.9.3.dev4/src/templates → fastapi_gen-0.11.0/packages/template-hello-world/src/hello_world}/__init__.py +0 -0
  63. {fastapi_gen-0.9.3.dev4/src/templates → fastapi_gen-0.11.0/packages/template-hello-world/src}/hello_world/main.py +0 -0
  64. {fastapi_gen-0.9.3.dev4/src/templates/advanced → fastapi_gen-0.11.0/packages/template-hello-world/tests}/__init__.py +0 -0
  65. {fastapi_gen-0.9.3.dev4/src/templates/nlp → fastapi_gen-0.11.0/packages/template-langchain}/.gitignore +0 -0
  66. {fastapi_gen-0.9.3.dev4/src/templates/advanced/tests → fastapi_gen-0.11.0/packages/template-langchain/src/langchain_app}/__init__.py +0 -0
  67. {fastapi_gen-0.9.3.dev4/src/templates/langchain → fastapi_gen-0.11.0/packages/template-langchain/src/langchain_app}/main.py +0 -0
  68. {fastapi_gen-0.9.3.dev4/src/templates/hello_world → fastapi_gen-0.11.0/packages/template-langchain/tests}/__init__.py +0 -0
  69. {fastapi_gen-0.9.3.dev4/src/templates/llama → fastapi_gen-0.11.0/packages/template-llama}/.gitignore +0 -0
  70. {fastapi_gen-0.9.3.dev4/src/templates/hello_world/tests → fastapi_gen-0.11.0/packages/template-llama/src/llama_app}/__init__.py +0 -0
  71. {fastapi_gen-0.9.3.dev4/src/templates/llama → fastapi_gen-0.11.0/packages/template-llama/src/llama_app}/main.py +0 -0
  72. {fastapi_gen-0.9.3.dev4/src/templates/langchain → fastapi_gen-0.11.0/packages/template-llama/tests}/__init__.py +0 -0
  73. {fastapi_gen-0.9.3.dev4/src/templates/langchain/tests → fastapi_gen-0.11.0/packages/template-nlp/src/nlp}/__init__.py +0 -0
  74. {fastapi_gen-0.9.3.dev4/src/templates → fastapi_gen-0.11.0/packages/template-nlp/src}/nlp/main.py +0 -0
  75. {fastapi_gen-0.9.3.dev4/src/templates/llama → fastapi_gen-0.11.0/packages/template-nlp/tests}/__init__.py +0 -0
  76. {fastapi_gen-0.9.3.dev4/src/templates/llama/tests → fastapi_gen-0.11.0/src/cli}/__init__.py +0 -0
@@ -162,7 +162,7 @@ cython_debug/
162
162
  .ruff_cache
163
163
  .DS_Store
164
164
 
165
- src/templates/**/.pytest_cache
166
- src/templates/**/__pycache__
167
- src/templates/**/venv
168
- src/templates/advanced/app.db
165
+ # packages/template*/.pytest_cache
166
+ # packages/template*/__pycache__
167
+ # packages/template*/venv
168
+ # packages/template-advanced/app.db
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-gen
3
- Version: 0.9.3.dev4
3
+ Version: 0.11.0
4
4
  Summary: Set up a modern REST API by running one command.
5
5
  Project-URL: Documentation, https://github.com/mirpo/fastapi-gen#readme
6
6
  Project-URL: Issues, https://github.com/mirpo/fastapi-gen/issues
@@ -38,10 +38,6 @@ Requires-Python: >=3.11
38
38
  Requires-Dist: click==8.3.0
39
39
  Requires-Dist: colorama==0.4.6
40
40
  Requires-Dist: importlib-resources==6.5.2
41
- Provides-Extra: dev
42
- Requires-Dist: coverage[toml]==7.11.0; extra == 'dev'
43
- Requires-Dist: pytest==8.4.2; extra == 'dev'
44
- Requires-Dist: ruff==0.14.1; extra == 'dev'
45
41
  Description-Content-Type: text/markdown
46
42
 
47
43
  <div align="center">
@@ -77,19 +73,22 @@ Description-Content-Type: text/markdown
77
73
  Get a fully functional FastAPI app running in **30 seconds**:
78
74
 
79
75
  ```bash
80
- # Install
81
- pip install fastapi-gen
76
+ # Recommended: using uvx (no installation needed)
77
+ uvx fastapi-gen my_app
78
+ cd my_app && make start
79
+ ```
82
80
 
83
- # Create your app
81
+ **Or install with uv:**
82
+ ```bash
83
+ uv tool install fastapi-gen
84
84
  fastapi-gen my_app
85
-
86
- # Run it
87
85
  cd my_app && make start
88
86
  ```
89
87
 
90
- **Or use pipx for one-time execution:**
88
+ **Or use pip:**
91
89
  ```bash
92
- pipx run fastapi-gen my_app
90
+ pip install fastapi-gen
91
+ fastapi-gen my_app
93
92
  cd my_app && make start
94
93
  ```
95
94
 
@@ -99,13 +98,10 @@ cd my_app && make start
99
98
 
100
99
  ## Why FastAPI Gen?
101
100
 
102
- <div align="center">
103
-
104
- | **Focus on Code** | **Production Ready** | **Testing Included** | **Zero Config** |
105
- |:---:|:---:|:---:|:---:|
106
- | Skip boilerplate setup | Enterprise patterns | Real test coverage | Ready-to-run templates |
107
-
108
- </div>
101
+ **Focus on Code** - Skip boilerplate setup and start building
102
+ **Production Ready** - Enterprise patterns and best practices built-in
103
+ **Testing Included** - Real test coverage from day one
104
+ **Zero Config** - Ready-to-run templates that just work
109
105
 
110
106
  ---
111
107
 
@@ -117,16 +113,14 @@ cd my_app && make start
117
113
  **Best for:** Learning FastAPI fundamentals and starting new projects
118
114
 
119
115
  **Key Features:**
120
- - **REST API Fundamentals** - Complete CRUD with validation
121
- - **Configuration Management** - Both pydantic-settings & dotenv
122
- - **Dependency Injection** - Clean architecture with `Depends()`
123
- - **Background Tasks** - Async processing with logging
124
- - **Exception Handling** - Professional error responses
125
- - **Input Validation** - Advanced Pydantic constraints
126
- - **Health Monitoring** - Built-in health endpoints
127
- - **Complete Tests** - 100% test coverage
116
+ - REST API fundamentals with complete CRUD
117
+ - Configuration management (pydantic-settings & dotenv)
118
+ - Dependency injection and clean architecture
119
+ - Background tasks and exception handling
120
+ - Input validation and health monitoring
121
+ - Complete test coverage
128
122
 
129
- [📖 View Details →](src/templates/hello_world/README.md)
123
+ [View Details →](packages/template-hello-world/README.md)
130
124
 
131
125
  </details>
132
126
 
@@ -136,16 +130,14 @@ cd my_app && make start
136
130
  **Best for:** Production applications with enterprise features
137
131
 
138
132
  **Key Features:**
139
- - **JWT Authentication** - Registration, login, protected routes
140
- - **Database Integration** - SQLAlchemy 2.0 async (SQLite/PostgreSQL)
141
- - **Rate Limiting** - DDoS protection per endpoint
142
- - **Caching System** - In-memory + Redis integration ready
143
- - **WebSocket Support** - Real-time communication
144
- - **File Upload** - Secure handling + cloud storage ready
145
- - **Enhanced Security** - CORS, validation, production patterns
146
- - **Full Test Suite** - Auth, CRUD, WebSocket, integration
133
+ - JWT authentication with registration and login
134
+ - Database integration with SQLAlchemy 2.0 async
135
+ - Rate limiting and caching system
136
+ - WebSocket support and file upload
137
+ - Enhanced security and CORS configuration
138
+ - Full test suite
147
139
 
148
- [📖 View Details →](src/templates/advanced/README.md)
140
+ [View Details →](packages/template-advanced/README.md)
149
141
 
150
142
  </details>
151
143
 
@@ -155,14 +147,13 @@ cd my_app && make start
155
147
  **Best for:** AI applications with natural language processing
156
148
 
157
149
  **Key Features:**
158
- - **8 NLP Capabilities** - Summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
159
- - **Production Architecture** - Startup model loading, device auto-detection
160
- - **Smart Configuration** - Environment-based config, multiple models
161
- - **Performance Optimized** - Model caching, concurrent handling, hardware acceleration
162
- - **Production Monitoring** - Health checks, model status, logging
163
- - **Real AI Testing** - Actual model inference validation
150
+ - 8 NLP capabilities: summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
151
+ - Production architecture with startup model loading
152
+ - Smart configuration and device auto-detection
153
+ - Performance optimized with model caching
154
+ - Real AI testing with actual inference
164
155
 
165
- [📖 View Details →](src/templates/nlp/README.md)
156
+ [View Details →](packages/template-nlp/README.md)
166
157
 
167
158
  </details>
168
159
 
@@ -172,14 +163,13 @@ cd my_app && make start
172
163
  **Best for:** Applications using LangChain for LLM workflows
173
164
 
174
165
  **Key Features:**
175
- - **Optimized Loading** - Startup caching, memory management
176
- - **Modern Patterns** - Latest LangChain best practices
177
- - **Smart Config** - Auto device detection (CPU/GPU)
178
- - **Production Ready** - Health checks, monitoring, error handling
179
- - **Real Testing** - Actual model inference tests
180
- - **Dual Endpoints** - Text generation & question answering
166
+ - Optimized loading with startup caching
167
+ - Modern LangChain patterns and best practices
168
+ - Smart config with auto device detection
169
+ - Production ready with health checks
170
+ - Dual endpoints: text generation and question answering
181
171
 
182
- [📖 View Details →](src/templates/langchain/README.md)
172
+ [View Details →](packages/template-langchain/README.md)
183
173
 
184
174
  </details>
185
175
 
@@ -189,16 +179,15 @@ cd my_app && make start
189
179
  **Best for:** Local LLM inference with llama-cpp-python
190
180
 
191
181
  **Key Features:**
192
- - **Local LLM Focus** - Optimized for Gemma/Llama GGUF models
193
- - **GPU Acceleration** - Auto GPU detection, configurable layers
194
- - **Advanced Config** - Context windows, threading, performance tuning
195
- - **Production Ready** - Lifecycle management, health monitoring
196
- - **Real Testing** - Actual model inference validation
197
- - **Easy Setup** - Auto model download, optimized defaults
182
+ - Local LLM focus optimized for Gemma/Llama GGUF models
183
+ - GPU acceleration with auto detection
184
+ - Advanced config for context windows and threading
185
+ - Production ready with lifecycle management
186
+ - Easy setup with auto model download
198
187
 
199
188
  > **Requirements:** ~4GB model download + 4GB+ RAM
200
189
 
201
- [📖 View Details →](src/templates/llama/README.md)
190
+ [View Details →](packages/template-llama/README.md)
202
191
 
203
192
  </details>
204
193
 
@@ -206,13 +195,13 @@ cd my_app && make start
206
195
 
207
196
  ## Template Comparison
208
197
 
209
- | Template | Best For | Complexity | AI/ML | Database | Auth |
210
- |----------|----------|------------|--------|----------|------|
211
- | **Hello World** | Learning, Simple APIs | | | | |
212
- | **Advanced** | Production Apps | ⭐⭐⭐ | | | |
213
- | **NLP** | AI Text Processing | ⭐⭐⭐⭐ | | | |
214
- | **LangChain** | LLM Workflows | ⭐⭐⭐⭐ | | | |
215
- | **Llama** | Local LLM | ⭐⭐⭐⭐⭐ | | | |
198
+ | Template | Best For | Complexity | AI/ML | Database | Auth |
199
+ | --------------- | --------------------- | ---------- | ----- | -------- | ---- |
200
+ | **Hello World** | Learning, Simple APIs | Basic | No | No | No |
201
+ | **Advanced** | Production Apps | Medium | No | Yes | Yes |
202
+ | **NLP** | AI Text Processing | Advanced | Yes | No | No |
203
+ | **LangChain** | LLM Workflows | Advanced | Yes | No | No |
204
+ | **Llama** | Local LLM | Advanced | Yes | No | No |
216
205
 
217
206
  ## What You Get Out of the Box
218
207
 
@@ -227,66 +216,38 @@ cd my_app && make start
227
216
  All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:
228
217
 
229
218
  ```bash
230
- fastapi-gen my_app # Create
219
+ fastapi-gen my_app # Create
231
220
  cd my_app # Enter
232
221
  make start # Run!
233
222
  ```
234
223
 
235
224
  **Every Template Includes:**
236
- - **Ready-to-run** development environment
237
- - **Industry-standard** project structure
238
- - **Comprehensive** test suites with examples
239
- - **Ruff** linting and formatting
240
- - **Auto-generated** OpenAPI documentation
241
- - **Makefile** with common development commands
242
-
243
- ## Creating an App
244
-
245
- **You'll need to have Python 3.12+ or later version on your local development machine**. We recommend using the latest LTS version. You can use [pyenv](https://github.com/pyenv/pyenv) (macOS/Linux) to switch Python versions between different projects.
246
-
247
- ### Basic template
225
+ - Ready-to-run development environment
226
+ - Industry-standard project structure
227
+ - Comprehensive test suites with examples
228
+ - Ruff linting and formatting
229
+ - Auto-generated OpenAPI documentation
230
+ - Makefile with common development commands
248
231
 
249
- ```console
250
- pip3 install fastapi-gen
251
- fastapi-gen my_app
252
- ```
253
-
254
- or
255
-
256
- ```console
257
- pip3 install fastapi-gen
258
- fastapi-gen my_app --template hello_world
259
- ```
260
-
261
- ### Advanced template
262
-
263
- ```console
264
- pip3 install fastapi-gen
265
- fastapi-gen my_app --template advanced
266
- ```
232
+ ## Installation & Usage
267
233
 
268
- ### NLP template
234
+ **You'll need to have Python 3.11+ or later version on your local development machine**. We recommend using the latest version. You can use [uv](https://docs.astral.sh/uv/) for Python version management and project workflows.
269
235
 
270
- ```console
271
- pip install fastapi-gen
272
- fastapi-gen my_app --template nlp
273
- ```
236
+ ### Choose Your Template
274
237
 
275
- ### Langchain template
238
+ ```bash
239
+ # Default (hello_world)
240
+ uvx fastapi-gen my_app
276
241
 
277
- ```console
278
- pip install fastapi-gen
279
- fastapi-gen my_app --template Langchain
242
+ # Or specify a template
243
+ uvx fastapi-gen my_app --template <template-name>
280
244
  ```
281
245
 
282
- ### Llama template
246
+ Available templates: `hello_world`, `advanced`, `nlp`, `langchain`, `llama`
283
247
 
284
- ```console
285
- pip install fastapi-gen
286
- fastapi-gen my_app --template llama
287
- ```
248
+ ### Built-in Commands
288
249
 
289
- Inside the newly created project, you can run some built-in commands:
250
+ Inside the newly created project, you can run:
290
251
 
291
252
  ### `make start`
292
253
 
@@ -0,0 +1,224 @@
1
+ <div align="center">
2
+
3
+ # FastAPI Gen
4
+
5
+ **Create production-ready FastAPI applications in seconds**
6
+
7
+ *From simple APIs to LLM-enabled applications, all without build configuration.*
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml?query=workflow%3Atest+event%3Apush+branch%main">
11
+ <img src="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml/badge.svg?branch=main" alt="Test Status">
12
+ </a>
13
+ <a href="https://pypi.org/project/fastapi-gen">
14
+ <img src="https://img.shields.io/pypi/v/fastapi-gen?color=%2334D058&label=pypi" alt="PyPI version">
15
+ </a>
16
+ <a href="https://pypi.org/project/fastapi-gen">
17
+ <img src="https://img.shields.io/pypi/pyversions/fastapi-gen.svg?color=%2334D058" alt="Python versions">
18
+ </a>
19
+ <a href="https://pypi.org/project/fastapi-gen">
20
+ <img src="https://img.shields.io/pypi/dm/fastapi-gen?color=blue" alt="Downloads">
21
+ </a>
22
+ <a href="https://github.com/mirpo/fastapi-gen/blob/main/LICENSE">
23
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
24
+ </a>
25
+ </p>
26
+
27
+ </div>
28
+
29
+ ## Quick Start
30
+
31
+ Get a fully functional FastAPI app running in **30 seconds**:
32
+
33
+ ```bash
34
+ # Recommended: using uvx (no installation needed)
35
+ uvx fastapi-gen my_app
36
+ cd my_app && make start
37
+ ```
38
+
39
+ **Or install with uv:**
40
+ ```bash
41
+ uv tool install fastapi-gen
42
+ fastapi-gen my_app
43
+ cd my_app && make start
44
+ ```
45
+
46
+ **Or use pip:**
47
+ ```bash
48
+ pip install fastapi-gen
49
+ fastapi-gen my_app
50
+ cd my_app && make start
51
+ ```
52
+
53
+ **That's it!** Open [http://localhost:8000/docs](http://localhost:8000/docs) to see your OpenAPI documentation.
54
+
55
+ > **Platform Support:** Works on macOS and Linux | [Report Issues](https://github.com/mirpo/fastapi-gen/issues/new)
56
+
57
+ ## Why FastAPI Gen?
58
+
59
+ **Focus on Code** - Skip boilerplate setup and start building
60
+ **Production Ready** - Enterprise patterns and best practices built-in
61
+ **Testing Included** - Real test coverage from day one
62
+ **Zero Config** - Ready-to-run templates that just work
63
+
64
+ ---
65
+
66
+ ## Templates Overview
67
+
68
+ <details>
69
+ <summary><strong>Hello World</strong> - Perfect for Learning FastAPI</summary>
70
+
71
+ **Best for:** Learning FastAPI fundamentals and starting new projects
72
+
73
+ **Key Features:**
74
+ - REST API fundamentals with complete CRUD
75
+ - Configuration management (pydantic-settings & dotenv)
76
+ - Dependency injection and clean architecture
77
+ - Background tasks and exception handling
78
+ - Input validation and health monitoring
79
+ - Complete test coverage
80
+
81
+ [View Details →](packages/template-hello-world/README.md)
82
+
83
+ </details>
84
+
85
+ <details>
86
+ <summary><strong>Advanced</strong> - Enterprise Production Template</summary>
87
+
88
+ **Best for:** Production applications with enterprise features
89
+
90
+ **Key Features:**
91
+ - JWT authentication with registration and login
92
+ - Database integration with SQLAlchemy 2.0 async
93
+ - Rate limiting and caching system
94
+ - WebSocket support and file upload
95
+ - Enhanced security and CORS configuration
96
+ - Full test suite
97
+
98
+ [View Details →](packages/template-advanced/README.md)
99
+
100
+ </details>
101
+
102
+ <details>
103
+ <summary><strong>NLP</strong> - Comprehensive AI Language Processing</summary>
104
+
105
+ **Best for:** AI applications with natural language processing
106
+
107
+ **Key Features:**
108
+ - 8 NLP capabilities: summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
109
+ - Production architecture with startup model loading
110
+ - Smart configuration and device auto-detection
111
+ - Performance optimized with model caching
112
+ - Real AI testing with actual inference
113
+
114
+ [View Details →](packages/template-nlp/README.md)
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary><strong>LangChain</strong> - Modern LLM Integration</summary>
120
+
121
+ **Best for:** Applications using LangChain for LLM workflows
122
+
123
+ **Key Features:**
124
+ - Optimized loading with startup caching
125
+ - Modern LangChain patterns and best practices
126
+ - Smart config with auto device detection
127
+ - Production ready with health checks
128
+ - Dual endpoints: text generation and question answering
129
+
130
+ [View Details →](packages/template-langchain/README.md)
131
+
132
+ </details>
133
+
134
+ <details>
135
+ <summary><strong>Llama</strong> - Local LLM Powerhouse</summary>
136
+
137
+ **Best for:** Local LLM inference with llama-cpp-python
138
+
139
+ **Key Features:**
140
+ - Local LLM focus optimized for Gemma/Llama GGUF models
141
+ - GPU acceleration with auto detection
142
+ - Advanced config for context windows and threading
143
+ - Production ready with lifecycle management
144
+ - Easy setup with auto model download
145
+
146
+ > **Requirements:** ~4GB model download + 4GB+ RAM
147
+
148
+ [View Details →](packages/template-llama/README.md)
149
+
150
+ </details>
151
+
152
+ ---
153
+
154
+ ## Template Comparison
155
+
156
+ | Template | Best For | Complexity | AI/ML | Database | Auth |
157
+ | --------------- | --------------------- | ---------- | ----- | -------- | ---- |
158
+ | **Hello World** | Learning, Simple APIs | Basic | No | No | No |
159
+ | **Advanced** | Production Apps | Medium | No | Yes | Yes |
160
+ | **NLP** | AI Text Processing | Advanced | Yes | No | No |
161
+ | **LangChain** | LLM Workflows | Advanced | Yes | No | No |
162
+ | **Llama** | Local LLM | Advanced | Yes | No | No |
163
+
164
+ ## What You Get Out of the Box
165
+
166
+ <div align="center">
167
+
168
+ **Zero Configuration** • **Production Patterns** • **Complete Testing** • **Code Quality** • **Auto Documentation** • **Deployment Ready**
169
+
170
+ </div>
171
+
172
+ **Focus on Your Code, Not Setup**
173
+
174
+ All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:
175
+
176
+ ```bash
177
+ fastapi-gen my_app # Create
178
+ cd my_app # Enter
179
+ make start # Run!
180
+ ```
181
+
182
+ **Every Template Includes:**
183
+ - Ready-to-run development environment
184
+ - Industry-standard project structure
185
+ - Comprehensive test suites with examples
186
+ - Ruff linting and formatting
187
+ - Auto-generated OpenAPI documentation
188
+ - Makefile with common development commands
189
+
190
+ ## Installation & Usage
191
+
192
+ **You'll need to have Python 3.11+ or later version on your local development machine**. We recommend using the latest version. You can use [uv](https://docs.astral.sh/uv/) for Python version management and project workflows.
193
+
194
+ ### Choose Your Template
195
+
196
+ ```bash
197
+ # Default (hello_world)
198
+ uvx fastapi-gen my_app
199
+
200
+ # Or specify a template
201
+ uvx fastapi-gen my_app --template <template-name>
202
+ ```
203
+
204
+ Available templates: `hello_world`, `advanced`, `nlp`, `langchain`, `llama`
205
+
206
+ ### Built-in Commands
207
+
208
+ Inside the newly created project, you can run:
209
+
210
+ ### `make start`
211
+
212
+ Runs the app in development mode.<br>
213
+ Open [http://localhost:8000/docs](http://localhost:8000/docs) to view OpenAPI documentation in the browser.
214
+
215
+ The page will automatically reload if you make changes to the code.
216
+
217
+ ### `make test`
218
+
219
+ Runs tests.<br>
220
+ By default, runs tests related to files changed since the last commit.
221
+
222
+ ## License
223
+
224
+ `fastapi-gen` is distributed under the terms of the [MIT](https://github.com/mirpo/fastapi-gen/blob/main/LICENSE) license.
@@ -0,0 +1,18 @@
1
+ .PHONY: install start test lint lint-fix
2
+
3
+ install:
4
+ uv sync
5
+
6
+ start:
7
+ uv run uvicorn advanced.main:app --reload
8
+
9
+ test:
10
+ uv run pytest
11
+
12
+ lint:
13
+ uv run ruff check src tests
14
+ uv run ruff format --check src tests
15
+
16
+ lint-fix:
17
+ uv run ruff check --fix src tests
18
+ uv run ruff format src tests