fastapi-gen 0.8.0__tar.gz → 0.9.3.dev3__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 (75) hide show
  1. fastapi_gen-0.9.3.dev3/PKG-INFO +305 -0
  2. fastapi_gen-0.9.3.dev3/README.md +259 -0
  3. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/pyproject.toml +39 -8
  4. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/cli/__main__.py +25 -9
  5. fastapi_gen-0.9.3.dev3/src/templates/advanced/README.md +372 -0
  6. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/main.py +75 -14
  7. fastapi_gen-0.9.3.dev3/src/templates/advanced/requirements.txt +26 -0
  8. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/tests/test_main.py +38 -1
  9. fastapi_gen-0.9.3.dev3/src/templates/hello_world/README.md +194 -0
  10. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/main.py +6 -0
  11. fastapi_gen-0.9.3.dev3/src/templates/hello_world/requirements.txt +8 -0
  12. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/tests/test_main.py +2 -0
  13. fastapi_gen-0.9.3.dev3/src/templates/langchain/README.md +385 -0
  14. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/main.py +11 -9
  15. fastapi_gen-0.9.3.dev3/src/templates/langchain/requirements.txt +14 -0
  16. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/tests/test_main.py +2 -2
  17. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/llama/Makefile +15 -4
  18. fastapi_gen-0.9.3.dev3/src/templates/llama/README.md +442 -0
  19. fastapi_gen-0.9.3.dev3/src/templates/llama/main.py +219 -0
  20. fastapi_gen-0.9.3.dev3/src/templates/llama/requirements.txt +8 -0
  21. fastapi_gen-0.9.3.dev3/src/templates/llama/ruff.toml +3 -0
  22. fastapi_gen-0.9.3.dev3/src/templates/llama/tests/test_main.py +151 -0
  23. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/nlp/Makefile +5 -2
  24. fastapi_gen-0.9.3.dev3/src/templates/nlp/README.md +518 -0
  25. fastapi_gen-0.9.3.dev3/src/templates/nlp/conftest.py +9 -0
  26. fastapi_gen-0.9.3.dev3/src/templates/nlp/main.py +558 -0
  27. fastapi_gen-0.9.3.dev3/src/templates/nlp/requirements.txt +11 -0
  28. fastapi_gen-0.9.3.dev3/src/templates/nlp/ruff.toml +3 -0
  29. fastapi_gen-0.9.3.dev3/src/templates/nlp/tests/test_main.py +387 -0
  30. fastapi_gen-0.8.0/PKG-INFO +0 -210
  31. fastapi_gen-0.8.0/README.md +0 -166
  32. fastapi_gen-0.8.0/src/cli/__about__.py +0 -1
  33. fastapi_gen-0.8.0/src/templates/advanced/README.md +0 -238
  34. fastapi_gen-0.8.0/src/templates/advanced/requirements.txt +0 -26
  35. fastapi_gen-0.8.0/src/templates/hello_world/.env_dev +0 -1
  36. fastapi_gen-0.8.0/src/templates/hello_world/README.md +0 -55
  37. fastapi_gen-0.8.0/src/templates/hello_world/requirements.txt +0 -8
  38. fastapi_gen-0.8.0/src/templates/langchain/.env_dev +0 -2
  39. fastapi_gen-0.8.0/src/templates/langchain/README.md +0 -123
  40. fastapi_gen-0.8.0/src/templates/langchain/requirements.txt +0 -15
  41. fastapi_gen-0.8.0/src/templates/llama/.env_dev +0 -7
  42. fastapi_gen-0.8.0/src/templates/llama/README.md +0 -19
  43. fastapi_gen-0.8.0/src/templates/llama/main.py +0 -45
  44. fastapi_gen-0.8.0/src/templates/llama/requirements.txt +0 -7
  45. fastapi_gen-0.8.0/src/templates/llama/tests/test_main.py +0 -28
  46. fastapi_gen-0.8.0/src/templates/nlp/.env_dev +0 -10
  47. fastapi_gen-0.8.0/src/templates/nlp/README.md +0 -19
  48. fastapi_gen-0.8.0/src/templates/nlp/main.py +0 -83
  49. fastapi_gen-0.8.0/src/templates/nlp/requirements.txt +0 -10
  50. fastapi_gen-0.8.0/src/templates/nlp/tests/test_main.py +0 -79
  51. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/.gitignore +0 -0
  52. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/LICENSE +0 -0
  53. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/__init__.py +0 -0
  54. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/cli/__init__.py +0 -0
  55. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/__init__.py +0 -0
  56. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/Makefile +0 -0
  57. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/__init__.py +0 -0
  58. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/ruff.toml +0 -0
  59. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/advanced/tests/__init__.py +0 -0
  60. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/.gitignore +0 -0
  61. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/Makefile +0 -0
  62. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/__init__.py +0 -0
  63. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/hello_world/tests/__init__.py +0 -0
  64. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/.gitignore +0 -0
  65. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/Makefile +0 -0
  66. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/__init__.py +0 -0
  67. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/ruff.toml +0 -0
  68. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/langchain/tests/__init__.py +0 -0
  69. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/llama/.gitignore +0 -0
  70. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/llama/__init__.py +0 -0
  71. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/llama/models/.gitkeep +0 -0
  72. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/llama/tests/__init__.py +0 -0
  73. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/nlp/.gitignore +0 -0
  74. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/nlp/__init__.py +0 -0
  75. {fastapi_gen-0.8.0 → fastapi_gen-0.9.3.dev3}/src/templates/nlp/tests/__init__.py +0 -0
@@ -0,0 +1,305 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastapi-gen
3
+ Version: 0.9.3.dev3
4
+ Summary: Set up a modern REST API by running one command.
5
+ Project-URL: Documentation, https://github.com/mirpo/fastapi-gen#readme
6
+ Project-URL: Issues, https://github.com/mirpo/fastapi-gen/issues
7
+ Project-URL: Source, https://github.com/mirpo/fastapi-gen
8
+ Author-email: Miroslav Pokrovskii <miroslavpokrovskiy@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,fastapi,hello world,huggingface,langchain,llama,llama.cpp,named-entity recognition,ner,nlp,summarization,text generation
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Framework :: AsyncIO
15
+ Classifier: Framework :: FastAPI
16
+ Classifier: Framework :: Pydantic
17
+ Classifier: Framework :: Pydantic :: 1
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: Information Technology
20
+ Classifier: Intended Audience :: System Administrators
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Programming Language :: Python
24
+ Classifier: Programming Language :: Python :: 3
25
+ Classifier: Programming Language :: Python :: 3 :: Only
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Topic :: Internet
29
+ Classifier: Topic :: Internet :: WWW/HTTP
30
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
31
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
32
+ Classifier: Topic :: Software Development
33
+ Classifier: Topic :: Software Development :: Libraries
34
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
35
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
36
+ Classifier: Typing :: Typed
37
+ Requires-Python: >=3.11
38
+ Requires-Dist: click==8.3.0
39
+ Requires-Dist: colorama==0.4.6
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
+ Description-Content-Type: text/markdown
46
+
47
+ <div align="center">
48
+
49
+ # FastAPI Gen
50
+
51
+ **Create production-ready FastAPI applications in seconds**
52
+
53
+ *From simple APIs to LLM-enabled applications, all without build configuration.*
54
+
55
+ <p align="center">
56
+ <a href="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml?query=workflow%3Atest+event%3Apush+branch%main">
57
+ <img src="https://github.com/mirpo/fastapi-gen/actions/workflows/test.yml/badge.svg?branch=main" alt="Test Status">
58
+ </a>
59
+ <a href="https://pypi.org/project/fastapi-gen">
60
+ <img src="https://img.shields.io/pypi/v/fastapi-gen?color=%2334D058&label=pypi" alt="PyPI version">
61
+ </a>
62
+ <a href="https://pypi.org/project/fastapi-gen">
63
+ <img src="https://img.shields.io/pypi/pyversions/fastapi-gen.svg?color=%2334D058" alt="Python versions">
64
+ </a>
65
+ <a href="https://pypi.org/project/fastapi-gen">
66
+ <img src="https://img.shields.io/pypi/dm/fastapi-gen?color=blue" alt="Downloads">
67
+ </a>
68
+ <a href="https://github.com/mirpo/fastapi-gen/blob/main/LICENSE">
69
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
70
+ </a>
71
+ </p>
72
+
73
+ </div>
74
+
75
+ ## Quick Start
76
+
77
+ Get a fully functional FastAPI app running in **30 seconds**:
78
+
79
+ ```bash
80
+ # Install
81
+ pip install fastapi-gen
82
+
83
+ # Create your app
84
+ fastapi-gen my_app
85
+
86
+ # Run it
87
+ cd my_app && make start
88
+ ```
89
+
90
+ **Or use pipx for one-time execution:**
91
+ ```bash
92
+ pipx run fastapi-gen my_app
93
+ cd my_app && make start
94
+ ```
95
+
96
+ **That's it!** Open [http://localhost:8000/docs](http://localhost:8000/docs) to see your OpenAPI documentation.
97
+
98
+ > **Platform Support:** Works on macOS and Linux | [Report Issues](https://github.com/mirpo/fastapi-gen/issues/new)
99
+
100
+ ## Why FastAPI Gen?
101
+
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>
109
+
110
+ ---
111
+
112
+ ## Templates Overview
113
+
114
+ <details>
115
+ <summary><strong>Hello World</strong> - Perfect for Learning FastAPI</summary>
116
+
117
+ **Best for:** Learning FastAPI fundamentals and starting new projects
118
+
119
+ **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
128
+
129
+ [📖 View Details →](src/templates/hello_world/README.md)
130
+
131
+ </details>
132
+
133
+ <details>
134
+ <summary><strong>Advanced</strong> - Enterprise Production Template</summary>
135
+
136
+ **Best for:** Production applications with enterprise features
137
+
138
+ **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
147
+
148
+ [📖 View Details →](src/templates/advanced/README.md)
149
+
150
+ </details>
151
+
152
+ <details>
153
+ <summary><strong>NLP</strong> - Comprehensive AI Language Processing</summary>
154
+
155
+ **Best for:** AI applications with natural language processing
156
+
157
+ **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
164
+
165
+ [📖 View Details →](src/templates/nlp/README.md)
166
+
167
+ </details>
168
+
169
+ <details>
170
+ <summary><strong>LangChain</strong> - Modern LLM Integration</summary>
171
+
172
+ **Best for:** Applications using LangChain for LLM workflows
173
+
174
+ **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
181
+
182
+ [📖 View Details →](src/templates/langchain/README.md)
183
+
184
+ </details>
185
+
186
+ <details>
187
+ <summary><strong>Llama</strong> - Local LLM Powerhouse</summary>
188
+
189
+ **Best for:** Local LLM inference with llama-cpp-python
190
+
191
+ **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
198
+
199
+ > **Requirements:** ~4GB model download + 4GB+ RAM
200
+
201
+ [📖 View Details →](src/templates/llama/README.md)
202
+
203
+ </details>
204
+
205
+ ---
206
+
207
+ ## Template Comparison
208
+
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 | ⭐⭐⭐⭐⭐ | ✅ | ❌ | ❌ |
216
+
217
+ ## What You Get Out of the Box
218
+
219
+ <div align="center">
220
+
221
+ **Zero Configuration** • **Production Patterns** • **Complete Testing** • **Code Quality** • **Auto Documentation** • **Deployment Ready**
222
+
223
+ </div>
224
+
225
+ **Focus on Your Code, Not Setup**
226
+
227
+ All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:
228
+
229
+ ```bash
230
+ fastapi-gen my_app # Create
231
+ cd my_app # Enter
232
+ make start # Run!
233
+ ```
234
+
235
+ **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
248
+
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
+ ```
267
+
268
+ ### NLP template
269
+
270
+ ```console
271
+ pip install fastapi-gen
272
+ fastapi-gen my_app --template nlp
273
+ ```
274
+
275
+ ### Langchain template
276
+
277
+ ```console
278
+ pip install fastapi-gen
279
+ fastapi-gen my_app --template Langchain
280
+ ```
281
+
282
+ ### Llama template
283
+
284
+ ```console
285
+ pip install fastapi-gen
286
+ fastapi-gen my_app --template llama
287
+ ```
288
+
289
+ Inside the newly created project, you can run some built-in commands:
290
+
291
+ ### `make start`
292
+
293
+ Runs the app in development mode.<br>
294
+ Open [http://localhost:8000/docs](http://localhost:8000/docs) to view OpenAPI documentation in the browser.
295
+
296
+ The page will automatically reload if you make changes to the code.
297
+
298
+ ### `make test`
299
+
300
+ Runs tests.<br>
301
+ By default, runs tests related to files changed since the last commit.
302
+
303
+ ## License
304
+
305
+ `fastapi-gen` is distributed under the terms of the [MIT](https://github.com/mirpo/fastapi-gen/blob/main/LICENSE) license.
@@ -0,0 +1,259 @@
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
+ # Install
35
+ pip install fastapi-gen
36
+
37
+ # Create your app
38
+ fastapi-gen my_app
39
+
40
+ # Run it
41
+ cd my_app && make start
42
+ ```
43
+
44
+ **Or use pipx for one-time execution:**
45
+ ```bash
46
+ pipx run fastapi-gen my_app
47
+ cd my_app && make start
48
+ ```
49
+
50
+ **That's it!** Open [http://localhost:8000/docs](http://localhost:8000/docs) to see your OpenAPI documentation.
51
+
52
+ > **Platform Support:** Works on macOS and Linux | [Report Issues](https://github.com/mirpo/fastapi-gen/issues/new)
53
+
54
+ ## Why FastAPI Gen?
55
+
56
+ <div align="center">
57
+
58
+ | **Focus on Code** | **Production Ready** | **Testing Included** | **Zero Config** |
59
+ |:---:|:---:|:---:|:---:|
60
+ | Skip boilerplate setup | Enterprise patterns | Real test coverage | Ready-to-run templates |
61
+
62
+ </div>
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** - Complete CRUD with validation
75
+ - **Configuration Management** - Both pydantic-settings & dotenv
76
+ - **Dependency Injection** - Clean architecture with `Depends()`
77
+ - **Background Tasks** - Async processing with logging
78
+ - **Exception Handling** - Professional error responses
79
+ - **Input Validation** - Advanced Pydantic constraints
80
+ - **Health Monitoring** - Built-in health endpoints
81
+ - **Complete Tests** - 100% test coverage
82
+
83
+ [📖 View Details →](src/templates/hello_world/README.md)
84
+
85
+ </details>
86
+
87
+ <details>
88
+ <summary><strong>Advanced</strong> - Enterprise Production Template</summary>
89
+
90
+ **Best for:** Production applications with enterprise features
91
+
92
+ **Key Features:**
93
+ - **JWT Authentication** - Registration, login, protected routes
94
+ - **Database Integration** - SQLAlchemy 2.0 async (SQLite/PostgreSQL)
95
+ - **Rate Limiting** - DDoS protection per endpoint
96
+ - **Caching System** - In-memory + Redis integration ready
97
+ - **WebSocket Support** - Real-time communication
98
+ - **File Upload** - Secure handling + cloud storage ready
99
+ - **Enhanced Security** - CORS, validation, production patterns
100
+ - **Full Test Suite** - Auth, CRUD, WebSocket, integration
101
+
102
+ [📖 View Details →](src/templates/advanced/README.md)
103
+
104
+ </details>
105
+
106
+ <details>
107
+ <summary><strong>NLP</strong> - Comprehensive AI Language Processing</summary>
108
+
109
+ **Best for:** AI applications with natural language processing
110
+
111
+ **Key Features:**
112
+ - **8 NLP Capabilities** - Summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
113
+ - **Production Architecture** - Startup model loading, device auto-detection
114
+ - **Smart Configuration** - Environment-based config, multiple models
115
+ - **Performance Optimized** - Model caching, concurrent handling, hardware acceleration
116
+ - **Production Monitoring** - Health checks, model status, logging
117
+ - **Real AI Testing** - Actual model inference validation
118
+
119
+ [📖 View Details →](src/templates/nlp/README.md)
120
+
121
+ </details>
122
+
123
+ <details>
124
+ <summary><strong>LangChain</strong> - Modern LLM Integration</summary>
125
+
126
+ **Best for:** Applications using LangChain for LLM workflows
127
+
128
+ **Key Features:**
129
+ - **Optimized Loading** - Startup caching, memory management
130
+ - **Modern Patterns** - Latest LangChain best practices
131
+ - **Smart Config** - Auto device detection (CPU/GPU)
132
+ - **Production Ready** - Health checks, monitoring, error handling
133
+ - **Real Testing** - Actual model inference tests
134
+ - **Dual Endpoints** - Text generation & question answering
135
+
136
+ [📖 View Details →](src/templates/langchain/README.md)
137
+
138
+ </details>
139
+
140
+ <details>
141
+ <summary><strong>Llama</strong> - Local LLM Powerhouse</summary>
142
+
143
+ **Best for:** Local LLM inference with llama-cpp-python
144
+
145
+ **Key Features:**
146
+ - **Local LLM Focus** - Optimized for Gemma/Llama GGUF models
147
+ - **GPU Acceleration** - Auto GPU detection, configurable layers
148
+ - **Advanced Config** - Context windows, threading, performance tuning
149
+ - **Production Ready** - Lifecycle management, health monitoring
150
+ - **Real Testing** - Actual model inference validation
151
+ - **Easy Setup** - Auto model download, optimized defaults
152
+
153
+ > **Requirements:** ~4GB model download + 4GB+ RAM
154
+
155
+ [📖 View Details →](src/templates/llama/README.md)
156
+
157
+ </details>
158
+
159
+ ---
160
+
161
+ ## Template Comparison
162
+
163
+ | Template | Best For | Complexity | AI/ML | Database | Auth |
164
+ |----------|----------|------------|--------|----------|------|
165
+ | **Hello World** | Learning, Simple APIs | ⭐ | ❌ | ❌ | ❌ |
166
+ | **Advanced** | Production Apps | ⭐⭐⭐ | ❌ | ✅ | ✅ |
167
+ | **NLP** | AI Text Processing | ⭐⭐⭐⭐ | ✅ | ❌ | ❌ |
168
+ | **LangChain** | LLM Workflows | ⭐⭐⭐⭐ | ✅ | ❌ | ❌ |
169
+ | **Llama** | Local LLM | ⭐⭐⭐⭐⭐ | ✅ | ❌ | ❌ |
170
+
171
+ ## What You Get Out of the Box
172
+
173
+ <div align="center">
174
+
175
+ **Zero Configuration** • **Production Patterns** • **Complete Testing** • **Code Quality** • **Auto Documentation** • **Deployment Ready**
176
+
177
+ </div>
178
+
179
+ **Focus on Your Code, Not Setup**
180
+
181
+ All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:
182
+
183
+ ```bash
184
+ fastapi-gen my_app # Create
185
+ cd my_app # Enter
186
+ make start # Run!
187
+ ```
188
+
189
+ **Every Template Includes:**
190
+ - **Ready-to-run** development environment
191
+ - **Industry-standard** project structure
192
+ - **Comprehensive** test suites with examples
193
+ - **Ruff** linting and formatting
194
+ - **Auto-generated** OpenAPI documentation
195
+ - **Makefile** with common development commands
196
+
197
+ ## Creating an App
198
+
199
+ **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.
200
+
201
+ ### Basic template
202
+
203
+ ```console
204
+ pip3 install fastapi-gen
205
+ fastapi-gen my_app
206
+ ```
207
+
208
+ or
209
+
210
+ ```console
211
+ pip3 install fastapi-gen
212
+ fastapi-gen my_app --template hello_world
213
+ ```
214
+
215
+ ### Advanced template
216
+
217
+ ```console
218
+ pip3 install fastapi-gen
219
+ fastapi-gen my_app --template advanced
220
+ ```
221
+
222
+ ### NLP template
223
+
224
+ ```console
225
+ pip install fastapi-gen
226
+ fastapi-gen my_app --template nlp
227
+ ```
228
+
229
+ ### Langchain template
230
+
231
+ ```console
232
+ pip install fastapi-gen
233
+ fastapi-gen my_app --template Langchain
234
+ ```
235
+
236
+ ### Llama template
237
+
238
+ ```console
239
+ pip install fastapi-gen
240
+ fastapi-gen my_app --template llama
241
+ ```
242
+
243
+ Inside the newly created project, you can run some built-in commands:
244
+
245
+ ### `make start`
246
+
247
+ Runs the app in development mode.<br>
248
+ Open [http://localhost:8000/docs](http://localhost:8000/docs) to view OpenAPI documentation in the browser.
249
+
250
+ The page will automatically reload if you make changes to the code.
251
+
252
+ ### `make test`
253
+
254
+ Runs tests.<br>
255
+ By default, runs tests related to files changed since the last commit.
256
+
257
+ ## License
258
+
259
+ `fastapi-gen` is distributed under the terms of the [MIT](https://github.com/mirpo/fastapi-gen/blob/main/LICENSE) license.
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
2
+ requires = ["hatchling", "hatch-vcs"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [tool.hatch.build]
@@ -7,13 +7,43 @@ include = ["src"]
7
7
 
8
8
  [tool.hatch.build.targets.wheel]
9
9
  sources = ["src"]
10
+ exclude = [
11
+ "**/__pycache__",
12
+ "**/*.pyc",
13
+ "**/.venv",
14
+ "**/venv",
15
+ "**/.pytest_cache",
16
+ "**/.ruff_cache",
17
+ "**/*.egg-info",
18
+ "**/*.log",
19
+ "**/*.db",
20
+ "**/models/*.gguf",
21
+ "**/models/*.bin",
22
+ "**/.env_dev",
23
+ ]
24
+
25
+ [tool.hatch.build.targets.sdist]
26
+ exclude = [
27
+ "**/__pycache__",
28
+ "**/*.pyc",
29
+ "**/.venv",
30
+ "**/venv",
31
+ "**/.pytest_cache",
32
+ "**/.ruff_cache",
33
+ "**/*.egg-info",
34
+ "**/*.log",
35
+ "**/*.db",
36
+ "**/models/*.gguf",
37
+ "**/models/*.bin",
38
+ "**/.env_dev",
39
+ ]
10
40
 
11
41
  [project]
12
42
  name = "fastapi-gen"
13
43
  dynamic = ["version"]
14
44
  description = "Set up a modern REST API by running one command."
15
45
  readme = "README.md"
16
- requires-python = ">=3.12"
46
+ requires-python = ">=3.11"
17
47
  license = "MIT"
18
48
  keywords = [
19
49
  "fastapi",
@@ -59,10 +89,10 @@ classifiers = [
59
89
  "Topic :: Internet :: WWW/HTTP",
60
90
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
61
91
  ]
62
- dependencies = ["click==8.2.1", "colorama==0.4.6", "importlib_resources==6.5.2"]
92
+ dependencies = ["click==8.3.0", "colorama==0.4.6", "importlib_resources==6.5.2"]
63
93
 
64
94
  [project.optional-dependencies]
65
- dev = ["ruff==0.12.0"]
95
+ dev = ["ruff==0.14.1", "pytest==8.4.2", "coverage[toml]==7.11.0"]
66
96
 
67
97
  [project.urls]
68
98
  Documentation = "https://github.com/mirpo/fastapi-gen#readme"
@@ -73,14 +103,14 @@ Source = "https://github.com/mirpo/fastapi-gen"
73
103
  fastapi-gen = "cli.__main__:main"
74
104
 
75
105
  [tool.hatch.version]
76
- path = "src/cli/__about__.py"
77
-
78
- [tool.hatch.envs.default]
79
- dependencies = ["coverage[toml]==7.9.1", "pytest"]
106
+ source = "vcs"
80
107
 
81
108
  [[tool.hatch.envs.all.matrix]]
82
109
  python = ["3.12", "3.13"]
83
110
 
111
+ [tool.uv.workspace]
112
+ members = []
113
+
84
114
  [tool.black]
85
115
  target-version = ["py312"]
86
116
  line-length = 120
@@ -110,6 +140,7 @@ ignore = [
110
140
  "S607",
111
141
  "S101",
112
142
  "PLR2004",
143
+ "COM812", # Conflicts with ruff formatter
113
144
  ]
114
145
  unfixable = [
115
146
  # Don't touch unused imports