vega-framework 0.1.35__py3-none-any.whl → 0.2.1__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.
- vega/cli/commands/add.py +9 -10
- vega/cli/commands/generate.py +15 -15
- vega/cli/commands/init.py +9 -8
- vega/cli/commands/web.py +8 -7
- vega/cli/main.py +4 -4
- vega/cli/scaffolds/__init__.py +6 -2
- vega/cli/scaffolds/vega_web.py +109 -0
- vega/cli/templates/__init__.py +34 -8
- vega/cli/templates/components.py +29 -13
- vega/cli/templates/project/ARCHITECTURE.md.j2 +13 -13
- vega/cli/templates/project/README.md.j2 +5 -5
- vega/cli/templates/web/app.py.j2 +5 -5
- vega/cli/templates/web/health_route.py.j2 +2 -2
- vega/cli/templates/web/main.py.j2 +2 -3
- vega/cli/templates/web/middleware.py.j2 +3 -3
- vega/cli/templates/web/router.py.j2 +2 -2
- vega/cli/templates/web/routes_init.py.j2 +3 -3
- vega/cli/templates/web/routes_init_autodiscovery.py.j2 +2 -2
- vega/cli/templates/web/users_route.py.j2 +2 -2
- vega/discovery/routes.py +13 -13
- vega/web/__init__.py +100 -0
- vega/web/application.py +234 -0
- vega/web/builtin_middlewares.py +288 -0
- vega/web/exceptions.py +151 -0
- vega/web/middleware.py +185 -0
- vega/web/request.py +120 -0
- vega/web/response.py +220 -0
- vega/web/route_middleware.py +266 -0
- vega/web/router.py +350 -0
- vega/web/routing.py +347 -0
- {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/METADATA +10 -9
- {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/RECORD +35 -24
- {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/WHEEL +0 -0
- {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/entry_points.txt +0 -0
- {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: vega-framework
|
3
|
-
Version: 0.1
|
3
|
+
Version: 0.2.1
|
4
4
|
Summary: Enterprise-ready Python framework that enforces Clean Architecture for building maintainable and scalable applications.
|
5
5
|
License: MIT
|
6
6
|
License-File: LICENSE
|
@@ -19,10 +19,10 @@ Classifier: Programming Language :: Python :: 3.14
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
20
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
21
21
|
Requires-Dist: click (>=8.0,<9.0)
|
22
|
-
Requires-Dist: fastapi (>=0.109,<0.110)
|
23
22
|
Requires-Dist: jinja2 (>=3.1,<4.0)
|
24
23
|
Requires-Dist: pydantic (>=2.0,<3.0)
|
25
24
|
Requires-Dist: pydantic-settings (>=2.0,<3.0)
|
25
|
+
Requires-Dist: starlette (>=0.37,<0.38)
|
26
26
|
Requires-Dist: toml (>=0.10,<0.11)
|
27
27
|
Requires-Dist: uvicorn (>=0.27,<0.28)
|
28
28
|
Project-URL: Documentation, https://vega-framework.readthedocs.io
|
@@ -43,7 +43,7 @@ Traditional Python frameworks show you **how to build** but don't enforce **how
|
|
43
43
|
- ✅ **Business Logic First** - Pure, testable, framework-independent
|
44
44
|
- ✅ **CLI Scaffolding** - Generate entire projects and components
|
45
45
|
- ✅ **Async Support** - Full async/await for CLI and web
|
46
|
-
- ✅ **
|
46
|
+
- ✅ **Vega Web (Starlette) & SQLAlchemy** - Built-in integrations when needed
|
47
47
|
|
48
48
|
**[Read the Philosophy →](docs/explanation/philosophy.md)** to understand why architecture matters.
|
49
49
|
|
@@ -152,7 +152,7 @@ container = Container({
|
|
152
152
|
|
153
153
|
```bash
|
154
154
|
vega init my-app # Create new project
|
155
|
-
vega init my-api --template
|
155
|
+
vega init my-api --template web # Create with Vega Web
|
156
156
|
vega doctor # Validate architecture
|
157
157
|
vega update # Update framework
|
158
158
|
```
|
@@ -169,7 +169,7 @@ vega generate interactor CreateProduct
|
|
169
169
|
vega generate mediator CheckoutWorkflow
|
170
170
|
|
171
171
|
# Presentation layer
|
172
|
-
vega generate router Product #
|
172
|
+
vega generate router Product # Vega Web (requires: vega add web)
|
173
173
|
vega generate command create-product # CLI
|
174
174
|
|
175
175
|
# Infrastructure
|
@@ -179,7 +179,7 @@ vega generate model Product # SQLAlchemy (requires: vega add db)
|
|
179
179
|
### Add Features
|
180
180
|
|
181
181
|
```bash
|
182
|
-
vega add web # Add
|
182
|
+
vega add web # Add Vega Web support
|
183
183
|
vega add sqlalchemy # Add database support
|
184
184
|
```
|
185
185
|
|
@@ -232,6 +232,7 @@ await UserCreated(user_id="123", email="test@test.com").publish()
|
|
232
232
|
- [Patterns](docs/explanation/patterns/interactor.md) - Interactor, Mediator, Repository, Service
|
233
233
|
|
234
234
|
### Guides
|
235
|
+
- [Use Vega Web](docs/how-to/use-vega-web.md) - Build HTTP APIs with Vega's router and middleware
|
235
236
|
- [Building Domain Layer](docs/how-to/build-domain-layer.md) - Business logic first
|
236
237
|
- [CLI Reference](docs/reference/cli/overview.md) - All CLI commands
|
237
238
|
- [Events System](docs/explanation/events/overview.md) - Event-driven architecture
|
@@ -268,7 +269,7 @@ my-app/
|
|
268
269
|
│ └── services/ # API integrations
|
269
270
|
├── presentation/ # User interfaces
|
270
271
|
│ ├── cli/ # CLI commands
|
271
|
-
│ └── web/ #
|
272
|
+
│ └── web/ # Vega Web routes
|
272
273
|
├── config.py # Dependency injection
|
273
274
|
├── settings.py # Configuration
|
274
275
|
└── main.py # Entry point
|
@@ -289,7 +290,7 @@ async def create_order(request: Request):
|
|
289
290
|
```
|
290
291
|
|
291
292
|
**Problems:**
|
292
|
-
- Can't test without
|
293
|
+
- Can't test without the web framework, database, and Stripe
|
293
294
|
- Can't reuse for CLI or other interfaces
|
294
295
|
- Business rules are unclear
|
295
296
|
- Tightly coupled to specific technologies
|
@@ -309,7 +310,7 @@ class PlaceOrder(Interactor[Order]):
|
|
309
310
|
await payment_service.charge(...)
|
310
311
|
return await order_repo.save(order)
|
311
312
|
|
312
|
-
# ✅
|
313
|
+
# ✅ Vega Web route (Presentation) - just wiring
|
313
314
|
@router.post("/orders")
|
314
315
|
async def create_order_api(request: CreateOrderRequest):
|
315
316
|
return await PlaceOrder(...)
|
@@ -1,21 +1,22 @@
|
|
1
1
|
vega/__init__.py,sha256=A05RwOYXooAZUz3GnbJ--ofLXgtRZK9gaSmsLVRdGPY,1811
|
2
2
|
vega/cli/__init__.py,sha256=NCzOOyhKHqLeN1r80ekhMfkQwBdAQXKcKiKoNwYPNiY,304
|
3
3
|
vega/cli/commands/__init__.py,sha256=UH7MdYduBG_YoulgdiWkUCtcgGLzuYRGFzxaqoa0pyg,19
|
4
|
-
vega/cli/commands/add.py,sha256=
|
5
|
-
vega/cli/commands/generate.py,sha256=
|
6
|
-
vega/cli/commands/init.py,sha256=
|
4
|
+
vega/cli/commands/add.py,sha256=Q9T6MHJcWCnRY68OrS3y4sO0kI6ElGlUHNHB2_jNJOU,6418
|
5
|
+
vega/cli/commands/generate.py,sha256=KQdnAtk_R9LlLBOTmfHfd2BEEXBVk5GUU5DEcJrfhYY,38168
|
6
|
+
vega/cli/commands/init.py,sha256=oOlc_CjZDLOswLJd8POUfPA6yFep3Th-f2sr4fqHI7M,5936
|
7
7
|
vega/cli/commands/migrate.py,sha256=00swKeVhmKr1_1VJhg3GpIMcJ6Jfgz5FUpmJoLf5qSQ,3805
|
8
8
|
vega/cli/commands/update.py,sha256=0zRWkHvQwKGlJL9XF3bi--dThkFapyNOugL6AgGr6Ic,5897
|
9
|
-
vega/cli/commands/web.py,sha256=
|
10
|
-
vega/cli/main.py,sha256=
|
11
|
-
vega/cli/scaffolds/__init__.py,sha256=
|
9
|
+
vega/cli/commands/web.py,sha256=eNWxh3pHtymYYgInlFy4xzGQMz01PwrQGu1HGvlTHw8,3539
|
10
|
+
vega/cli/main.py,sha256=MlRUaJriz68rFW7fwG1Ug3k9fI8PF4NbENcTWTZcdh8,5470
|
11
|
+
vega/cli/scaffolds/__init__.py,sha256=wqddIhjBNDI-ztYj_E6B3tTrKfIoF4iPeynt454eHH0,378
|
12
12
|
vega/cli/scaffolds/fastapi.py,sha256=9VqZD5TIT7iX6za_5h0L1aWqJ0V58pV8CyEiIxw7_w0,3013
|
13
13
|
vega/cli/scaffolds/sqlalchemy.py,sha256=il5JqiA8LSQKnNoOYfAFD82rdYx5l_ZsqsjHnplYohw,6164
|
14
|
-
vega/cli/
|
14
|
+
vega/cli/scaffolds/vega_web.py,sha256=mVYi2TsokbJxYbInIOQHMyiDi3fH0nPBalDJIxC0mz4,3489
|
15
|
+
vega/cli/templates/__init__.py,sha256=f166zCou83Bf1j4ZHRZPIfjzN2L2qGo1QsMouFOcKUs,2755
|
15
16
|
vega/cli/templates/cli/command.py.j2,sha256=Z8K9DRfppsco9uID_uG8EKVyWYD_1x-KYqLZY4BJKzM,1097
|
16
17
|
vega/cli/templates/cli/command_simple.py.j2,sha256=PshUZyKtkazSEtaf6E1__hQbX07pz6ojxTXK4TgtUEw,531
|
17
18
|
vega/cli/templates/cli/commands_init.py.j2,sha256=iZGnWmJoFUGM1pUMQGYLNplgwgwo8D48vT1hzBcHUEQ,300
|
18
|
-
vega/cli/templates/components.py,sha256=
|
19
|
+
vega/cli/templates/components.py,sha256=5m3lkk8jCYeIiSgvScGAwoKzYSH-Jobb5Mip2HJ_LCM,9115
|
19
20
|
vega/cli/templates/domain/entity.py.j2,sha256=dl5rzuJMnTRqOdU5SYV2o_OPGy9l6DNf_symCcjdjK0,344
|
20
21
|
vega/cli/templates/domain/event.py.j2,sha256=hfNTrlhtwgyiid5oCIBOeVkb6t4K5IOCx7cd0cQi7mQ,667
|
21
22
|
vega/cli/templates/domain/event_handler.py.j2,sha256=F8uYJp4WbbAjUk74raD01WcgjU0NVPqtD_9wx2aC4lM,664
|
@@ -29,8 +30,8 @@ vega/cli/templates/infrastructure/service_impl.py.j2,sha256=JYCfPDOcdVd-x1Y0nSh7
|
|
29
30
|
vega/cli/templates/loader.py,sha256=cyt9ZOVLwBgv4ijPxoqR4JgFSbdkXCMzviHcq3fdv8Q,2712
|
30
31
|
vega/cli/templates/project/.env.example,sha256=BqfRxYeOasgZMz4_B2kybu6areIy9dHCt5BJ6fa56ik,221
|
31
32
|
vega/cli/templates/project/.gitignore,sha256=7JSDihCtBznd-QxQ4wUtHM9fnbYnbw6PK4Auh56ofAY,229
|
32
|
-
vega/cli/templates/project/ARCHITECTURE.md.j2,sha256=
|
33
|
-
vega/cli/templates/project/README.md.j2,sha256=
|
33
|
+
vega/cli/templates/project/ARCHITECTURE.md.j2,sha256=tw1grFM9hWnPcmTJ174NW-lzGSLnkETYJK7IkGqtK_c,25866
|
34
|
+
vega/cli/templates/project/README.md.j2,sha256=kXuPhWbB7LhYhk68Ib0AmVf3AQcA7iYPlXk8FzEd_1g,4577
|
34
35
|
vega/cli/templates/project/config.py.j2,sha256=1Iva9JEz5ej_WmTbRVBvOfSBhYUKIzN88p6GYKR0m4s,866
|
35
36
|
vega/cli/templates/project/events_init.py.j2,sha256=dp9yc8_Du6lv62vum_Br0p030I4TKZAkZG29mj4AZaM,1057
|
36
37
|
vega/cli/templates/project/main.py.j2,sha256=33mohAsEP4f-aGPyWcGdKTP8OxDZDI3JVQKhWCeGe_U,753
|
@@ -43,18 +44,18 @@ vega/cli/templates/sqlalchemy/database_manager.py.j2,sha256=6h3a5RbGNnVLLt5cozTt
|
|
43
44
|
vega/cli/templates/sqlalchemy/env.py.j2,sha256=IHZTD4OgX_hk7E-mu1wbPS4d_7UoM2VCJxvo8JHK3rY,2431
|
44
45
|
vega/cli/templates/sqlalchemy/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
45
46
|
vega/cli/templates/web/__init__.py.j2,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
vega/cli/templates/web/app.py.j2,sha256=
|
47
|
-
vega/cli/templates/web/health_route.py.j2,sha256=
|
48
|
-
vega/cli/templates/web/main.py.j2,sha256=
|
49
|
-
vega/cli/templates/web/middleware.py.j2,sha256=
|
47
|
+
vega/cli/templates/web/app.py.j2,sha256=hIUiH1vtqAtX8u8aiSOaYz9xh9jX1Y9Isl8WeBf-21k,419
|
48
|
+
vega/cli/templates/web/health_route.py.j2,sha256=ZsPhr3mUmFlatoqVPS91YC1kLDOUWQViot28ijQ88FU,248
|
49
|
+
vega/cli/templates/web/main.py.j2,sha256=JXC-QNdeVY3xj0de8aXlDmcs5PpEojULUAOOby3pBR8,521
|
50
|
+
vega/cli/templates/web/middleware.py.j2,sha256=v5-foaT0R3NZV4919Ff8E7kXB9CiOkimfC-awPvPidc,2168
|
50
51
|
vega/cli/templates/web/models_init.py.j2,sha256=QdNOaZ6iMh3Tz7uut1VA3XUIivYD1SkHFmDHCfstqho,159
|
51
52
|
vega/cli/templates/web/request_model.py.j2,sha256=PPoLGMd7VZ6QXj75UxCcryZZ9SNPhaDfMH2ykVtjIXQ,534
|
52
53
|
vega/cli/templates/web/response_model.py.j2,sha256=wCSOhEUaDD1CYcim8qf6PEkhECTR7P0NsTtAme71qic,505
|
53
|
-
vega/cli/templates/web/router.py.j2,sha256=
|
54
|
-
vega/cli/templates/web/routes_init.py.j2,sha256=
|
55
|
-
vega/cli/templates/web/routes_init_autodiscovery.py.j2,sha256=
|
54
|
+
vega/cli/templates/web/router.py.j2,sha256=4L71VCJ_On7uS76aoTqPsD0249WQJBQMAg6KCL7n6bE,4290
|
55
|
+
vega/cli/templates/web/routes_init.py.j2,sha256=PakFhAJLe4yogrTBi_Z8HFiwuucXzeK4Litn5R4xNLw,389
|
56
|
+
vega/cli/templates/web/routes_init_autodiscovery.py.j2,sha256=XXCDNw_yBBgMLM0K8lTUEx7-_lxBhSM6dI7K-9Qpylg,308
|
56
57
|
vega/cli/templates/web/user_models.py.j2,sha256=_lbG-oL8-C7Lk3-48YuKR65USD5TV4D9JNoFT9kktIM,1250
|
57
|
-
vega/cli/templates/web/users_route.py.j2,sha256=
|
58
|
+
vega/cli/templates/web/users_route.py.j2,sha256=pSpnTZLE1kNtigkDqa-tx7-lsHgKdkDipgO7iNvz1IQ,1922
|
58
59
|
vega/cli/utils/__init__.py,sha256=18sBatA5Y9TaJCCJqSCYRyF0XJrSty_UlPeZrJPlTlI,513
|
59
60
|
vega/cli/utils/async_support.py,sha256=eU4HVZUCeJclZzpQQoDysiJ_qewwyCtu3C0TcSsuKl4,1511
|
60
61
|
vega/cli/utils/messages.py,sha256=EtRWqMD6BUGaIuEWiH0cigpQPEaLOhnURSACSzdxBdA,2399
|
@@ -68,7 +69,7 @@ vega/di/scope.py,sha256=1yorvknVwmYGcDpNGsQDgob1jZQ5QoHdibbBH1SLcwQ,4652
|
|
68
69
|
vega/discovery/__init__.py,sha256=nTq5wapJxg2ZZ2rylp1xY3Phq7OQYjXskIy2Ld8wQSw,251
|
69
70
|
vega/discovery/commands.py,sha256=U1adQJXqBi88c2lkx8gMWzNE1hj8od72QLEKxjNq7gM,3375
|
70
71
|
vega/discovery/events.py,sha256=TF8pjYE6gyJJRpOW8Pqvc0Gpu1n1iIHh3UBqzD8kGRI,3051
|
71
|
-
vega/discovery/routes.py,sha256=
|
72
|
+
vega/discovery/routes.py,sha256=gp8DQcp8Rdfj9nGkxyzD8p6Rn7y8F_szVX5nIT13hGY,4338
|
72
73
|
vega/events/README.md,sha256=3dp-ZwVxKURIl3FfokzMzVj12wlMImvWaWKx9Y46U7w,13934
|
73
74
|
vega/events/SYNTAX_GUIDE.md,sha256=LFnxGOi-IzpOkpW5RERxL-jjMlVmJEIfdXN7_w0DJKY,8577
|
74
75
|
vega/events/__init__.py,sha256=yt-0idaDMDfAFiQcRjI-VrDTunKGkYrMV9QFJ244p0Y,800
|
@@ -83,8 +84,18 @@ vega/patterns/repository.py,sha256=uYUyLs-O8OqW1Wb9ZqIo8UUcCjZ5UFuHors_F2iDg9A,1
|
|
83
84
|
vega/patterns/service.py,sha256=buFRgJoeQtZQK22Upb4vh84c1elWKFXWBaB0X4RaruE,1374
|
84
85
|
vega/settings/__init__.py,sha256=Eb8PMUyXAlCAQIcL2W8QhTTUHUbVlkAfXdpTUlADo1I,786
|
85
86
|
vega/settings/base.py,sha256=bL45hyoa3t-hQOvur860eSo7O833sQMsXJJPwbTVbwE,1321
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
vega/web/__init__.py,sha256=grAuMNHY1Z0uPXJVDdyyBt_X6JbKzdubG-7FAizW7Ws,2032
|
88
|
+
vega/web/application.py,sha256=OIupZT_Q3Lad74Zr-fzl1oxgbBc0cl1NEDR3Nz0TxTY,7004
|
89
|
+
vega/web/builtin_middlewares.py,sha256=01iSy-pZL-Y1R-f-GHzT2GVtdRuYK_-wZFv0VP_S9BU,9356
|
90
|
+
vega/web/exceptions.py,sha256=QxfhHntAIMwfqCvaCRro8MqKvxZxARjSoL9eTNWa5Qc,4897
|
91
|
+
vega/web/middleware.py,sha256=DZLlkcuKOV1uPGYnaT4MsbvFWnzFVAiyGcSvi8D2Vnw,5204
|
92
|
+
vega/web/request.py,sha256=-xz6cbRAxtY0hZv62UFgg0ces0dtDcCCE_EHcw6cEms,3181
|
93
|
+
vega/web/response.py,sha256=h5E7crRepaFRyUecasIbP3ErkRLpFQXRZhYl9OrFLWY,5641
|
94
|
+
vega/web/route_middleware.py,sha256=zZzkXsdu7bCRcw-CXvFmTjNuyJ1v4NNM1DbEQo7l0qg,8208
|
95
|
+
vega/web/router.py,sha256=6K6TPMZhi92jd030guYh_mdfN3Z9MTSfjy1P3xnFfdg,10575
|
96
|
+
vega/web/routing.py,sha256=5uxiroobZb194Vg_MNzJyd-B7BOiitdwQuH2oq9Z5B8,10506
|
97
|
+
vega_framework-0.2.1.dist-info/METADATA,sha256=6VpDFAD9nzakWdVxQ1YtHWX2qaisS89opDKe2dcfU8s,11226
|
98
|
+
vega_framework-0.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
99
|
+
vega_framework-0.2.1.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
|
100
|
+
vega_framework-0.2.1.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
|
101
|
+
vega_framework-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|