forgeapi 0.1.0__py3-none-any.whl

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 (57) hide show
  1. fastapi_forge/__init__.py +15 -0
  2. fastapi_forge/cli.py +125 -0
  3. fastapi_forge/commands/__init__.py +5 -0
  4. fastapi_forge/commands/create.py +107 -0
  5. fastapi_forge/generator.py +300 -0
  6. fastapi_forge/models.py +187 -0
  7. fastapi_forge/prompts.py +364 -0
  8. fastapi_forge/templates/base/.dockerignore.jinja +20 -0
  9. fastapi_forge/templates/base/.github/workflows/ci.yml.jinja +155 -0
  10. fastapi_forge/templates/base/.gitignore.jinja +68 -0
  11. fastapi_forge/templates/base/Dockerfile.jinja +69 -0
  12. fastapi_forge/templates/base/README.md.jinja +141 -0
  13. fastapi_forge/templates/base/alembic/README.md.jinja +43 -0
  14. fastapi_forge/templates/base/alembic/env.py.jinja +93 -0
  15. fastapi_forge/templates/base/alembic/script.py.mako.jinja +26 -0
  16. fastapi_forge/templates/base/alembic/versions/.gitkeep.jinja +1 -0
  17. fastapi_forge/templates/base/alembic.ini.jinja +70 -0
  18. fastapi_forge/templates/base/app/__init__.py.jinja +5 -0
  19. fastapi_forge/templates/base/app/api/__init__.py.jinja +3 -0
  20. fastapi_forge/templates/base/app/api/auth_api.py.jinja +72 -0
  21. fastapi_forge/templates/base/app/api/health_api.py.jinja +41 -0
  22. fastapi_forge/templates/base/app/config/__init__.py.jinja +31 -0
  23. fastapi_forge/templates/base/app/config/base.py.jinja +52 -0
  24. fastapi_forge/templates/base/app/config/env.py.jinja +75 -0
  25. fastapi_forge/templates/base/app/core/__init__.py.jinja +3 -0
  26. fastapi_forge/templates/base/app/core/auth.py.jinja +96 -0
  27. fastapi_forge/templates/base/app/core/config.py.jinja +56 -0
  28. fastapi_forge/templates/base/app/core/database.py.jinja +68 -0
  29. fastapi_forge/templates/base/app/core/deps.py.jinja +55 -0
  30. fastapi_forge/templates/base/app/core/redis.py.jinja +41 -0
  31. fastapi_forge/templates/base/app/daos/__init__.py.jinja +3 -0
  32. fastapi_forge/templates/base/app/exceptions/__init__.py.jinja +7 -0
  33. fastapi_forge/templates/base/app/exceptions/exception.py.jinja +34 -0
  34. fastapi_forge/templates/base/app/exceptions/handler.py.jinja +56 -0
  35. fastapi_forge/templates/base/app/main.py.jinja +24 -0
  36. fastapi_forge/templates/base/app/models/__init__.py.jinja +7 -0
  37. fastapi_forge/templates/base/app/models/base.py.jinja +13 -0
  38. fastapi_forge/templates/base/app/schemas/__init__.py.jinja +3 -0
  39. fastapi_forge/templates/base/app/schemas/api_schema.py.jinja +20 -0
  40. fastapi_forge/templates/base/app/schemas/auth_schema.py.jinja +21 -0
  41. fastapi_forge/templates/base/app/server.py.jinja +99 -0
  42. fastapi_forge/templates/base/app/services/__init__.py.jinja +3 -0
  43. fastapi_forge/templates/base/app/utils/__init__.py.jinja +3 -0
  44. fastapi_forge/templates/base/app/utils/log.py.jinja +21 -0
  45. fastapi_forge/templates/base/config.yaml.jinja +71 -0
  46. fastapi_forge/templates/base/docker-compose.yml.jinja +117 -0
  47. fastapi_forge/templates/base/pyproject.toml.jinja +86 -0
  48. fastapi_forge/templates/base/pytest.ini.jinja +10 -0
  49. fastapi_forge/templates/base/ruff.toml.jinja +33 -0
  50. fastapi_forge/templates/base/tests/__init__.py.jinja +3 -0
  51. fastapi_forge/templates/base/tests/conftest.py.jinja +31 -0
  52. fastapi_forge/templates/base/tests/test_health.py.jinja +24 -0
  53. forgeapi-0.1.0.dist-info/METADATA +182 -0
  54. forgeapi-0.1.0.dist-info/RECORD +57 -0
  55. forgeapi-0.1.0.dist-info/WHEEL +4 -0
  56. forgeapi-0.1.0.dist-info/entry_points.txt +2 -0
  57. forgeapi-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: forgeapi
3
+ Version: 0.1.0
4
+ Summary: A highly modular FastAPI project scaffolding CLI tool for the AI application era
5
+ Project-URL: Homepage, https://github.com/zachary/fastapi-forge
6
+ Project-URL: Documentation, https://github.com/zachary/fastapi-forge#readme
7
+ Project-URL: Repository, https://github.com/zachary/fastapi-forge
8
+ Project-URL: Issues, https://github.com/zachary/fastapi-forge/issues
9
+ Author-email: Zachary <zachary@example.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: boilerplate,cli,fastapi,generator,project-generator,scaffold,template
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Framework :: FastAPI
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Code Generators
24
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: jinja2>=3.1.0
28
+ Requires-Dist: pydantic>=2.0.0
29
+ Requires-Dist: pyyaml>=6.0.0
30
+ Requires-Dist: questionary>=2.1.0
31
+ Requires-Dist: rich>=13.9.0
32
+ Requires-Dist: typer>=0.15.0
33
+ Provides-Extra: ai
34
+ Requires-Dist: httpx>=0.28.0; extra == 'ai'
35
+ Requires-Dist: openai>=1.60.0; extra == 'ai'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # ForgeAPI 🚀
39
+
40
+ [![PyPI version](https://badge.fury.io/py/forgeapi.svg)](https://badge.fury.io/py/forgeapi)
41
+ [![Python](https://img.shields.io/pypi/pyversions/forgeapi.svg)](https://pypi.org/project/forgeapi/)
42
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
+
44
+ > A highly modular FastAPI project scaffolding CLI tool for the AI application era.
45
+
46
+ ## ✨ Features
47
+
48
+ - 🏗️ **Clean Architecture** - Auto-generate API/Service/DAO layered structure
49
+ - 📦 **Package Manager Choice** - Support uv (default), Poetry, or pip
50
+ - 🗄️ **Database Integration** - SQLAlchemy (Async) + Alembic migrations
51
+ - 🐳 **Docker Ready** - Optimized Dockerfile and docker-compose.yml
52
+ - 🔐 **JWT Authentication** - Out-of-the-box auth module
53
+ - ⚙️ **Multi-Environment Config** - dev/staging/prod configurations
54
+ - 🧪 **Testing Setup** - Pytest + pytest-asyncio pre-configured
55
+ - 🤖 **AI-Powered** (Coming Soon) - Generate models from natural language
56
+
57
+ ## 📦 Installation
58
+
59
+ ```bash
60
+ # Using pipx (recommended)
61
+ pipx install forgeapi
62
+
63
+ # Using uv
64
+ uv tool install forgeapi
65
+
66
+ # Using pip
67
+ pip install forgeapi
68
+ ```
69
+
70
+ ## 🚀 Quick Start
71
+
72
+ ### Interactive Mode
73
+
74
+ ```bash
75
+ forge create my-awesome-api
76
+ ```
77
+
78
+ Follow the interactive prompts to configure your project:
79
+
80
+ ```
81
+ 🚀 ForgeAPI - Create New Project
82
+
83
+ ? Project name: my-awesome-api
84
+ ? Description: A awesome FastAPI project
85
+ ? Author name: Your Name
86
+ ? Author email: your@email.com
87
+ ? Python version: 3.11
88
+
89
+ 📦 Package Manager
90
+ ? Select package manager: uv (recommended)
91
+
92
+ 🗄️ Database
93
+ ? Select database: PostgreSQL
94
+ ? Enable Alembic migrations? Yes
95
+
96
+ 🔐 Authentication
97
+ ? Include JWT auth module? Yes
98
+
99
+ 🐳 Docker
100
+ ? Generate Docker configuration? Yes
101
+ ? Generate docker-compose.yml? Yes
102
+
103
+ ✅ Project my-awesome-api created successfully!
104
+ ```
105
+
106
+ ### Non-Interactive Mode
107
+
108
+ ```bash
109
+ forge create my-api \
110
+ --package-manager uv \
111
+ --database postgres \
112
+ --auth jwt \
113
+ --docker \
114
+ --no-interactive
115
+ ```
116
+
117
+ ## 📁 Generated Project Structure
118
+
119
+ ```
120
+ my-awesome-api/
121
+ ├── app/
122
+ │ ├── api/ # API routes
123
+ │ ├── config/ # Configuration
124
+ │ ├── core/ # Core utilities
125
+ │ ├── daos/ # Data Access Objects
126
+ │ ├── exceptions/ # Exception handlers
127
+ │ ├── models/ # SQLAlchemy models
128
+ │ ├── schemas/ # Pydantic schemas
129
+ │ ├── services/ # Business logic
130
+ │ └── utils/ # Utilities
131
+ ├── alembic/ # Database migrations
132
+ ├── tests/ # Test suite
133
+ ├── Dockerfile
134
+ ├── docker-compose.yml
135
+ ├── pyproject.toml
136
+ └── README.md
137
+ ```
138
+
139
+ ## 🛠️ Commands
140
+
141
+ | Command | Description |
142
+ | --------------------- | ---------------------------- |
143
+ | `forge create <name>` | Create a new FastAPI project |
144
+ | `forge version` | Show version information |
145
+ | `forge --help` | Show help message |
146
+
147
+ ## 🤖 AI Features (Coming Soon)
148
+
149
+ ```bash
150
+ # Generate SQLAlchemy model from description
151
+ forge add model "User with name, email, and subscription relationship"
152
+
153
+ # Generate CRUD API for a model
154
+ forge add api User --crud
155
+ ```
156
+
157
+ ## 📚 Documentation
158
+
159
+ - [Design Document](DESIGN.md)
160
+ - [Development Tasks](TODO.md)
161
+ - [Changelog](CHANGELOG.md)
162
+
163
+ ## 🤝 Contributing
164
+
165
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
166
+
167
+ 1. Fork the repository
168
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
169
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
170
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
171
+ 5. Open a Pull Request
172
+
173
+ ## 📄 License
174
+
175
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
176
+
177
+ ## 🙏 Acknowledgments
178
+
179
+ - [FastAPI](https://fastapi.tiangolo.com/) - The awesome web framework
180
+ - [Typer](https://typer.tiangolo.com/) - CLI framework
181
+ - [SQLAlchemy](https://www.sqlalchemy.org/) - Database toolkit
182
+ - [customer_trial_website](../customer_trial_website/backend) - Architecture reference
@@ -0,0 +1,57 @@
1
+ fastapi_forge/__init__.py,sha256=WMbvDeWcIDFjO2dZQdcrrH--ARF82a9iaXAd7RkkpiA,401
2
+ fastapi_forge/cli.py,sha256=rguRV0ypTFArS6Ca1Cr3jm38FFLRIQQ5KEn0fCWQsF8,3071
3
+ fastapi_forge/generator.py,sha256=qrRmslklldAa4TKWVGhj9c9uR5b2vCAvyFDswSCIUXc,10140
4
+ fastapi_forge/models.py,sha256=lM-zTk_EcglYV0mvK7-X7hunWSvfEfpzNb5pBhOG_RM,5360
5
+ fastapi_forge/prompts.py,sha256=mqjRoUnAYhzaWnlGmy2_zsh-ZLJI6K-zntP6Dx3JDgQ,10401
6
+ fastapi_forge/commands/__init__.py,sha256=nkmi9Bq-s4pRwhHv51a9aFZeZXou_49Xz4alB84boXM,95
7
+ fastapi_forge/commands/create.py,sha256=4ZEyBH0MA39ZIgvHWjS7fFOMgmJ4DgFOjOXld4qn984,3935
8
+ fastapi_forge/templates/base/.dockerignore.jinja,sha256=bu3mXABYYbJaU5EG1wHBoftZLABtkvOPo_1DBxnzdlw,162
9
+ fastapi_forge/templates/base/.gitignore.jinja,sha256=SA8tshTt0N7b7v0V8smheaNUZHIfDq0uvJmZ-pg9Qag,603
10
+ fastapi_forge/templates/base/Dockerfile.jinja,sha256=hoQwnqbzNUUt1F63BDgXKZLSoXNv6uIK5V0eZF548yw,1300
11
+ fastapi_forge/templates/base/README.md.jinja,sha256=UN3TMnRDOtDzWoeSXcm2Wc29l9WSSHp6bovTssfLFeM,2603
12
+ fastapi_forge/templates/base/alembic.ini.jinja,sha256=1TptA6_F-fs5o-apQ-jyNdpGURxtnO2wX435G1q0wE4,1480
13
+ fastapi_forge/templates/base/config.yaml.jinja,sha256=gs4hJyv0VtxCeFAqxkghxKqy0WHPWoSsijuwQLLQkyo,1258
14
+ fastapi_forge/templates/base/docker-compose.yml.jinja,sha256=r9ZD9ZboNRodSmtY8s6WsH6_8IT0BALHcEkmiP-wzt8,2337
15
+ fastapi_forge/templates/base/pyproject.toml.jinja,sha256=dPIE32ZSjZL-CkqYI-gUrPZNtB2U94Jxc1Orah4FzVQ,1739
16
+ fastapi_forge/templates/base/pytest.ini.jinja,sha256=9w81uK4M3QofDyAB0w8ItxPhWSbgdC7jL010HOhv8e4,231
17
+ fastapi_forge/templates/base/ruff.toml.jinja,sha256=hfBsT8pk9R49On8pRCgCmymkpLKu2MwE4Nk_DP-QoSU,799
18
+ fastapi_forge/templates/base/.github/workflows/ci.yml.jinja,sha256=jGmbBp-hTZosB0MM81y4H9GlCsivvTSMFn8ZTsot84A,4359
19
+ fastapi_forge/templates/base/alembic/README.md.jinja,sha256=Nh70M7cdRqWAcps1Ie5o9qstNOmeEIlSJmFrnN5sqAM,843
20
+ fastapi_forge/templates/base/alembic/env.py.jinja,sha256=GCFwxpQBZmQiTL-RaKIoqVH5tpAczHTcuraJP8OK4ZM,2389
21
+ fastapi_forge/templates/base/alembic/script.py.mako.jinja,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
22
+ fastapi_forge/templates/base/alembic/versions/.gitkeep.jinja,sha256=lruTndj0whSP0UmybIkjrPLNz_W-a4QdL6W61GGkkmw,31
23
+ fastapi_forge/templates/base/app/__init__.py.jinja,sha256=Qf4GAeQeqs2vs8l0Y23yBujV80857k-nJBpBRiPbtRk,78
24
+ fastapi_forge/templates/base/app/main.py.jinja,sha256=6SALYAemS6tG1lLaTrnoXa4ndy_c1zwUqiemI4v4c4c,429
25
+ fastapi_forge/templates/base/app/server.py.jinja,sha256=RSM3Sh0K3NV-jmfOjEwcQGKIcZu6QR61tVn-XAwo8-0,2146
26
+ fastapi_forge/templates/base/app/api/__init__.py.jinja,sha256=z7yNH0lbGVu1Ik-oVJIEQq24ZuCU3focPqQF_r6tp_4,26
27
+ fastapi_forge/templates/base/app/api/auth_api.py.jinja,sha256=S4uRC9ur_c5LBIiyyyFP3UvV1KCI52_qI4qngWigcq0,1862
28
+ fastapi_forge/templates/base/app/api/health_api.py.jinja,sha256=svxojwV7Yjja-miIzXGAlbwdLkT_yhSPPg88gl_8oeY,822
29
+ fastapi_forge/templates/base/app/config/__init__.py.jinja,sha256=7z0CSBivE9lWJp90SecoU2uVp8TJnEBMdATqjhdr6Pc,580
30
+ fastapi_forge/templates/base/app/config/base.py.jinja,sha256=rU15VOWj3bR9O_6FjhP36kZVrHL7i3c1I8h2oqE4Pi4,958
31
+ fastapi_forge/templates/base/app/config/env.py.jinja,sha256=bcsgGRYokII0iPqou1gTk2GoB9WJLDlUP9BEOq8i9J0,1696
32
+ fastapi_forge/templates/base/app/core/__init__.py.jinja,sha256=9I_nAvnArfLSI0NzwmARJuTDYsJnp4U0UT2_Z2L5sR0,20
33
+ fastapi_forge/templates/base/app/core/auth.py.jinja,sha256=RFIc1XTN-YOjL2JlxucQtaQYem0_bh-Xv4bwRP_i2UU,2396
34
+ fastapi_forge/templates/base/app/core/config.py.jinja,sha256=IUSn8IkJjCElMgqPIqf8ZVXczUUrslk_oWEd9X9_DB0,1416
35
+ fastapi_forge/templates/base/app/core/database.py.jinja,sha256=qHVEHBrgU_d3ht4oPVXo_o2dGmq_7G0kWNZy1hCClyA,1580
36
+ fastapi_forge/templates/base/app/core/deps.py.jinja,sha256=-ats4omSmPGv_lJm-xYf0wQ8y_NTCRUMBzVXXsXA8l8,1102
37
+ fastapi_forge/templates/base/app/core/redis.py.jinja,sha256=kJtlrBHAMzD33vezyLbrM3772iky7r7GElBVQvi5ZGg,831
38
+ fastapi_forge/templates/base/app/daos/__init__.py.jinja,sha256=xV9vy4GJB-1F1wzXoSIv1WrB3W073Dl4Za_AwApWLPI,35
39
+ fastapi_forge/templates/base/app/exceptions/__init__.py.jinja,sha256=VvNY_dwDxiZXnemgw5FTA1a6WXo03hEGCW5vPBMTT4o,137
40
+ fastapi_forge/templates/base/app/exceptions/exception.py.jinja,sha256=3gwIPqRJB7XxNXks2iKUMXUOOvtHBMwx0hGK-9Pd1Nc,813
41
+ fastapi_forge/templates/base/app/exceptions/handler.py.jinja,sha256=3Tg2fzXO658qwC-t-EImtS55uEbzyiLtneSv9oA_hv0,1855
42
+ fastapi_forge/templates/base/app/models/__init__.py.jinja,sha256=uREOdg1ybf9dhnZeZXFXPwwjDUy7yUn6ikjdqWxwtts,87
43
+ fastapi_forge/templates/base/app/models/base.py.jinja,sha256=gs5bM6z7cPkJ5YB-M0M1-Juv5x5wuGIaPKuTI8o8hsM,218
44
+ fastapi_forge/templates/base/app/schemas/__init__.py.jinja,sha256=po2cQZhQzNQOO5LaDX4bZTnwSANTLXQUatRehYnj3-A,32
45
+ fastapi_forge/templates/base/app/schemas/api_schema.py.jinja,sha256=whiTgrkcHcgnZzm33nfknerd0ZuGLvY8jsKmRk_5RSM,450
46
+ fastapi_forge/templates/base/app/schemas/auth_schema.py.jinja,sha256=rU4S4JvFskPKFykVS-O2thT91AyOaN_SVkUArlWGsRc,519
47
+ fastapi_forge/templates/base/app/services/__init__.py.jinja,sha256=d_SsEPaHwuOY_Ia6JMCP4fzcwMiapbeqHCOlr1vL1XA,24
48
+ fastapi_forge/templates/base/app/utils/__init__.py.jinja,sha256=xapIpxdEFapo51eG3-HZrMW--EqWxjVWC27VGNa9ZK8,25
49
+ fastapi_forge/templates/base/app/utils/log.py.jinja,sha256=ZM1B-02rg-XptEKrRYsQElA6vX_nLb5oYG5jAX1GSXg,406
50
+ fastapi_forge/templates/base/tests/__init__.py.jinja,sha256=tHVBdTfoZmsFCAZk7NlTxGQ4yxO0kz30TBEkaAn9fKM,19
51
+ fastapi_forge/templates/base/tests/conftest.py.jinja,sha256=jL35xyIYio8geInyu_L_5_6oVev23ANzydGgnucJ4eg,686
52
+ fastapi_forge/templates/base/tests/test_health.py.jinja,sha256=0tPur37M3lJtcMydcbxhnnhFw8H6mcefWccNFc6JimU,612
53
+ forgeapi-0.1.0.dist-info/METADATA,sha256=cnREYlmcsjUtrtae4jY9kuechUtXuQO_4tFtq8iCb6s,5661
54
+ forgeapi-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
55
+ forgeapi-0.1.0.dist-info/entry_points.txt,sha256=ElkRooX32X4EwIQi5oMGQvRw5VIAlVnlE_uc7Ga5xZA,48
56
+ forgeapi-0.1.0.dist-info/licenses/LICENSE,sha256=qPCmddeYDPqK4_bx1-P5PiSYF-p9gFOc01bEjLfH2No,1069
57
+ forgeapi-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ forge = fastapi_forge.cli:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BlockZachary
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.