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.
Files changed (35) hide show
  1. vega/cli/commands/add.py +9 -10
  2. vega/cli/commands/generate.py +15 -15
  3. vega/cli/commands/init.py +9 -8
  4. vega/cli/commands/web.py +8 -7
  5. vega/cli/main.py +4 -4
  6. vega/cli/scaffolds/__init__.py +6 -2
  7. vega/cli/scaffolds/vega_web.py +109 -0
  8. vega/cli/templates/__init__.py +34 -8
  9. vega/cli/templates/components.py +29 -13
  10. vega/cli/templates/project/ARCHITECTURE.md.j2 +13 -13
  11. vega/cli/templates/project/README.md.j2 +5 -5
  12. vega/cli/templates/web/app.py.j2 +5 -5
  13. vega/cli/templates/web/health_route.py.j2 +2 -2
  14. vega/cli/templates/web/main.py.j2 +2 -3
  15. vega/cli/templates/web/middleware.py.j2 +3 -3
  16. vega/cli/templates/web/router.py.j2 +2 -2
  17. vega/cli/templates/web/routes_init.py.j2 +3 -3
  18. vega/cli/templates/web/routes_init_autodiscovery.py.j2 +2 -2
  19. vega/cli/templates/web/users_route.py.j2 +2 -2
  20. vega/discovery/routes.py +13 -13
  21. vega/web/__init__.py +100 -0
  22. vega/web/application.py +234 -0
  23. vega/web/builtin_middlewares.py +288 -0
  24. vega/web/exceptions.py +151 -0
  25. vega/web/middleware.py +185 -0
  26. vega/web/request.py +120 -0
  27. vega/web/response.py +220 -0
  28. vega/web/route_middleware.py +266 -0
  29. vega/web/router.py +350 -0
  30. vega/web/routing.py +347 -0
  31. {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/METADATA +10 -9
  32. {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/RECORD +35 -24
  33. {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/WHEEL +0 -0
  34. {vega_framework-0.1.35.dist-info → vega_framework-0.2.1.dist-info}/entry_points.txt +0 -0
  35. {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.35
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
- - ✅ **FastAPI & SQLAlchemy** - Built-in integrations when needed
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 fastapi # Create with FastAPI
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 # FastAPI (requires: vega add web)
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 FastAPI web support
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/ # FastAPI routes
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 FastAPI, database, and Stripe
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
- # ✅ FastAPI route (Presentation) - just wiring
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=5Li588W1KWQqCKV0VZSURx4J3I8dQE297c4V_3anf5U,6465
5
- vega/cli/commands/generate.py,sha256=wCvcj1bSIK9MJam8FcT9G2vrQTYv92JFRzPYOipJywA,38172
6
- vega/cli/commands/init.py,sha256=Ro35QfCKeo-Nm_rJkRT-DaX0nH7_bGc_ewX5Q1eqpP8,5860
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=tkaMzrENiV044JdPtCSRmzX_vVpnumlDeTG6YH3DWo4,3450
10
- vega/cli/main.py,sha256=0hSar-MFpu3tp2QDOite4LGVpAhCTojuRZhPDiilEFQ,5476
11
- vega/cli/scaffolds/__init__.py,sha256=WFJf2H_4UWL89gDxX8PXKkTVSVOfw7hFfyaPWKokp1g,217
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/templates/__init__.py,sha256=1Udc3hlhj3pJYQGk4NVpg0u9us040YarL_adlomJTf4,2018
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=93fzDB6DJUq4_wPaM1ao8RgHxlm6giMSu4JIP8ULOS4,8541
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=HunrJ_9LlPxd5-GONaJxjoLlw-XfjYaLpsVHFa72Yf4,25868
33
- vega/cli/templates/project/README.md.j2,sha256=tZtMKhyKjfCq5JTECHihISu0VjYd254t-7y2kJ0nbKY,4589
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=mu9EjazXWTbKusaUJMA1SrIJzz4hfxeZQvTLfYyCS4E,416
47
- vega/cli/templates/web/health_route.py.j2,sha256=iq30wENqti14j3JOfVqJNO4WAE2NiNYzVq3R6ScVKVg,253
48
- vega/cli/templates/web/main.py.j2,sha256=9zJzBMOLZl4J3WqLULARosyILhdHiXYMMdxeNAHlX3w,557
49
- vega/cli/templates/web/middleware.py.j2,sha256=ild8nAdq45HGCiA-XVcWgmMBCfwIgORcZ7qsykmOclw,2165
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=5FgBYTcsdHH24Y9GtlsPWMllwygFO5aaCNCqNQGlhgc,4295
54
- vega/cli/templates/web/routes_init.py.j2,sha256=uyeuLGRZ-bDY-xefJ1eI9wU1kt9z7lwoVjw_nvY7Vk4,397
55
- vega/cli/templates/web/routes_init_autodiscovery.py.j2,sha256=jxvFGmWsmW1tMCeOoYfPi4l0U94YkUxcZm2VFsGgTsw,310
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=TjKu28jxVY3SwToptjOZoclUnZkobbDOUfOYlDkjs40,1927
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=WiNhNynbKewOrXv7D5fY03I3Oh_yfwEZbkeS8WGyQpU,4347
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
- vega_framework-0.1.35.dist-info/METADATA,sha256=OyIFOLuTShDmjV_aJ4G0IgFikuYgEY6WLQeeY-1cQIk,11105
87
- vega_framework-0.1.35.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
88
- vega_framework-0.1.35.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
89
- vega_framework-0.1.35.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
90
- vega_framework-0.1.35.dist-info/RECORD,,
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,,