From a443f225f44016101ba0629baa6065fb32e6d04d Mon Sep 17 00:00:00 2001 From: tsiresymila Date: Mon, 26 Feb 2024 16:41:24 +0300 Subject: [PATCH] Refactor --- .idea/.name | 1 + .idea/git_toolbox_prj.xml | 15 +++ .idea/modules.xml | 2 +- .idea/{pesty.iml => nestipy.iml} | 0 exemple/.env | 2 +- exemple/app_middleware.py | 6 +- exemple/app_module.py | 16 +-- exemple/main.py | 4 +- exemple/src/auth/auth_controller.py | 6 +- exemple/src/auth/auth_module.py | 2 +- exemple/src/auth/auth_service.py | 2 +- .../graphql_module.cpython-311.pyc | Bin 647 -> 838 bytes .../graphql_resolver.cpython-311.pyc | Bin 1193 -> 1786 bytes .../graphql_service.cpython-311.pyc | Bin 0 -> 882 bytes exemple/src/graphql/graphql_module.py | 2 +- exemple/src/graphql/graphql_resolver.py | 4 +- exemple/src/graphql/graphql_service.py | 2 +- .../__pycache__/user_module.cpython-311.pyc | Bin 1111 -> 1131 bytes exemple/src/user/entities/user.py | 2 +- exemple/src/user/user_auth_service.py | 4 +- exemple/src/user/user_controller.py | 8 +- exemple/src/user/user_middleware.py | 4 +- exemple/src/user/user_module.py | 4 +- exemple/src/user/user_service.py | 8 +- exemple/test.py | 2 +- poetry.lock | 16 ++- pyproject.toml | 8 +- src/{pesty => nestipy}/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../cli/__pycache__/cli.cpython-311.pyc | Bin 0 -> 6212 bytes .../cli/__pycache__/handler.cpython-311.pyc | Bin 0 -> 5754 bytes .../cli/__pycache__/style.cpython-311.pyc | Bin 0 -> 1648 bytes src/nestipy/cli/cli.py | 96 ++++++++++++++++ src/nestipy/cli/handler.py | 104 ++++++++++++++++++ src/nestipy/cli/style.py | 22 ++++ src/nestipy/common/__init__.py | 3 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 262 bytes .../__pycache__/http_method.cpython-311.pyc | Bin .../common/decorator/__init__.py | 10 +- .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 771 bytes .../__pycache__/controller.cpython-311.pyc | Bin .../decorator/__pycache__/dto.cpython-311.pyc | Bin .../__pycache__/inject.cpython-311.pyc | Bin .../__pycache__/injectable.cpython-311.pyc | Bin .../__pycache__/methods.cpython-311.pyc | Bin .../__pycache__/middleware.cpython-311.pyc | Bin .../__pycache__/module.cpython-311.pyc | Bin .../common/decorator/controller.py | 2 +- .../common/decorator/dto.py | 0 .../common/decorator/inject.py | 0 .../common/decorator/injectable.py | 0 .../common/decorator/methods.py | 4 +- .../common/decorator/middleware.py | 2 +- .../common/decorator/module.py | 0 src/nestipy/common/enum/__init__.py | 5 + .../enum/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 263 bytes .../enum/__pycache__/platform.cpython-311.pyc | Bin .../common/enum/platform.py | 0 src/{pesty => nestipy}/common/http_method.py | 0 .../__pycache__/generator.cpython-311.pyc | Bin 0 -> 2853 bytes src/nestipy/common/templates/generator.py | 37 +++++++ .../common/templates/project/README.md | 37 +++++++ .../project/__pycache__/main.cpython-311.pyc | Bin 0 -> 608 bytes src/nestipy/common/templates/project/main.py | 9 ++ .../common/templates/project/requirements.txt | 1 + .../common/templates/project/src}/__init__.py | 0 .../src/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 191 bytes .../app_controller.cpython-311.pyc | Bin 0 -> 2263 bytes .../__pycache__/app_module.cpython-311.pyc | Bin 0 -> 733 bytes .../__pycache__/app_service.cpython-311.pyc | Bin 0 -> 1305 bytes .../templates/project/src/app_controller.py | 23 ++++ .../templates/project/src/app_module.py | 11 ++ .../templates/project/src/app_service.py | 21 ++++ .../common/templates/views/controller.txt | 25 +++++ .../common/templates/views/dto.txt | 2 + .../common/templates/views/graphql_module.txt | 13 +++ src/nestipy/common/templates/views/input.txt | 6 + .../common/templates/views/module.txt | 3 + .../common/templates/views/resolver.txt | 20 ++++ .../common/templates/views/service.txt | 11 +- .../templates/views/single_controller.txt | 9 ++ .../common/templates/views/single_module.txt | 6 + .../templates/views/single_resolver.txt | 15 +++ .../common/templates/views/single_service.txt | 8 ++ src/{pesty => nestipy}/core/__init__.py | 14 +-- .../core/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 653 bytes .../__pycache__/app_context.cpython-311.pyc | Bin 0 -> 7118 bytes .../core/__pycache__/factory.cpython-311.pyc | Bin .../core/__pycache__/utils.cpython-311.pyc | Bin src/{pesty => nestipy}/core/app_context.py | 10 +- src/nestipy/core/factory.py | 11 ++ src/nestipy/core/ioc/__init__.py | 1 + .../ioc/__pycache__/__init__.cpython-311.pyc | Bin .../ioc/__pycache__/container.cpython-311.pyc | Bin src/{pesty => nestipy}/core/ioc/container.py | 2 +- .../core/module/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../__pycache__/compiler.cpython-311.pyc | Bin 0 -> 16485 bytes .../__pycache__/middleware.cpython-311.pyc | Bin 0 -> 1177 bytes .../module/__pycache__/pesty.cpython-311.pyc | Bin .../core/module/compiler.py | 6 +- .../core/module/middleware.py | 0 src/nestipy/core/module/pesty.py | 8 ++ src/{pesty => nestipy}/core/module/type.py | 0 .../core/platform/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../__pycache__/platform.cpython-311.pyc | Bin .../platform_litestar.cpython-311.pyc | Bin 5936 -> 6074 bytes .../core/platform/platform.py | 0 .../core/platform/platform_litestar.py | 4 +- src/{pesty => nestipy}/core/utils.py | 0 .../plugins/config_module/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../__pycache__/config_module.cpython-311.pyc | Bin .../config_service.cpython-311.pyc | Bin .../__pycache__/constant.cpython-311.pyc | Bin .../plugins/config_module/config_module.py | 0 .../plugins/config_module/config_service.py | 0 .../plugins/config_module/constant.py | 0 .../plugins/database_module/__init__.py | 0 .../plugins/database_module/constant.py | 0 .../database_module/database_module.py | 0 .../database_module/database_service.py | 0 .../plugins/dynamic_module/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../dynamic_module.cpython-311.pyc | Bin .../plugins/dynamic_module/dynamic_module.py | 0 .../plugins/peewee_module/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../__pycache__/constant.cpython-311.pyc | Bin .../__pycache__/decorator.cpython-311.pyc | Bin .../__pycache__/peewee_module.cpython-311.pyc | Bin .../peewee_service.cpython-311.pyc | Bin .../plugins/peewee_module/constant.py | 0 .../plugins/peewee_module/decorator.py | 0 .../plugins/peewee_module/peewee_module.py | 0 .../plugins/peewee_module/peewee_service.py | 0 .../plugins/strawberry_module/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin .../__pycache__/compiler.cpython-311.pyc | Bin 0 -> 11253 bytes .../__pycache__/constant.cpython-311.pyc | Bin .../__pycache__/decorator.cpython-311.pyc | Bin 0 -> 3992 bytes .../strawberry_middleware.cpython-311.pyc | Bin 0 -> 2499 bytes .../strawberry_module.cpython-311.pyc | Bin 0 -> 3181 bytes .../plugins/strawberry_module/compiler.py | 0 .../plugins/strawberry_module/constant.py | 0 .../plugins/strawberry_module/decorator.py | 2 +- .../strawberry_module/override/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 197 bytes .../__pycache__/field.cpython-311.pyc | Bin 0 -> 2738 bytes .../__pycache__/resolver.cpython-311.pyc | Bin 0 -> 1481 bytes .../strawberry_module/override/field.py | 0 .../strawberry_module/override/resolver.py | 0 .../strawberry_middleware.py | 4 +- .../strawberry_module/strawberry_module.py | 16 +-- .../__pycache__/__init__.cpython-311.pyc | Bin 169 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 757 -> 0 bytes src/pesty/common/templates/generator.py | 0 .../common/templates/views/controller.txt | 24 ---- src/pesty/common/templates/views/entity.txt | 0 .../core/__pycache__/__init__.cpython-311.pyc | Bin 655 -> 0 bytes .../__pycache__/app_context.cpython-311.pyc | Bin 6781 -> 0 bytes src/pesty/core/factory.py | 11 -- src/pesty/core/ioc/__init__.py | 1 - .../__pycache__/compiler.cpython-311.pyc | Bin 16414 -> 0 bytes .../__pycache__/middleware.cpython-311.pyc | Bin 1156 -> 0 bytes src/pesty/core/module/pesty.py | 8 -- .../__pycache__/compiler.cpython-311.pyc | Bin 7397 -> 0 bytes .../__pycache__/decorator.cpython-311.pyc | Bin 3503 -> 0 bytes .../strawberry_middleware.cpython-311.pyc | Bin 2164 -> 0 bytes .../strawberry_module.cpython-311.pyc | Bin 2517 -> 0 bytes tests/template.py | 6 + 172 files changed, 628 insertions(+), 125 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/git_toolbox_prj.xml rename .idea/{pesty.iml => nestipy.iml} (100%) create mode 100644 exemple/src/graphql/__pycache__/graphql_service.cpython-311.pyc rename src/{pesty => nestipy}/__init__.py (100%) rename src/{pesty => nestipy}/__pycache__/__init__.cpython-311.pyc (100%) create mode 100644 src/nestipy/cli/__pycache__/cli.cpython-311.pyc create mode 100644 src/nestipy/cli/__pycache__/handler.cpython-311.pyc create mode 100644 src/nestipy/cli/__pycache__/style.cpython-311.pyc create mode 100644 src/nestipy/cli/cli.py create mode 100644 src/nestipy/cli/handler.py create mode 100644 src/nestipy/cli/style.py create mode 100644 src/nestipy/common/__init__.py create mode 100644 src/nestipy/common/__pycache__/__init__.cpython-311.pyc rename src/{pesty => nestipy}/common/__pycache__/http_method.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__init__.py (65%) create mode 100644 src/nestipy/common/decorator/__pycache__/__init__.cpython-311.pyc rename src/{pesty => nestipy}/common/decorator/__pycache__/controller.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/dto.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/inject.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/injectable.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/methods.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/middleware.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/__pycache__/module.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/decorator/controller.py (90%) rename src/{pesty => nestipy}/common/decorator/dto.py (100%) rename src/{pesty => nestipy}/common/decorator/inject.py (100%) rename src/{pesty => nestipy}/common/decorator/injectable.py (100%) rename src/{pesty => nestipy}/common/decorator/methods.py (92%) rename src/{pesty => nestipy}/common/decorator/middleware.py (92%) rename src/{pesty => nestipy}/common/decorator/module.py (100%) create mode 100644 src/nestipy/common/enum/__init__.py create mode 100644 src/nestipy/common/enum/__pycache__/__init__.cpython-311.pyc rename src/{pesty => nestipy}/common/enum/__pycache__/platform.cpython-311.pyc (100%) rename src/{pesty => nestipy}/common/enum/platform.py (100%) rename src/{pesty => nestipy}/common/http_method.py (100%) create mode 100644 src/nestipy/common/templates/__pycache__/generator.cpython-311.pyc create mode 100644 src/nestipy/common/templates/generator.py create mode 100644 src/nestipy/common/templates/project/README.md create mode 100644 src/nestipy/common/templates/project/__pycache__/main.cpython-311.pyc create mode 100644 src/nestipy/common/templates/project/main.py create mode 100644 src/nestipy/common/templates/project/requirements.txt rename src/{pesty/common => nestipy/common/templates/project/src}/__init__.py (100%) create mode 100644 src/nestipy/common/templates/project/src/__pycache__/__init__.cpython-311.pyc create mode 100644 src/nestipy/common/templates/project/src/__pycache__/app_controller.cpython-311.pyc create mode 100644 src/nestipy/common/templates/project/src/__pycache__/app_module.cpython-311.pyc create mode 100644 src/nestipy/common/templates/project/src/__pycache__/app_service.cpython-311.pyc create mode 100644 src/nestipy/common/templates/project/src/app_controller.py create mode 100644 src/nestipy/common/templates/project/src/app_module.py create mode 100644 src/nestipy/common/templates/project/src/app_service.py create mode 100644 src/nestipy/common/templates/views/controller.txt rename src/{pesty => nestipy}/common/templates/views/dto.txt (98%) create mode 100644 src/nestipy/common/templates/views/graphql_module.txt create mode 100644 src/nestipy/common/templates/views/input.txt rename src/{pesty => nestipy}/common/templates/views/module.txt (85%) create mode 100644 src/nestipy/common/templates/views/resolver.txt rename src/{pesty => nestipy}/common/templates/views/service.txt (52%) create mode 100644 src/nestipy/common/templates/views/single_controller.txt create mode 100644 src/nestipy/common/templates/views/single_module.txt create mode 100644 src/nestipy/common/templates/views/single_resolver.txt create mode 100644 src/nestipy/common/templates/views/single_service.txt rename src/{pesty => nestipy}/core/__init__.py (50%) create mode 100644 src/nestipy/core/__pycache__/__init__.cpython-311.pyc create mode 100644 src/nestipy/core/__pycache__/app_context.cpython-311.pyc rename src/{pesty => nestipy}/core/__pycache__/factory.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/__pycache__/utils.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/app_context.py (91%) create mode 100644 src/nestipy/core/factory.py create mode 100644 src/nestipy/core/ioc/__init__.py rename src/{pesty => nestipy}/core/ioc/__pycache__/__init__.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/ioc/__pycache__/container.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/ioc/container.py (99%) rename src/{pesty => nestipy}/core/module/__init__.py (100%) rename src/{pesty => nestipy}/core/module/__pycache__/__init__.cpython-311.pyc (100%) create mode 100644 src/nestipy/core/module/__pycache__/compiler.cpython-311.pyc create mode 100644 src/nestipy/core/module/__pycache__/middleware.cpython-311.pyc rename src/{pesty => nestipy}/core/module/__pycache__/pesty.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/module/compiler.py (98%) rename src/{pesty => nestipy}/core/module/middleware.py (100%) create mode 100644 src/nestipy/core/module/pesty.py rename src/{pesty => nestipy}/core/module/type.py (100%) rename src/{pesty => nestipy}/core/platform/__init__.py (100%) rename src/{pesty => nestipy}/core/platform/__pycache__/__init__.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/platform/__pycache__/platform.cpython-311.pyc (100%) rename src/{pesty => nestipy}/core/platform/__pycache__/platform_litestar.cpython-311.pyc (76%) rename src/{pesty => nestipy}/core/platform/platform.py (100%) rename src/{pesty => nestipy}/core/platform/platform_litestar.py (95%) rename src/{pesty => nestipy}/core/utils.py (100%) rename src/{pesty => nestipy}/plugins/config_module/__init__.py (100%) rename src/{pesty => nestipy}/plugins/config_module/__pycache__/__init__.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/config_module/__pycache__/config_module.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/config_module/__pycache__/config_service.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/config_module/__pycache__/constant.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/config_module/config_module.py (100%) rename src/{pesty => nestipy}/plugins/config_module/config_service.py (100%) rename src/{pesty => nestipy}/plugins/config_module/constant.py (100%) rename src/{pesty => nestipy}/plugins/database_module/__init__.py (100%) rename src/{pesty => nestipy}/plugins/database_module/constant.py (100%) rename src/{pesty => nestipy}/plugins/database_module/database_module.py (100%) rename src/{pesty => nestipy}/plugins/database_module/database_service.py (100%) rename src/{pesty => nestipy}/plugins/dynamic_module/__init__.py (100%) rename src/{pesty => nestipy}/plugins/dynamic_module/__pycache__/__init__.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/dynamic_module/__pycache__/dynamic_module.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/dynamic_module/dynamic_module.py (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__init__.py (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__pycache__/__init__.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__pycache__/constant.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__pycache__/decorator.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__pycache__/peewee_module.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/peewee_module/__pycache__/peewee_service.cpython-311.pyc (100%) rename src/{pesty => nestipy}/plugins/peewee_module/constant.py (100%) rename src/{pesty => nestipy}/plugins/peewee_module/decorator.py (100%) rename src/{pesty => nestipy}/plugins/peewee_module/peewee_module.py (100%) rename src/{pesty => nestipy}/plugins/peewee_module/peewee_service.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/__init__.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/__pycache__/__init__.cpython-311.pyc (100%) create mode 100644 src/nestipy/plugins/strawberry_module/__pycache__/compiler.cpython-311.pyc rename src/{pesty => nestipy}/plugins/strawberry_module/__pycache__/constant.cpython-311.pyc (100%) create mode 100644 src/nestipy/plugins/strawberry_module/__pycache__/decorator.cpython-311.pyc create mode 100644 src/nestipy/plugins/strawberry_module/__pycache__/strawberry_middleware.cpython-311.pyc create mode 100644 src/nestipy/plugins/strawberry_module/__pycache__/strawberry_module.cpython-311.pyc rename src/{pesty => nestipy}/plugins/strawberry_module/compiler.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/constant.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/decorator.py (96%) rename src/{pesty => nestipy}/plugins/strawberry_module/override/__init__.py (100%) create mode 100644 src/nestipy/plugins/strawberry_module/override/__pycache__/__init__.cpython-311.pyc create mode 100644 src/nestipy/plugins/strawberry_module/override/__pycache__/field.cpython-311.pyc create mode 100644 src/nestipy/plugins/strawberry_module/override/__pycache__/resolver.cpython-311.pyc rename src/{pesty => nestipy}/plugins/strawberry_module/override/field.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/override/resolver.py (100%) rename src/{pesty => nestipy}/plugins/strawberry_module/strawberry_middleware.py (89%) rename src/{pesty => nestipy}/plugins/strawberry_module/strawberry_module.py (65%) delete mode 100644 src/pesty/common/__pycache__/__init__.cpython-311.pyc delete mode 100644 src/pesty/common/decorator/__pycache__/__init__.cpython-311.pyc delete mode 100644 src/pesty/common/templates/generator.py delete mode 100644 src/pesty/common/templates/views/controller.txt delete mode 100644 src/pesty/common/templates/views/entity.txt delete mode 100644 src/pesty/core/__pycache__/__init__.cpython-311.pyc delete mode 100644 src/pesty/core/__pycache__/app_context.cpython-311.pyc delete mode 100644 src/pesty/core/factory.py delete mode 100644 src/pesty/core/ioc/__init__.py delete mode 100644 src/pesty/core/module/__pycache__/compiler.cpython-311.pyc delete mode 100644 src/pesty/core/module/__pycache__/middleware.cpython-311.pyc delete mode 100644 src/pesty/core/module/pesty.py delete mode 100644 src/pesty/plugins/strawberry_module/__pycache__/compiler.cpython-311.pyc delete mode 100644 src/pesty/plugins/strawberry_module/__pycache__/decorator.cpython-311.pyc delete mode 100644 src/pesty/plugins/strawberry_module/__pycache__/strawberry_middleware.cpython-311.pyc delete mode 100644 src/pesty/plugins/strawberry_module/__pycache__/strawberry_module.cpython-311.pyc create mode 100644 tests/template.py diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..6d0c87a --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +nestipy \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index b2c82a9..7b91dce 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/pesty.iml b/.idea/nestipy.iml similarity index 100% rename from .idea/pesty.iml rename to .idea/nestipy.iml diff --git a/exemple/.env b/exemple/.env index 9b2b901..ed2ee24 100644 --- a/exemple/.env +++ b/exemple/.env @@ -4,4 +4,4 @@ DB_HOST=localhost DB_PORT=3306 DB_USER=root DB_PASSWORD= -DB_DATABASE=pesty \ No newline at end of file +DB_DATABASE=nestipy \ No newline at end of file diff --git a/exemple/app_middleware.py b/exemple/app_middleware.py index 18c4794..f623a31 100644 --- a/exemple/app_middleware.py +++ b/exemple/app_middleware.py @@ -1,8 +1,8 @@ -from pesty.common.decorator.injectable import Injectable -from pesty.common.decorator.middleware import PestyMiddleware +from nestipy.common.decorator.injectable import Injectable +from nestipy.common.decorator.middleware import NestipyMiddleware @Injectable() -class AppMiddleware(PestyMiddleware): +class AppMiddleware(NestipyMiddleware): def use(self, scope, receive, send): pass diff --git a/exemple/app_module.py b/exemple/app_module.py index 3e27a98..e87d96e 100644 --- a/exemple/app_module.py +++ b/exemple/app_module.py @@ -2,13 +2,13 @@ from app_middleware import AppMiddleware from src.graphql.graphql_module import GraphqlModule -from pesty.common.decorator.module import Module -from pesty.core.module.pesty import PestyModule -from pesty.plugins.config_module.config_module import ConfigModule -from pesty.plugins.config_module.config_service import ConfigService -from pesty.plugins.dynamic_module.dynamic_module import ModuleOption -from pesty.plugins.peewee_module.peewee_module import PeeweeModule -from pesty.plugins.strawberry_module.strawberry_module import StrawberryModule +from nestipy.common.decorator.module import Module +from nestipy.core.module.nestipy import NestipyModule +from nestipy.plugins.config_module.config_module import ConfigModule +from nestipy.plugins.config_module.config_service import ConfigService +from nestipy.plugins.dynamic_module.dynamic_module import ModuleOption +from nestipy.plugins.peewee_module.peewee_module import PeeweeModule +from nestipy.plugins.strawberry_module.strawberry_module import StrawberryModule from src.auth.auth_module import AuthModule from src.user.user_module import UserModule @@ -40,7 +40,7 @@ async def database_factory(config: ConfigService): ], providers=[AppMiddleware] ) -class AppModule(PestyModule): +class AppModule(NestipyModule): def on_startup(self): pass diff --git a/exemple/main.py b/exemple/main.py index fe8ae09..982f431 100644 --- a/exemple/main.py +++ b/exemple/main.py @@ -1,9 +1,9 @@ import uvicorn from app_module import AppModule -from pesty.core.factory import AppPestyFactory +from nestipy.core.factory import AppNestipyFactory -app = AppPestyFactory.create(AppModule, title="My app") +app = AppNestipyFactory.create(AppModule, title="My app") if __name__ == '__main__': uvicorn.run('main:app', host="0.0.0.0", port=8000, reload=True) diff --git a/exemple/src/auth/auth_controller.py b/exemple/src/auth/auth_controller.py index be1b8d7..5af161a 100644 --- a/exemple/src/auth/auth_controller.py +++ b/exemple/src/auth/auth_controller.py @@ -1,6 +1,6 @@ -from pesty.common.decorator.controller import Controller -from pesty.common.decorator.inject import Inject -from pesty.common.decorator.methods import Post +from nestipy.common.decorator.controller import Controller +from nestipy.common.decorator.inject import Inject +from nestipy.common.decorator.methods import Post from .auth_service import AuthService diff --git a/exemple/src/auth/auth_module.py b/exemple/src/auth/auth_module.py index f4b69be..a0bf532 100644 --- a/exemple/src/auth/auth_module.py +++ b/exemple/src/auth/auth_module.py @@ -1,4 +1,4 @@ -from pesty.common.decorator.module import Module +from nestipy.common.decorator.module import Module from .auth_controller import AuthController from .auth_service import AuthService diff --git a/exemple/src/auth/auth_service.py b/exemple/src/auth/auth_service.py index 6c44fc7..39f8e63 100644 --- a/exemple/src/auth/auth_service.py +++ b/exemple/src/auth/auth_service.py @@ -1,4 +1,4 @@ -from pesty.common.decorator.injectable import Injectable +from nestipy.common.decorator.injectable import Injectable @Injectable() diff --git a/exemple/src/graphql/__pycache__/graphql_module.cpython-311.pyc b/exemple/src/graphql/__pycache__/graphql_module.cpython-311.pyc index 18e219056022994e378733f0a1839ba6eb2ee2d3..41914d2d10513f0e2e0ed73aa03dfb9e0e9edf17 100644 GIT binary patch delta 463 zcmZo?J;uhjoR^o20SG$3-b(dkoX97^STj*wHYJ52g*k^MmoQs#jc;tXB$@0u%AMU{@5ePTt2Tlg$P*r-%>40vjs;Wc}i>fvB@9 z5(RP@fw*`vkodsN$jEqu!Qlcby1`&~0Tta~Fus6_CMz;Y3EM5OzaV71BWp*@1xBxn dj9yn5y(W7wsY`k@0$CrJ7#TS~Fu(|~YXJU(b)x_P delta 351 zcmX@c*3QbeoR^o20SI1L-AdiSFp*D!F>a!|Y&{c0Dsw7hI^!DVWsD3AtAQ8-m>Ap{ zQdn9TQdpNU0mXqB0+s=()i4f26iW(QFoP!hOOS{r<1K#oqQruX!knPg;{2Sl)FPk| zn{R$fX-+DT#aU34UzVAYT2!12H()Xs<5E3#Ah!raumW*0KagmE!v`!J4K77IFcp59 ztds9D>bQy(q!yP{>Lusr=H}<=rKBe37bTYD7ZtI<6c%xVSYUm;K-Mn~n_RFv?1}_{ zT#z@5D<;ool2O&Xz<`22urV-kG>A>GzaXT1fl=imqskRVmC0<(>Jq9z#s?-wM$Qim IFam4=0MA!WNdN!< diff --git a/exemple/src/graphql/__pycache__/graphql_resolver.cpython-311.pyc b/exemple/src/graphql/__pycache__/graphql_resolver.cpython-311.pyc index a36b17cab24ffa336b72e45014fb56c4385472b2..c63d714be36397b9fa921be5fa63ec162141ba39 100644 GIT binary patch literal 1786 zcmaJ>y>Amq6rcU{dTqx*LIS?K$cQLt8(WH8BHD<8AczpBm5!Bfck%)IVP@9^M=2c1 zMGE>*rV5E@?vJ=Xz&RmZG>}y3Qz9QQdp9>o`k}8;^hQ&Aj*Kea-BLO2s5FYVK$H zi%iI0xEK#DW6t})>=Tc8l22@;vM&X)ElbENz7nXmDtOh`0^QaHula?*u#KQ-7X#Ba zB_b1Q9KuN-vttSDEE7*35U+3uzCXf09eFLgi7rkS)%C2WFp8VoM&e zlc^_oVx<1bHDJrYBRwQ)qEb_0)lym)Yk3>T6f@OQ2uQpCQiI zX;Jvly}}inif2HXioBYY<)Q+GI4uxYSrjE)XEf=u(7h zk^guHX+E}9axAS_GAn_E8|yT25*jDRGFM~judy<0$LOwJ|GM1VhyvP7;!Q^5UUMsA zubQ1+vJr*N4%qaX^eqiKK5fR#ZLX&c9#aQQL{l4`9yig2^BSAGUHc~G#za;@-?IRH za#o#wxASLp;g9OVNpI!+LIT_5?f1Lbb}sf6Lz zfvE_h>s7~ThhdbyvDk4Kp35*cuEYsrGq}8sU?BX6fcXfYB6fyfA^}BU;uC=WrQg~7 z!uz#@7bo+rPxGz*^4^P~+Jbqaw$3!O|7`d9;Q2_Fw0rN95dm_f2r_{$3ehW>&PXSE zX<{>XprYQ~(X=2FxMVYjHdFndckO|Ver669P;chQ738;+2wni1UdvP`yJ@zVs8!}B z)TO=kD`oI`x;Eh(Ne^B^TDrU0YiPi0Xk@QpOr7jmize_{@p>9=6a-P&@TeQHb`mks zCT^v|j^AD14CBVcSJvE1`grTp-ibbmp5*)V)wrKti3jW+DC2F7j{!!CBuS^_`fxl? z$(><-o{^OaPT3j)tB16AH z85o#K5epxsBf6;)6I-eh9V(=$h&%PNfV z8#Intzycn!h995RxZ9==Zy&GQP6%fa%vO%VO=ytBg zMtn#yGw~bS8f?I^fzeVTl}Y*yO(hZ;Zo(o)6RNA#E}QOl97#7#c0eYXyC1_lx0j{c zao6o(Rp!d~GU|oWO`zj$>p9s_Qol~7@=R)ba4s;m!-ipxB>|4%HFF!f6& zaBdwf!3}h@>Wj+peZu7Xs^t4o9P~r7mwlYD9p(|BKN#q2WhN;=g|@^zR7p^4-A=;- zhqfdrBl(D8aP^FAW-kq19c~OaMh3U;d`d?Q)v2k~R9u+ME*Cjevod&n=nXxpseXA# zdDYX7RzGs3Z7ry@Qlw73IX*(w!auEoQ?&QrN`S19W_bPiaCQA7G1eEDx8?qnypha1WE|nv)F0$mE>=WDm|}-*fit?Ef!vV3Y=T c57&lkBg5g<5t|nmCgK|bB@n}dqc9ipxd`clR ztU|n!K}CL2hp92g)DxPNG#_Qyl^c0Sj3Kf8!wxbKW|_Ea6(h^!R7ORX zTkNS7lN%XVYY7516oCkk)?yH&0S-TiFtBnqxD<(j)l3d!x}phIE(+p<1;v4^UmP~M z`6;D2sdhyQKrSN?7qc)<4rbme&cVPZ+2Q+vpM#0%BLk550wO*LO_pF$k`+eq85uc0 JFu(|~!2q_zE!_YB delta 174 zcmaFOah-#AIWI340}#kfxS7f^kyn!O$VBySjx}7%m>C#WGf&*NijjG8CZpoy$&Aa` z1c2&_1SZ=viSr6EuyQuI6p2Dal9{e(f+a;je6XMxkoAkhCO1E&G$+-rNFK;#1mfbq o43iU>w+gVcGckQ+01{t7#0P=NIxI@Ef(Sk%Bj*PO7y&jB034|$;{X5v diff --git a/exemple/src/user/entities/user.py b/exemple/src/user/entities/user.py index 3a03913..cf0add0 100644 --- a/exemple/src/user/entities/user.py +++ b/exemple/src/user/entities/user.py @@ -1,6 +1,6 @@ from peewee import TextField, IntegerField -from pesty.plugins.peewee_module.decorator import Model +from nestipy.plugins.peewee_module.decorator import Model @Model diff --git a/exemple/src/user/user_auth_service.py b/exemple/src/user/user_auth_service.py index 96e06f2..9a9b8d4 100644 --- a/exemple/src/user/user_auth_service.py +++ b/exemple/src/user/user_auth_service.py @@ -1,5 +1,5 @@ -from pesty.common.decorator.inject import Inject -from pesty.common.decorator.injectable import Injectable +from nestipy.common.decorator.inject import Inject +from nestipy.common.decorator.injectable import Injectable from ..auth import AuthService from ..user.entities.user import User diff --git a/exemple/src/user/user_controller.py b/exemple/src/user/user_controller.py index eaeb4ee..16fe60e 100644 --- a/exemple/src/user/user_controller.py +++ b/exemple/src/user/user_controller.py @@ -1,7 +1,7 @@ -from pesty.common.decorator.controller import Controller -from pesty.common.decorator.inject import Inject -from pesty.common.decorator.methods import Get, Post -from pesty.common.decorator.middleware import Middleware +from nestipy.common.decorator.controller import Controller +from nestipy.common.decorator.inject import Inject +from nestipy.common.decorator.methods import Get, Post +from nestipy.common.decorator.middleware import Middleware from .user_middleware import UserMiddleware, create_middleware from ..auth.auth_service import AuthService from .dto import CreateUserDto diff --git a/exemple/src/user/user_middleware.py b/exemple/src/user/user_middleware.py index c2a71bd..03adb10 100644 --- a/exemple/src/user/user_middleware.py +++ b/exemple/src/user/user_middleware.py @@ -1,7 +1,7 @@ -from pesty.common.decorator.middleware import Middleware, PestyMiddleware +from nestipy.common.decorator.middleware import Middleware, NestipyMiddleware -class UserMiddleware(PestyMiddleware): +class UserMiddleware(NestipyMiddleware): def use(self, scope, receive, send): print('UserMiddleware called ') diff --git a/exemple/src/user/user_module.py b/exemple/src/user/user_module.py index df2f0a9..67fa6d5 100644 --- a/exemple/src/user/user_module.py +++ b/exemple/src/user/user_module.py @@ -1,5 +1,5 @@ -from pesty.common.decorator.module import Module -from pesty.plugins.peewee_module.peewee_module import PeeweeModule +from nestipy.common.decorator.module import Module +from nestipy.plugins.peewee_module.peewee_module import PeeweeModule from .entities.user import User from .user_auth_service import UserAuthService from .user_controller import UserController diff --git a/exemple/src/user/user_service.py b/exemple/src/user/user_service.py index 7575187..74cab35 100644 --- a/exemple/src/user/user_service.py +++ b/exemple/src/user/user_service.py @@ -1,7 +1,7 @@ -from pesty.common.decorator.inject import Inject -from pesty.common.decorator.injectable import Injectable -from pesty.plugins.config_module.config_service import ConfigService -from pesty.plugins.peewee_module.peewee_service import PeeweeService +from nestipy.common.decorator.inject import Inject +from nestipy.common.decorator.injectable import Injectable +from nestipy.plugins.config_module.config_service import ConfigService +from nestipy.plugins.peewee_module.peewee_service import PeeweeService from ..auth import AuthService from .dto import CreateUserDto from .entities.user import User diff --git a/exemple/test.py b/exemple/test.py index dfb5e4e..63b09b1 100644 --- a/exemple/test.py +++ b/exemple/test.py @@ -14,7 +14,7 @@ def Model(cls): return type(cls.__name__, (BaseModel,), class_attrs) -db = MySQLDatabase('pesty', host='localhost', port=3306, user='root', password='') +db = MySQLDatabase('nestipy', host='localhost', port=3306, user='root', password='') @Model diff --git a/poetry.lock b/poetry.lock index 8b9fbd9..10209d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -425,6 +425,20 @@ files = [ {file = "multidict-6.0.5.tar.gz", hash = "sha256:f7e301075edaf50500f0b341543c41194d8df3ae5caf4702f2095f3ca73dd8da"}, ] +[[package]] +name = "pathlib2" +version = "2.3.7.post1" +description = "Object-oriented filesystem paths" +optional = false +python-versions = "*" +files = [ + {file = "pathlib2-2.3.7.post1-py2.py3-none-any.whl", hash = "sha256:5266a0fd000452f1b3467d782f079a4343c63aaa119221fbdc4e39577489ca5b"}, + {file = "pathlib2-2.3.7.post1.tar.gz", hash = "sha256:9fe0edad898b83c0c3e199c842b27ed216645d2e177757b2dd67384d4113c641"}, +] + +[package.dependencies] +six = "*" + [[package]] name = "peewee" version = "3.17.1" @@ -857,4 +871,4 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "16bc87d0c1042399575737dc91d125694afcd1ed06bd46b850b3263028ba341d" +content-hash = "700cf8160cbbd6154c6629bf2c33fae2326cdda4d3222ad4a8242077ffb11173" diff --git a/pyproject.toml b/pyproject.toml index 2b255ba..048621b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [tool.poetry] -name = "pesty" +name = "nestipy" version = "0.1.0" description = "" authors = ["tsiresymila "] readme = "README.md" -packages = [{include = "pesty", from = "src"}] +packages = [{include = "nestipy", from = "src"}] [tool.poetry.dependencies] python = "^3.11" @@ -18,8 +18,12 @@ minijinja = "^1.0.8" pyee = "^11.1.0" snakecase = "^1.0.1" strawberry-graphql = "^0.219.2" +pathlib2 = "^2.3.7.post1" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +nestipy = "nestipy.cli.cli:main" diff --git a/src/pesty/__init__.py b/src/nestipy/__init__.py similarity index 100% rename from src/pesty/__init__.py rename to src/nestipy/__init__.py diff --git a/src/pesty/__pycache__/__init__.cpython-311.pyc b/src/nestipy/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/__pycache__/__init__.cpython-311.pyc diff --git a/src/nestipy/cli/__pycache__/cli.cpython-311.pyc b/src/nestipy/cli/__pycache__/cli.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4cec0eceb5968e9e02343e20e1b1027ec5a5edc3 GIT binary patch literal 6212 zcmdT|O>7&-72YL>bHe;JaB*C@aAV#1cTX8J7mC+v|0K;&cSuzv%koHg4*Bk#l47AdGW_E$9>63oWxhS1$>4o zd^NNX;;|mCgsWtM@LY(KLk~ga8&{uOhyahY@S?!uuEkuTV5>ydxFBaikcIUwSK9v! z%CTPAx1fv^dC0>^;I=O*+S+eWd!ZYwcw=(4@F~Tf2rYeewf41;kQ2L)QHr-}cNk}P zYu_#7OzveVDA&PCqJx#xE3uO7U?u%ZtfV?v>3Jnq(jBby?qx;l`5z;ow}YiV`GC}S zJ%q7I6X0hd=y|{-KhN&$fq$aVT$Z=emt|F3nXHsA6l+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M!?(<3i4E3X&oyqZ`#6T}l+Xx01$|7zt-c3@xh0Z#Mus-X&;#kwX`Kui zWWpp9I+^f1F!l6`-aBO%gG`%bT6fDn9(esB_A+pqadxqO*BzU;ceWkDMVaRwx52B& z^P$uGJ}!*8B0mMkT|y6b2G-yP8GLZ%(J`G28f4rg<2qrd2UxE4-pQxn(@DD+WXdE{ zx?AisL4@tj11qqHuh-wZ^fb(&FInc!J7EOMP{3ntp^!aj?@)W$-x)dl1H(DhQe6J5^bQ~X?tnuY z<~x>FSO8j)MXD^<*?%2yxK*lEI1*bzkuEOdIhvhn*}=@-hT`&1G2OG|LNPwsH(M|s z{7mqJ5g#z) z1I^fGEZw|yyRp`25;!J?lFdVF1Gk6PhPFdI-vzr0zUzlD7fQPffeS@H9lSGmdw6Yl zlTU;6@cpR4A2#{J+aZC+Q!-N2IRZR<_N)zW6V{YL<;*8Xd3vkB3Heqck gjwJ3jHp2aSxPKG>sk=S1Hq&Ik?J!3&z-Gw#4}RhJt^fc4 literal 0 HcmV?d00001 diff --git a/src/nestipy/cli/__pycache__/handler.cpython-311.pyc b/src/nestipy/cli/__pycache__/handler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9303fed02f926b43d1221ac76cb6ee60d1873845 GIT binary patch literal 5754 zcmd5=Uu+Y}8J}J6+7s-=HvW#~F&TYKD z*@b{*PE_K-mqrSzPD>PlA%;#9e(O6}u4_HiApM6_zEN>v~F7R2@Cp89>W-i_CZ zX{1&vOz_{C#PhAh~zv`qABluKg}>`kVMUlG$?!ihIh7O~=~BkL4q@jNb*`Xg zO!d5)S6Rl?S+-t<2XZ~};?EFSCMy4QO8fy)L#m_*6QEVZdn6?*AvHWB!l$KFM5T&+ zk353Br}gTDq}r4)l-s35Kt`1=rA>_~yVTf>q(tw@srG;-2AYn5rX4i#fTja9y91gy zXgUL$-Jt0L4Sq*dIw94qP=KM^iC{PmEsI=hRWt$T8KpJvy(mk4Fo) z&Fgx8w16EOHCVPD%WApN>ux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SNY09A3QB^;a09LBmkfaFN^ zCPFf4(@D$ouLLBK`V#zdJkXMhiI#ZO+u%U%0E}ey9D*@!({ao5uLKy>U!u^GTF#Cn zqA}PK4X+VIVkdLsQ1yoh$AnEMEYH6ZaD-s9e)+uEk4W^lL;~s`-ysOESHlRxaho2u zJpW37AiI0nODDve2*Z|Ry|)0v9SwHF@f`y3Ms*m0IBC<9mgij{{Ob+0gy$;0$!KuG z!%b!u6s~J==97LRm!x09i@`%NFO@ zZf*%m@;8^}qQQRGx7+ZPBczMchFXw8s*QUJ|?Ol)U zzTXE&xY(c_8!QWJv~4M}5V;@m3)D5AwJo-l`Hx$Rd-LeQClb7#r_;`^blN?}Ks=UC ze{v(ExjFn{#)+rXnS5S1-3xp=&0+wBBVE;XjrC$Qn$Z-r?%WV1%mDE`1j&0Jx{8=2!=2L?kQ~EgUBpCre1m|foaI5an+MH; zit-uMop~JML3Nr3%>s%|pl+hV^CznCWlz-*gJP#KdAgG2LG^7OGz%zp0(B=Uyi+G0 z^U|)0>sQxZV|%%3T`-#GlUcprvrRLYm-tD54u9Xj$Bh9g0yc zcl8*CAom;ZDj)b{TXq35byg p0X8NGYoy~Y|E-ZeE9n15Cas{~2)`=`FtF|AbFTlUMK15pzX6pDyXyb| literal 0 HcmV?d00001 diff --git a/src/nestipy/cli/__pycache__/style.cpython-311.pyc b/src/nestipy/cli/__pycache__/style.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ea1274a88c2ad91c3a71c65b8cbae9836888e60a GIT binary patch literal 1648 zcmb_cJ8u&~5Z>K;c=IqgJft8LVd2D)n>axcN&!eHNOT4%AR<$o%-zN@Ip3K*N0B3n z6e%g_>>@>~K$O({4jZ{ZCyGdjg3gf$Dto)%eKY%ccV;x_PtoWof>C|` zo&CWG{SZcHs3B=D0jVMjS=dHJoW(_wC0N+RR9$WaB{98v+X*gcV_*$Mb<{V<5tmO}hubFni-0(Gznd>gtifMa10*89y-gx}% zetO+4vUJ%iaOPFgTQ1*7mn!9T*GZR{SFWTzZiWnwN`uE{bES$rV>{YOW=^C+#j#TW zJLo5kei-}sr1q*#XBu>-NoRlrvkd}t*;y-`SzL4}9~W>HAWV=?0QWV<;73AG$ygQ*!l0``j(;bZXj)i bool: + destination = os.path.join(os.getcwd(), name) + if os.path.exists(destination): + return False + self.generator.copy_project(destination) + return True + + @classmethod + def mkdir(cls, name): + path = os.path.join(os.getcwd(), 'src', name) + if not os.path.exists(path): + os.mkdir(path) + return path + + def generate_resource_api(self, name): + self.generate_dto(name) + self.generate_service(name) + self.generate_controller(name) + self.generate_module(name) + + def generate_resource_graphql(self, name): + self.generate_input(name) + self.generate_service(name) + self.generate_resolver(name) + self.generate_module(name, prefix='graphql') + + def generate_module(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'module', prefix=prefix) + + def generate_controller(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'controller', prefix=prefix) + + def generate_service(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'service', prefix=prefix) + + def generate_resolver(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'resolver', prefix=prefix) + + def generate_dto(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'dto', prefix=prefix) + + def generate_input(self, name: str, prefix: str = None): + path = self.mkdir(name) + self.generate(name, path, 'input', prefix=prefix) + + def generate(self, name, parent_path, template, prefix: str = None): + content = self.generator.render_template( + f'{prefix}_' if prefix is not None else '' + f"{template}.txt", name=name) + file_path = str(os.path.join(parent_path, f"{name.lower()}_{template}.py")) + print(file_path) + f = open(file_path, 'w+') + f.write(content) + f.close() + + @classmethod + def modify_app_module(cls, name): + name = str(name) + app_path = os.path.join(os.getcwd(), 'app_module.py') + if os.path.exists(app_path): + new_import = f"{str(name).capitalize()}Module" + with open(app_path, 'r') as file: + file_content = file.read() + file.close() + module_pattern = r'@Module\(([^)]*)\)' + text_to_add = f'from src/{name.lower()}_module import {name.capitalize()}Module' + import re + match = re.search(module_pattern, file_content) + if match: + existing_imports_str = match.group(1) + existing_imports_match = re.search(r'imports=\[(.*?)\]', existing_imports_str) + if existing_imports_match: + existing_imports = existing_imports_match.group(1) + new_imports = existing_imports + ', ' + new_import + modified_imports_str = re.sub(r'imports=\[(.*?)\]', 'imports=[' + new_imports + ']', + existing_imports_str) + modified_content = file_content.replace(match.group(0), + text_to_add + '\n@Module(' + modified_imports_str + ')') + else: + # If imports=[] doesn't exist, add imports directly + modified_content = file_content.replace(match.group(0), + text_to_add + '\n@Module(imports=[' + new_import + '],') + with open(app_path, 'w') as file2: + file2.write(modified_content) + file2.close() + else: + print("No @Module decorator found in the file.") diff --git a/src/nestipy/cli/style.py b/src/nestipy/cli/style.py new file mode 100644 index 0000000..3c49608 --- /dev/null +++ b/src/nestipy/cli/style.py @@ -0,0 +1,22 @@ +from typing import Optional, Any + +import click + + +class CliStyle: + + @classmethod + def info(cls, info: Optional[Any] = None, ): + click.secho(info, fg='green') + + @classmethod + def error(cls, info: Optional[Any] = None, ): + click.secho(info, fg='red') + + @classmethod + def warning(cls, info: Optional[Any] = None, ): + click.secho(info, fg='orange') + + @classmethod + def success(cls, info: Optional[Any] = None, ): + click.secho(info, fg='green', bold=True) diff --git a/src/nestipy/common/__init__.py b/src/nestipy/common/__init__.py new file mode 100644 index 0000000..b662ea4 --- /dev/null +++ b/src/nestipy/common/__init__.py @@ -0,0 +1,3 @@ +from .decorator import * +from .enum import * +from .http_method import * diff --git a/src/nestipy/common/__pycache__/__init__.cpython-311.pyc b/src/nestipy/common/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8e3bc043f2f8be5c468b24d190afc55dcdb43c7 GIT binary patch literal 262 zcmZ3^%ge<81UX%IQayn5V-N=hn4pZ$azMs(h7^Vr#vFza2+atknSeA?FoP!ZOGcm~ zO~zY{T7H_$w>VQ$lk4BO~Jt28jzWbb~?o0u0??kh*}1ia3CJ00r1c82|tP literal 0 HcmV?d00001 diff --git a/src/pesty/common/__pycache__/http_method.cpython-311.pyc b/src/nestipy/common/__pycache__/http_method.cpython-311.pyc similarity index 100% rename from src/pesty/common/__pycache__/http_method.cpython-311.pyc rename to src/nestipy/common/__pycache__/http_method.cpython-311.pyc diff --git a/src/pesty/common/decorator/__init__.py b/src/nestipy/common/decorator/__init__.py similarity index 65% rename from src/pesty/common/decorator/__init__.py rename to src/nestipy/common/decorator/__init__.py index d18427d..f888af5 100644 --- a/src/pesty/common/decorator/__init__.py +++ b/src/nestipy/common/decorator/__init__.py @@ -1,12 +1,12 @@ from .controller import Controller from .inject import Inject from .module import Module -from .methods import Get, Post, Route, Put, Patch +from .methods import Get, Post, Route, Put, Patch, Delete from .dto import Dto from .injectable import Injectable -from .middleware import PestyMiddleware +from .middleware import NestipyMiddleware -__slots__ = [ +__all__ = [ 'Controller', 'Inject', 'Module', @@ -15,8 +15,8 @@ 'Route', 'Put', 'Patch', - 'HttpMethod', + 'Delete', 'Dto', - 'PestyMiddleware', + 'NestipyMiddleware', 'Injectable' ] diff --git a/src/nestipy/common/decorator/__pycache__/__init__.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8770342f46f56ce1acbde2d46496e4726cc32f8f GIT binary patch literal 771 zcmb7>KX2497{=|(-^*RDrF1|YSx^=-BO#VnAcj^a*t|p`wzz=b^U3j1-Nv_IXF&|C ze2$3eWOeJ*?WAs<@athBR|iR7I+=V5F!?N9m*IImO#o<7_uQ`EQ1jn!I+Kx^GN0}VH2-oxd;1f z-|Iv^f&+Fy$w$J|@02~}!}p}fu3RfpP@5gAxzS2Wq1|2lcK%5;2GyzJODT%j25*G1 z;Z$|TM(@vXA!5yY{Zz?*oI&C?Z;=IkttkVnl*S5kmxiJ3T^-5feo2a8?}Jthq1jt!&)-&fe0-;A?wpn}9Gg#k+rJ*nk`5 zgKW07!tOrLW^mu!x3Ec7)lyc~Pjc=0kek=#Oo1p(*J{zN%5$YZmy4B4otF!I^Rm;; zt!fm2+vcKCx^{_WRkichRMqpv>Lz`;E&fU$Ia~ZU-EW6YKq+05r~U4%$x**M5AD3@ g$$!k69QM2OQ0}vy?93+2M}rNy!`B2a{lr!O3mlrybpQYW literal 0 HcmV?d00001 diff --git a/src/pesty/common/decorator/__pycache__/controller.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/controller.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/controller.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/controller.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/dto.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/dto.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/dto.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/dto.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/inject.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/inject.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/inject.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/inject.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/injectable.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/injectable.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/injectable.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/injectable.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/methods.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/methods.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/methods.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/methods.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/middleware.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/middleware.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/middleware.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/middleware.cpython-311.pyc diff --git a/src/pesty/common/decorator/__pycache__/module.cpython-311.pyc b/src/nestipy/common/decorator/__pycache__/module.cpython-311.pyc similarity index 100% rename from src/pesty/common/decorator/__pycache__/module.cpython-311.pyc rename to src/nestipy/common/decorator/__pycache__/module.cpython-311.pyc diff --git a/src/pesty/common/decorator/controller.py b/src/nestipy/common/decorator/controller.py similarity index 90% rename from src/pesty/common/decorator/controller.py rename to src/nestipy/common/decorator/controller.py index bf6f9a4..fd44649 100644 --- a/src/pesty/common/decorator/controller.py +++ b/src/nestipy/common/decorator/controller.py @@ -1,4 +1,4 @@ -from pesty.core.utils import Utils +from nestipy.core.utils import Utils def Controller(path: str = '/', **kwargs): diff --git a/src/pesty/common/decorator/dto.py b/src/nestipy/common/decorator/dto.py similarity index 100% rename from src/pesty/common/decorator/dto.py rename to src/nestipy/common/decorator/dto.py diff --git a/src/pesty/common/decorator/inject.py b/src/nestipy/common/decorator/inject.py similarity index 100% rename from src/pesty/common/decorator/inject.py rename to src/nestipy/common/decorator/inject.py diff --git a/src/pesty/common/decorator/injectable.py b/src/nestipy/common/decorator/injectable.py similarity index 100% rename from src/pesty/common/decorator/injectable.py rename to src/nestipy/common/decorator/injectable.py diff --git a/src/pesty/common/decorator/methods.py b/src/nestipy/common/decorator/methods.py similarity index 92% rename from src/pesty/common/decorator/methods.py rename to src/nestipy/common/decorator/methods.py index cf17fc7..9b4cefa 100644 --- a/src/pesty/common/decorator/methods.py +++ b/src/nestipy/common/decorator/methods.py @@ -1,7 +1,7 @@ from typing import Callable -from pesty.common.http_method import HttpMethod -from pesty.core.utils import Utils +from nestipy.common.http_method import HttpMethod +from nestipy.core.utils import Utils class Route: diff --git a/src/pesty/common/decorator/middleware.py b/src/nestipy/common/decorator/middleware.py similarity index 92% rename from src/pesty/common/decorator/middleware.py rename to src/nestipy/common/decorator/middleware.py index d67c711..680e6f8 100644 --- a/src/pesty/common/decorator/middleware.py +++ b/src/nestipy/common/decorator/middleware.py @@ -2,7 +2,7 @@ from typing import Callable -class PestyMiddleware(ABC): +class NestipyMiddleware(ABC): middleware__ = True @abstractmethod diff --git a/src/pesty/common/decorator/module.py b/src/nestipy/common/decorator/module.py similarity index 100% rename from src/pesty/common/decorator/module.py rename to src/nestipy/common/decorator/module.py diff --git a/src/nestipy/common/enum/__init__.py b/src/nestipy/common/enum/__init__.py new file mode 100644 index 0000000..3419f8d --- /dev/null +++ b/src/nestipy/common/enum/__init__.py @@ -0,0 +1,5 @@ +from .platform import PlatFormType + +__all__ = [ + 'PlatFormType' +] diff --git a/src/nestipy/common/enum/__pycache__/__init__.cpython-311.pyc b/src/nestipy/common/enum/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..85e936ad34afbf602daca1d0b63205d598659f6b GIT binary patch literal 263 zcmZ3^%ge<81iL%$q`Cs>#~=<2FhLogC4h|S3@HpLj5!Rsj8Tk?3@J?Mj8RM}%)tzr zEH4>>(wdC7cmi?~OWg8{aziQ$Qj3^@f_|FJw>S!bqG>=;u*fa;`1r(}ocQ>a44*-! z|8msN$j?pHFDcF}N-eI`FV8Q^)-R|m$;i*sFGwvesnjnnN`|tM^K)~7!l`+sx%%<( znR%Hd@$q^EmA^P_a`RJ4b5iY!IDsaD98;_gBt9@RGBVy^P`ZGMKCm&c3V&c`;$~`K K2f-qCpjrTTr$!V2 literal 0 HcmV?d00001 diff --git a/src/pesty/common/enum/__pycache__/platform.cpython-311.pyc b/src/nestipy/common/enum/__pycache__/platform.cpython-311.pyc similarity index 100% rename from src/pesty/common/enum/__pycache__/platform.cpython-311.pyc rename to src/nestipy/common/enum/__pycache__/platform.cpython-311.pyc diff --git a/src/pesty/common/enum/platform.py b/src/nestipy/common/enum/platform.py similarity index 100% rename from src/pesty/common/enum/platform.py rename to src/nestipy/common/enum/platform.py diff --git a/src/pesty/common/http_method.py b/src/nestipy/common/http_method.py similarity index 100% rename from src/pesty/common/http_method.py rename to src/nestipy/common/http_method.py diff --git a/src/nestipy/common/templates/__pycache__/generator.cpython-311.pyc b/src/nestipy/common/templates/__pycache__/generator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b950a9430a938e9fc6ae12ce5eefaffd6798d129 GIT binary patch literal 2853 zcmb6bOK2NM^v!;xl`Thc?bNOv5N+Er#Z zR;TB1~&W_%^ z-@JJ<^WGahXliNzY>US4YO4V72P4W2X{W6Z;IIM;C?p0G?novG(p-#-^AkJ)4u(MC zuYw}n=Kvnz&utTeLPjAd{>8}QAh8?I>N6TO^th^9k&==#@FimXJR&Qg0$X5$`xI1O zMI+1wg}Vw9qUvD_-ADRSX$ruER}oMqp-kK+^C=#5!D}~vqQ(=ku%!;Ex=O>AL2X{u zXCkCx27qmud9wZsf)%i8WNC<2sK?|!;*TnH8sy5BQLlopmUmUN1lxxtRT)vSjMpC> zf&XBMue0RY$&vzi0s=dKPs|7_DzzIT;e=*|V_HhJ#h8&)Y0yiVx0Ja?nI*d+tSIuN z7PC;FH!VtiOvK^^4GE?in>5)8bZriWrj587vP_Mt=4>cw(2JqOtTk=up@eE$vmuj4 zN?62*$B}K7uEGpWl`o?&F>6b*tm&F1%c+iSm(^F6F$c_X1Pkz@WnZDCZTVD@=UN+H z0fN^IWQ0Yj=mB5TqV${8`K#1<{=C$mmHG>kzakmBH@Y^SlR|kZlr8sl zG!BuQ-^J zP_3mjUmsrt7JGbPRU!o-T8XS^IZeT;V72nqnpxE~EPoZRUrQ0DxHNZ{oQG>LCs={1 zURtQvJPvbWT3oG(<*IIde$IK)o(P8p1HY|NJ_>(!wzq`Qx6oOeOxoUvp<7JkMMjs~=q|*aOiQ(I4|F$0n^DE=!SGmsmo0lT zQlYJLCG|~ewdeZ$@_Z3^-ysKNh6;g}rDSG4GrxM|;f3shlh{#r$y%}s{?@NYz8bkP zl=C0V`wwQFUgSK!<`*q{mQO4X+~d}~4+3`sPo-Q}f4-~#hZEVB;b&tA+@2YH(Y$9# zx!$qdQ3S4O|BXw9j?O!WZyx@(_g3$cx6rn)C?eaDRRJbq(|%0EZGx(bgKcbVY~gGn zH~#iObNlVKY@oXc#MfK}1^@2MU}mt$BNxq>@8V(o_@3{~adaKPuA2meh@2o~T^Y1d-lHh0T=$A8m*@BG?l z59GV@)3My4)A>WEpZRj_=ko36e*P#Yjpe1WY`HtvG8}AR6^0cJtS}9-95tQgykkyzL?<0`(diu+o#_@T!Td~^k~@q^Wpf+lDWE%O=-YAqtld~K6@`s6#?cx kAqDU)I9~yp7M$-TbZ6^((X)>*|Nb4ma`>-zkUDPs13tBE8~^|S literal 0 HcmV?d00001 diff --git a/src/nestipy/common/templates/generator.py b/src/nestipy/common/templates/generator.py new file mode 100644 index 0000000..fc72528 --- /dev/null +++ b/src/nestipy/common/templates/generator.py @@ -0,0 +1,37 @@ +import os +import shutil + +from minijinja import Environment + + +class TemplateGenerator: + env: Environment + + def __init__(self): + self.env = Environment( + loader=self.loader + ) + self.env.add_filter('capitalize', str.capitalize) + self.env.add_filter('lower', str.lower) + + @classmethod + def loader(cls, name): + segments = [] + for segment in name.split("/"): + if "\\" in segment or segment in (".", ".."): + return None + segments.append(segment) + try: + path = os.path.join(os.path.dirname(__file__), 'views', *segments) + with open(path) as f: + content = f.read() + return content + except (IOError, OSError): + pass + + def render_template(self, template, **kwargs): + return self.env.render_template(template, **kwargs) + + @classmethod + def copy_project(cls, destination): + shutil.copytree(os.path.join(os.path.dirname(__file__), 'project'), destination) diff --git a/src/nestipy/common/templates/project/README.md b/src/nestipy/common/templates/project/README.md new file mode 100644 index 0000000..f6960e1 --- /dev/null +++ b/src/nestipy/common/templates/project/README.md @@ -0,0 +1,37 @@ +

+ Nestipy Logo +

+ +[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 +[circleci-url]: https://circleci.com/gh/nestjs/nest + +

A progressive Python framework for building efficient and scalable server-side applications.

+## Description + +[Nestipy](https://github.com/tsiresymila/nestipy) + +## Installation + +```bash +$ pip install -r requirements.txt +``` + +## Running the app + +```bash +# development +$ python main.py +``` + +## Support + +Nestipy is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestipy.com/support). + +## Stay in touch + +- Author - [Tsiresy Mila](https://tsiresymila.vercel.app.com) +- Website - [https://nestipy.com](https://nestipy.com/) + +## License + +Nest is [MIT licensed](LICENSE). \ No newline at end of file diff --git a/src/nestipy/common/templates/project/__pycache__/main.cpython-311.pyc b/src/nestipy/common/templates/project/__pycache__/main.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c11aaa0df7821338500b639309c367de418c0c9 GIT binary patch literal 608 zcmY*Uzl#$=6rS0cOg1_14vs^J9B5&aX4fttB1%9(IT5rm&9dx_WOKVa%k0Es140lB zOFJ#CPQ@!M{R^!3Bt;l30#LOcIjP5yi+sf=*iNX5nyp+&Xd)`Ucj>h>1352X(Bj zLOq(e>l|-$mv?ygc;kpd4_G6>fuGgZzw*~UJ?Uf9xu56zl1~!>!8Qa>MWM?FVWg!h zXKcT`5#~9hS~}K=Fm4c}VVniQ%(ebDBxmhgUVY+w*AaT&Cx(t?p$*NY(uOIK$dLCt zragTXM^a^Gt5A^#jX_%TDgvvRo!s(zP$0aQ4ZE_N8x|=MYGDX;So$nXMGzRGrrB3? zX1{U%$REp8__~OdC`$iOssleS^;l+pJ=F)o3lzyTg=a0&Jb|f&pDQ^Lk@oFxyu3Vj z?=)N8Rl6`6gB7pgIwct6CEA+TXN7K7mvxD}>awob-drx&-p3bT#uXc!u)%^2=43@S t-pziIUPXFKx;=mR_VN4fr{4G7AH1T&6FOYbA%I3t38L4aQ0>45{{bOKt@8i? literal 0 HcmV?d00001 diff --git a/src/nestipy/common/templates/project/main.py b/src/nestipy/common/templates/project/main.py new file mode 100644 index 0000000..0073a76 --- /dev/null +++ b/src/nestipy/common/templates/project/main.py @@ -0,0 +1,9 @@ +import uvicorn + +from src.app_module import AppModule +from nestipy.core.factory import AppNestipyFactory + +app = AppNestipyFactory.create(AppModule, title="My app") + +if __name__ == '__main__': + uvicorn.run('main:app', host="0.0.0.0", port=8000, reload=True) diff --git a/src/nestipy/common/templates/project/requirements.txt b/src/nestipy/common/templates/project/requirements.txt new file mode 100644 index 0000000..218f752 --- /dev/null +++ b/src/nestipy/common/templates/project/requirements.txt @@ -0,0 +1 @@ +nestipy==0.1.0 \ No newline at end of file diff --git a/src/pesty/common/__init__.py b/src/nestipy/common/templates/project/src/__init__.py similarity index 100% rename from src/pesty/common/__init__.py rename to src/nestipy/common/templates/project/src/__init__.py diff --git a/src/nestipy/common/templates/project/src/__pycache__/__init__.cpython-311.pyc b/src/nestipy/common/templates/project/src/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8451f93bdc7acf5ca66fe4d3acb74993b6b291b5 GIT binary patch literal 191 zcmZ3^%ge<81P7h&q=M+jAOZ#$p^VRLK*n^26oz01O-8?!3`I;p{%4TnuOR)5{M=Oi zlH$yw)Z$A0^8BJ~{esGpjQl+Pg4E)YO8w%ZWGE{+KQ|XBT#}kwkds)FTC87Cl%JKF zTmn`SAD@|*SrQ+wS5Wzj!zMRBr8Fniu80+A1;`P_{6OLZGb1D82L>2X#0(Sz0J=Id AK>z>% literal 0 HcmV?d00001 diff --git a/src/nestipy/common/templates/project/src/__pycache__/app_controller.cpython-311.pyc b/src/nestipy/common/templates/project/src/__pycache__/app_controller.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6a7ea3f17867cc1f91ddb53962209c12058bdfa GIT binary patch literal 2263 zcmb7F&ube;6rTO5l`PA#lXbB0!6wA6z-V!D=p{Ck7~Hg}3Ai?8DJ()WPMq#)x3jAj zJ1)q?6hli-1^cLz>*5}I?4KbSLBi65p_k_7;GA;md$W?Ajnd$ZMsMD{`QFUD@6F8q zHaM6gQ0{I2&3=&y`3F0_qIH!s7nD6h36)&pNw(z4w(Kdk;;FXkX}0F+wk{DWQ^n1A zhHXehCQLd2ucO{vU|A$o-62#vfOU@GpOiGp&Qg7ulrk@Hu%ySiyM8U=zUwj`D~l|O z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hJ<`Ge(LnY}j#U&k*OIv#2WvcX)Nj~&0#mW%#)RK#PvNRX31t&L{;Nd4@Y8|aO?rL`@PTi%7;7SlV{ls)r%?!d`KeBDP7V^LX<+hxn&}|p z&y?L?oAuZPdkNcG0r3-_1M+?S#=E^UFiGag(1v1qI^bGBL*pKL8AO9=WT@9c7|g8K zHSV2xX=3dD`i0Wyz>uz?SVIu+%0O_?ChOnzcwX-+WaLFLy*{bR(|(aJ*x1^v=Ks;d zas_&2sUl_7{>BA@x$9b?T&q#dDnZZ-V-*BhH3;HF_9N6+gWzR9jK+}_5rxLY3Qk<= zRoEiq#%jIcv~JJp>$vSE3LLu|pBuEsufYiq6ocQ~!SorGNqJ+$XlZjqK%8Zk^6aN zJ0IsAeG4FXdCU%o5vP=XCAYs6e=rTUdT{e_Yq&LHS15EaFHX_-8wK!UYja4~@E@a5 B6t4gP literal 0 HcmV?d00001 diff --git a/src/nestipy/common/templates/project/src/app_controller.py b/src/nestipy/common/templates/project/src/app_controller.py new file mode 100644 index 0000000..fc143db --- /dev/null +++ b/src/nestipy/common/templates/project/src/app_controller.py @@ -0,0 +1,23 @@ +from nestipy.common.decorator import Controller, Get, Inject, Post, Put, Delete +from .app_service import AppService + + +@Controller() +class AppController: + service: AppService = Inject(AppService) + + @Get() + async def get(self) -> str: + return await self.service.get() + + @Post() + async def post(self, data: str) -> str: + return await self.service.post(data=data) + + @Put('/{user_id}') + async def put(self, user_id: int, data: str) -> str: + return await self.service.put(id_=user_id, data=data) + + @Delete('/{user_id}') + async def delete(self, user_id: int) -> None: + await self.service.delete(id_=user_id) diff --git a/src/nestipy/common/templates/project/src/app_module.py b/src/nestipy/common/templates/project/src/app_module.py new file mode 100644 index 0000000..5fe51e6 --- /dev/null +++ b/src/nestipy/common/templates/project/src/app_module.py @@ -0,0 +1,11 @@ +from nestipy.common.decorator import Module +from .app_controller import AppController +from .app_service import AppService + + +@Module( + controllers=[AppController], + providers=[AppService] +) +class AppModule: + pass diff --git a/src/nestipy/common/templates/project/src/app_service.py b/src/nestipy/common/templates/project/src/app_service.py new file mode 100644 index 0000000..9fdce6b --- /dev/null +++ b/src/nestipy/common/templates/project/src/app_service.py @@ -0,0 +1,21 @@ +from nestipy.common.decorator import Injectable + + +@Injectable() +class AppService: + + @classmethod + async def get(cls): + return "test" + + @classmethod + async def post(cls, data: str): + return "test" + + @classmethod + async def put(cls, id_: int, data: str): + return "test" + + @classmethod + async def delete(cls, id_: int): + return "test" diff --git a/src/nestipy/common/templates/views/controller.txt b/src/nestipy/common/templates/views/controller.txt new file mode 100644 index 0000000..5722ad8 --- /dev/null +++ b/src/nestipy/common/templates/views/controller.txt @@ -0,0 +1,25 @@ +from nestipy.common.decorator import Controller, Get, Post, Put, Delete, Inject +from .{{name|lower}}_dto import Create{{name|capitalize}}Dto,Update{{name|capitalize}}Dto +from .{{name|lower}}_service import {{name|capitalize}}Service + + +@Controller('{{name|lower}}s') +class {{name|capitalize}}Controller: + + {{name|lower}}_service: {{name|capitalize}}Service = Inject({{name|capitalize}}Service) + + @Get() + async def list(self) -> str: + return await self.{{name|lower}}_service.list() + + @Post() + async def create(self, data: Create{{name|capitalize}}Dto) -> str: + return await self.{{name|lower}}_service.create(data) + + @Put('/{{name|lower}}_id') + async def update(self,{{name|lower}}_id: int, data: Update{{name|capitalize}}Dto) -> str: + return await self.{{name|lower}}_service.update({{name|lower}}_id,data) + + @Delete('/{{name|lower}}_id') + async def delete(self, {{name|lower}}_id: int) -> None: + return await self.{{name|lower}}_service.delete({{name|lower}}_id) \ No newline at end of file diff --git a/src/pesty/common/templates/views/dto.txt b/src/nestipy/common/templates/views/dto.txt similarity index 98% rename from src/pesty/common/templates/views/dto.txt rename to src/nestipy/common/templates/views/dto.txt index b3f5330..49f172b 100644 --- a/src/pesty/common/templates/views/dto.txt +++ b/src/nestipy/common/templates/views/dto.txt @@ -1,9 +1,11 @@ from dataclasses import dataclass + @dataclass class Create{{name|capitalize}}Dto: name: str + @dataclass class Update{{name|capitalize}}Dto(Create{{name|capitalize}}Dto): id: int \ No newline at end of file diff --git a/src/nestipy/common/templates/views/graphql_module.txt b/src/nestipy/common/templates/views/graphql_module.txt new file mode 100644 index 0000000..05c81ea --- /dev/null +++ b/src/nestipy/common/templates/views/graphql_module.txt @@ -0,0 +1,13 @@ +from nestipy.common.decorator import Module +from .{{name|lower}}_service import {{name|capitalize}}Service +from .{{name|lower}}_resolver import {{name|capitalize}}Resolver + + +@Module( + providers=[ + {{name|capitalize}}Service, + {{name|capitalize}}Resolver + ], +) +class {{name|capitalize}}Module: + pass \ No newline at end of file diff --git a/src/nestipy/common/templates/views/input.txt b/src/nestipy/common/templates/views/input.txt new file mode 100644 index 0000000..7e61365 --- /dev/null +++ b/src/nestipy/common/templates/views/input.txt @@ -0,0 +1,6 @@ +from nestipy.plugins.strawberry_module.decorator import Input + + +@Input() +class {{name|capitalize}}Input: + test: str diff --git a/src/pesty/common/templates/views/module.txt b/src/nestipy/common/templates/views/module.txt similarity index 85% rename from src/pesty/common/templates/views/module.txt rename to src/nestipy/common/templates/views/module.txt index 2b247c0..d18307a 100644 --- a/src/pesty/common/templates/views/module.txt +++ b/src/nestipy/common/templates/views/module.txt @@ -1,5 +1,8 @@ +from nestipy.common.decorator import Module from .{{name|lower}}_service import {{name|capitalize}}Service from .{{name|lower}}_controller import {{name|capitalize}}Controller + + @Module( providers=[{{name|capitalize}}Service], controllers=[{{name|capitalize}}Controller] diff --git a/src/nestipy/common/templates/views/resolver.txt b/src/nestipy/common/templates/views/resolver.txt new file mode 100644 index 0000000..6772c34 --- /dev/null +++ b/src/nestipy/common/templates/views/resolver.txt @@ -0,0 +1,20 @@ +import strawberry +from strawberry.types import Info +from nestipy.common.decorator import Inject +from nestipy.plugins.strawberry_module.decorator import Resolver, Query, Mutation +from .{{name|lower}}_input import {{name|capitalize}}Input +from .{{name|lower}}_service import {{name|capitalize}}Service + + +@Resolver() +class {{name|capitalize}}Resolver: + + {{name|lower}}_service: {{name|capitalize}}Service = Inject({{name|capitalize}}Service) + + @Query() + async def {{name|lower}}_test_query(self, root: Info) -> str: + return self.{{name|lower}}_service.list() + + @Mutation() + async def {{name|lower}}_test_mutation(self, root: Info, data: {{name|capitalize}}Input) -> str: + return data.test diff --git a/src/pesty/common/templates/views/service.txt b/src/nestipy/common/templates/views/service.txt similarity index 52% rename from src/pesty/common/templates/views/service.txt rename to src/nestipy/common/templates/views/service.txt index e1f18bd..4352ead 100644 --- a/src/pesty/common/templates/views/service.txt +++ b/src/nestipy/common/templates/views/service.txt @@ -1,14 +1,17 @@ +from nestipy.common.decorator import Injectable +from .{{name|lower}}_dto import Create{{name|capitalize}}Dto,Update{{name|capitalize}}Dto + @Injectable() class {{name|capitalize}}Service: async def list(self): - pass + return "test" async def create(self, data: Create{{name|capitalize}}Dto): - pass + return "test" async def update(self, id: int, data: Update{{name|capitalize}}Dto): - pass + return "test" async def delete(self, id: int): - pass \ No newline at end of file + return "test" \ No newline at end of file diff --git a/src/nestipy/common/templates/views/single_controller.txt b/src/nestipy/common/templates/views/single_controller.txt new file mode 100644 index 0000000..9b0a133 --- /dev/null +++ b/src/nestipy/common/templates/views/single_controller.txt @@ -0,0 +1,9 @@ +from nestipy.common.decorator import Controller, Get + + +@Controller('{{name|lower}}s') +class {{name}}Controller: + + @Get() + async def get(self) -> str: + return "test" diff --git a/src/nestipy/common/templates/views/single_module.txt b/src/nestipy/common/templates/views/single_module.txt new file mode 100644 index 0000000..6943501 --- /dev/null +++ b/src/nestipy/common/templates/views/single_module.txt @@ -0,0 +1,6 @@ +from nestipy.common.decorator import Module + + +@Module() +class {{name|capitalize}}Module: + pass \ No newline at end of file diff --git a/src/nestipy/common/templates/views/single_resolver.txt b/src/nestipy/common/templates/views/single_resolver.txt new file mode 100644 index 0000000..4c82a0d --- /dev/null +++ b/src/nestipy/common/templates/views/single_resolver.txt @@ -0,0 +1,15 @@ +import strawberry +from strawberry.types import Info +from nestipy.plugins.strawberry_module.decorator import Resolver, Query, Mutation + + +@Resolver() +class {{name|capitalize}}Resolver: + + @Query() + def {{name|lower}}_test_query(self, root: Info) -> str: + return "test" + + @Mutation() + def {{name|lower}}_test_mutation(self, root: Info, test: str) -> str: + return test diff --git a/src/nestipy/common/templates/views/single_service.txt b/src/nestipy/common/templates/views/single_service.txt new file mode 100644 index 0000000..f81c7a5 --- /dev/null +++ b/src/nestipy/common/templates/views/single_service.txt @@ -0,0 +1,8 @@ +from nestipy.common.decorator import Injectable + + +@Injectable() +class {{name|capitalize}}Service: + + async def test(self): + pass \ No newline at end of file diff --git a/src/pesty/core/__init__.py b/src/nestipy/core/__init__.py similarity index 50% rename from src/pesty/core/__init__.py rename to src/nestipy/core/__init__.py index 1bdae2c..ab8d8c2 100644 --- a/src/pesty/core/__init__.py +++ b/src/nestipy/core/__init__.py @@ -1,14 +1,14 @@ -from .factory import AppPestyFactory -from .app_context import AppPestyContext -from .ioc.container import PestyContainer +from .app_context import AppNestipyContext +from .factory import AppNestipyFactory +from .ioc.container import NestipyContainer from .module.compiler import ModuleCompiler from .platform.platform import PlatformAdapter from .platform.platform_litestar import PlatformLitestar -__slots__ = [ - 'AppPestyFactory', - 'AppPestyContext', - 'PestyContainer', +__all__ = [ + 'AppNestipyFactory', + 'AppNestipyContext', + 'NestipyContainer', 'ModuleCompiler', 'PlatformAdapter', 'PlatformLitestar' diff --git a/src/nestipy/core/__pycache__/__init__.cpython-311.pyc b/src/nestipy/core/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..378a3debed0e81ce330ed0dceca70bf8d444692c GIT binary patch literal 653 zcmY+Ay-UMD7{=dg+NK}YTHKr+3_`Pth)@bnDh0tI%Mp^)2Jd>u<^0IznUPtF|%ATV>uLgb)#+$U{i` z8mUpsvy8V$oi@CN@paOqwr3mPAT8SV+Qv6YhjzU#f;$N9cjWDats8LKziKKtsOXP4 zpG1jF$80X6XZb(6@B_(2s-oTP6+fOwLMK-&d?3-7Q63YM^e4oZQzqyr^tm+AUKw4+ zQqAy%(-d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>9XyG$!Q+ihq1~X>RbacZBQIi%L zc_6Eyb6V&ehD}EyT-u8MV&GQ;8*esVPr_XrlRv+_d3gh_JwNfChI#g!)xj)dZktC~ zC7MDLI77BEKUnZ9&XN;Ex(X3~!`WrUCEMl|44(~;5?3?BC0FAKV8vZ>(?tC#VFA}+ zCg^9IwmLR1 zu1)TSpM%5l_QD5+$FdrJSqr}m$ZQ4U#`}jVkX+VAC)LoD7Mj{4?)D))Ho6mgsT_Oh zG5UjwFM3duI``%|-XZ!|d-Nz>P$BLwqr!Hr%7QXkP{ z-F|CO3n4Suz82K$f#A;yKQ3%#)xaq&a7y71&Hsn@nt-*@w~;iz71k^tZMJcB!EpBA z*UG7ZVJ$GM@P}sewc;K0Bn)7*Br9P+GHLjd$?q+u%rDeXatax+)vd{7%KAzUMp}Z; zMEGIY`gDmxHluJW%5Yg7@{vCF|`WAb2F;3#E2SW%9Wa%a0!e3NX(B) zZO9?Ph)x2VL00Q7J=CcPgaEUO zGXhz4MxG3TIp;XA_KhUKaiESi33xd?-qz6w%XRM&oA7R~6Ev_&f-M}VsZF}v9Jmsj z1pPR;O?nw_7?iO}Tnu*_i_OH^9^908C%u3hWZJV6$V~$=T=0bjJ`Pe-GU#Cp4xDVZ zVh+O)_~i=u5i!4*8?nDaqqq#HqT+}Z4~|r$P*ciAhgnr^Uh9WAF!~OzgfBJLe;?+T zZNrht%Lf0|`~oM203;tzmO|Q@#vK9a3vT F;y<-MYoq`G literal 0 HcmV?d00001 diff --git a/src/pesty/core/__pycache__/factory.cpython-311.pyc b/src/nestipy/core/__pycache__/factory.cpython-311.pyc similarity index 100% rename from src/pesty/core/__pycache__/factory.cpython-311.pyc rename to src/nestipy/core/__pycache__/factory.cpython-311.pyc diff --git a/src/pesty/core/__pycache__/utils.cpython-311.pyc b/src/nestipy/core/__pycache__/utils.cpython-311.pyc similarity index 100% rename from src/pesty/core/__pycache__/utils.cpython-311.pyc rename to src/nestipy/core/__pycache__/utils.cpython-311.pyc diff --git a/src/pesty/core/app_context.py b/src/nestipy/core/app_context.py similarity index 91% rename from src/pesty/core/app_context.py rename to src/nestipy/core/app_context.py index f87dfa3..9cf646d 100644 --- a/src/pesty/core/app_context.py +++ b/src/nestipy/core/app_context.py @@ -1,6 +1,7 @@ import asyncio import inspect import logging +import traceback from typing import Any, Annotated from .utils import Utils @@ -17,7 +18,7 @@ logging.basicConfig(format=FORMAT, datefmt=DATE_FORMAT) -class AppPestyContext: +class AppNestipyContext: server_kwargs: dict adapter: PlatformAdapter compiler: ModuleCompiler @@ -47,7 +48,10 @@ async def __call__(self, scope, receive, send, **kwargs): # call middleware before response = await self.call_middleware(scope, receive, send) if not response: - await self.app(scope, receive, send) + if hasattr(self, 'app') and self.app is not None: + await self.app(scope, receive, send) + else: + raise Exception('Platform Handler not initialized') async def receive(self): await asyncio.sleep(0.001) @@ -69,7 +73,9 @@ async def setup(self): self.app = self.adapter.create_server(**self.kwargs) self.logger.info("Application initialized successfully.") except Exception as e: + tb = traceback.format_exc() logging.error(e) + logging.error(tb) raise e async def call_hooks(self, key): diff --git a/src/nestipy/core/factory.py b/src/nestipy/core/factory.py new file mode 100644 index 0000000..2af90ee --- /dev/null +++ b/src/nestipy/core/factory.py @@ -0,0 +1,11 @@ +import asyncio + +from ..common.enum.platform import PlatFormType +from ..core.app_context import AppNestipyContext + + +class AppNestipyFactory: + @staticmethod + def create(cls, platform=PlatFormType.LITESTAR, **kwargs)-> AppNestipyContext: + return AppNestipyContext(module=cls, platform=platform, **kwargs) + diff --git a/src/nestipy/core/ioc/__init__.py b/src/nestipy/core/ioc/__init__.py new file mode 100644 index 0000000..614d3d5 --- /dev/null +++ b/src/nestipy/core/ioc/__init__.py @@ -0,0 +1 @@ +from .container import NestipyContainer diff --git a/src/pesty/core/ioc/__pycache__/__init__.cpython-311.pyc b/src/nestipy/core/ioc/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/core/ioc/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/core/ioc/__pycache__/__init__.cpython-311.pyc diff --git a/src/pesty/core/ioc/__pycache__/container.cpython-311.pyc b/src/nestipy/core/ioc/__pycache__/container.cpython-311.pyc similarity index 100% rename from src/pesty/core/ioc/__pycache__/container.cpython-311.pyc rename to src/nestipy/core/ioc/__pycache__/container.cpython-311.pyc diff --git a/src/pesty/core/ioc/container.py b/src/nestipy/core/ioc/container.py similarity index 99% rename from src/pesty/core/ioc/container.py rename to src/nestipy/core/ioc/container.py index 9279c83..a667b29 100644 --- a/src/pesty/core/ioc/container.py +++ b/src/nestipy/core/ioc/container.py @@ -3,7 +3,7 @@ from ...common.decorator.inject import Inject -class PestyContainer: +class NestipyContainer: def __init__(self): self.dependencies = {} self.instances = {} diff --git a/src/pesty/core/module/__init__.py b/src/nestipy/core/module/__init__.py similarity index 100% rename from src/pesty/core/module/__init__.py rename to src/nestipy/core/module/__init__.py diff --git a/src/pesty/core/module/__pycache__/__init__.cpython-311.pyc b/src/nestipy/core/module/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/core/module/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/core/module/__pycache__/__init__.cpython-311.pyc diff --git a/src/nestipy/core/module/__pycache__/compiler.cpython-311.pyc b/src/nestipy/core/module/__pycache__/compiler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a34398d8f51c2641810fbd3c0e45bf3a2ec13cb5 GIT binary patch literal 16485 zcmb_DTWlLwb~AhqMT(?kSx@R|NfB*JwiH=@DY6|uVq3O0u`MN$V>2{|l4+BaGDADD zLM7V9yP*SbS6O6h0ZmaBNV7__X@u?WLO{2G+U|$?QDBA`K!a%w7-$3R0{u|n{RsA> z=s9;dA>4dzUb;Oy3YtjXIC(Fbu67ESi$-Cm7 zMCD{9kxjGRi@TeLNM5^S`&M?<>wEZ$u+0 z93lcGg$G~b^B52ec#Kk$G)qld#;K?^YGdhPD2>`7XTcn6g%#KoZ*dwYVv&?$n+>O~ zD;0^t&yg$ad{;Y2hPQYu2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TP2dnT4BVyz>0Z%1nl6`CxPF%xqHLI_9Z-fIMK=l_@ znlsWNTohA<`3U!0sE6`|habmN@LK|!mMQN7`ID)3!I)&KO(>ThQO$xeJ)(9B##Gu? zrWyoelBs=yF>N|1i+j^zp&J0jCE!ae`vU^lPmB9*gIcrVZ3_*%Q67Ft%Kxy%Te4~Y E2c%mS*#H0l literal 0 HcmV?d00001 diff --git a/src/nestipy/core/module/__pycache__/middleware.cpython-311.pyc b/src/nestipy/core/module/__pycache__/middleware.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..33168b66564e8273a01f520b8c32ee05fc0cc1ec GIT binary patch literal 1177 zcmc&zKX21O6n|$s!HsGaP>~8O0U;qT@fSb{)B#aMmuwNzDe_%Oik&lOhbmEq4jnpl z@5)rDx-j-*073$pkuMMwrcS(fjvdq%R-SXed-v}Bf0uWj*8n2xyNnsY4|AA)C1Us?-PH+{}0b#Ylx5H9EJNhy-x0TRg0y>spd(g3kh3E(yu_hd}t>xFB z_l1b$PFKryHAsiC)L|6?JrQr?nyn%n!h}tLBUg}sHXO4}pXF|-;-nu*?OVB%%4kd1 zQ6(koX7g-4=&4u+S=!e!9R)i|zY3C3)>DHZk!dyxQXS5@P-z*&N(>|1s?=J^D0eyU z5BeGBFdV~zt1>3k6^tS9_DKI-$ zZcXf$>pJkJzQx>?V6^cB?0>qU9FL&ChVP)sSo zCX#kZZ>4awr8L)Sn91?oOX@zSLtUTUL%{Ogfoo=7L_~dSUaW_7e zKTS{Ye|9CzbTsdZrkUjqN%RV`=X$Zas54Z9Osfdr+W7uI8?sPbLWlYq0ad)|*Xc10 zy0PRuZ*X4B1NmjnUk|%caifjZRkFH)a9kLh(P)~#0eULwQ-s~>n>ws^X9^Y6S?w94 zbA=Zrf83fBjc@#46@hM2G|JorKXV@x2|v`gP-ZfCjLg(#j7_a2MsY63pGN-cFSjPd EZ-vbaJpcdz literal 0 HcmV?d00001 diff --git a/src/pesty/core/module/__pycache__/pesty.cpython-311.pyc b/src/nestipy/core/module/__pycache__/pesty.cpython-311.pyc similarity index 100% rename from src/pesty/core/module/__pycache__/pesty.cpython-311.pyc rename to src/nestipy/core/module/__pycache__/pesty.cpython-311.pyc diff --git a/src/pesty/core/module/compiler.py b/src/nestipy/core/module/compiler.py similarity index 98% rename from src/pesty/core/module/compiler.py rename to src/nestipy/core/module/compiler.py index a4ca3bd..37dce1b 100644 --- a/src/pesty/core/module/compiler.py +++ b/src/nestipy/core/module/compiler.py @@ -5,7 +5,7 @@ from pyee import EventEmitter from .middleware import MiddlewareConsumer -from ..ioc import PestyContainer +from ..ioc import NestipyContainer from ..utils import Utils from ...common.decorator.injectable import Injectable @@ -22,7 +22,7 @@ class ModuleCompiler: def __init__(self, module: Callable): self.module = module - self.container = PestyContainer() + self.container = NestipyContainer() self.module_resolved = {} self.hooks = {} self.middlewares = [] @@ -198,7 +198,7 @@ def extract_middleware_of_module(self, module): module_middlewares += self.apply_middleware_to_ctrl(module, ctrl, middlewares) setattr(module, 'middlewares__', module_middlewares) - if hasattr(module, 'pesty_module__') and getattr(module, 'pesty_module__'): + if hasattr(module, 'nestipy_module__') and getattr(module, 'nestipy_module__'): if hasattr(module, 'configure'): c = self.middleware_consumer module_instance = module() diff --git a/src/pesty/core/module/middleware.py b/src/nestipy/core/module/middleware.py similarity index 100% rename from src/pesty/core/module/middleware.py rename to src/nestipy/core/module/middleware.py diff --git a/src/nestipy/core/module/pesty.py b/src/nestipy/core/module/pesty.py new file mode 100644 index 0000000..8a176af --- /dev/null +++ b/src/nestipy/core/module/pesty.py @@ -0,0 +1,8 @@ +from nestipy.core.module.middleware import MiddlewareConsumer + + +class NestipyModule: + nestipy_module__ = True + + def configure(self, consumer: MiddlewareConsumer): + pass diff --git a/src/pesty/core/module/type.py b/src/nestipy/core/module/type.py similarity index 100% rename from src/pesty/core/module/type.py rename to src/nestipy/core/module/type.py diff --git a/src/pesty/core/platform/__init__.py b/src/nestipy/core/platform/__init__.py similarity index 100% rename from src/pesty/core/platform/__init__.py rename to src/nestipy/core/platform/__init__.py diff --git a/src/pesty/core/platform/__pycache__/__init__.cpython-311.pyc b/src/nestipy/core/platform/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/core/platform/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/core/platform/__pycache__/__init__.cpython-311.pyc diff --git a/src/pesty/core/platform/__pycache__/platform.cpython-311.pyc b/src/nestipy/core/platform/__pycache__/platform.cpython-311.pyc similarity index 100% rename from src/pesty/core/platform/__pycache__/platform.cpython-311.pyc rename to src/nestipy/core/platform/__pycache__/platform.cpython-311.pyc diff --git a/src/pesty/core/platform/__pycache__/platform_litestar.cpython-311.pyc b/src/nestipy/core/platform/__pycache__/platform_litestar.cpython-311.pyc similarity index 76% rename from src/pesty/core/platform/__pycache__/platform_litestar.cpython-311.pyc rename to src/nestipy/core/platform/__pycache__/platform_litestar.cpython-311.pyc index dfc553d749d6c8b32ec200bcf0b586c860cb4b54..4abbcc8f99c3e0d8b2e9185ea62a4642dcd472f8 100644 GIT binary patch delta 510 zcmdm>w@aUIIWI340}!}W-$^aw-N>gW#Ki&RG6V7FXOrE8it9^QLGlog1ri5?8pdUe z3=FG*7y^o!QdsjCQy6NQnHWkqVWJESDeN_jS#T48Y&Mu&4RZ?H9OfFPC5(NH=%xiT zXma@7Vk<~2$(YP0tl}1;$$X0i#Jk0vQBqP6pPO2ek)KlJ2sEq64oGOS7YTvbQ6Rzq zNZb<6EKbfZ$}cU+%u7ux%}XxH%+H$~AS^1!a*H`Rr}!2d)Cf(G4v;y;EI>kGa;>l< zcP%pcx`FL{6l1@O@xn6tL?p{lEaEW~j~4-4M1V z{)URt2WB82EO^7r28mE>DgYN`d5Zu5 delta 381 zcmdm`zd?_0IWI340}#~q-AsMYvyo3vh>IP_Wd`EUTPC{+6}vGpl(2$SKtKvx4PzEa z77T!F78pB)bq-Sv(-Ou$#u~PVp@^s2)wAY%$0gldlRp zG8Rl07xC1(!SCN&dV$}6hT0t64Pjg2flMGe!3Lo(1cY7W55K}6et{!=^B$3SMkQv} z2*wW#Ao3$K1Djw=^amz{5LjZet=J64?8(=}rUW=MGJ;g&rY6)csJJ3-@DZZq3m%n4 IIzV>=0OVa?NdN!< diff --git a/src/pesty/core/platform/platform.py b/src/nestipy/core/platform/platform.py similarity index 100% rename from src/pesty/core/platform/platform.py rename to src/nestipy/core/platform/platform.py diff --git a/src/pesty/core/platform/platform_litestar.py b/src/nestipy/core/platform/platform_litestar.py similarity index 95% rename from src/pesty/core/platform/platform_litestar.py rename to src/nestipy/core/platform/platform_litestar.py index 69f4f68..d2f469b 100644 --- a/src/pesty/core/platform/platform_litestar.py +++ b/src/nestipy/core/platform/platform_litestar.py @@ -77,4 +77,6 @@ async def controller_to_litestar_controller(self, module): def controller_method_to_handler(cls, method): assert hasattr(method, "path__"), f'Path not exist for {method}.' kwargs = method.kwargs__ if hasattr(method, "kwargs__") else {} - return route(path=method.path__, http_method=method.method__, **kwargs)(method) + sync_to_thread = True if not inspect.iscoroutinefunction(method) else None + return route(path=method.path__, http_method=method.method__, + sync_to_thread=sync_to_thread, **kwargs)(method) diff --git a/src/pesty/core/utils.py b/src/nestipy/core/utils.py similarity index 100% rename from src/pesty/core/utils.py rename to src/nestipy/core/utils.py diff --git a/src/pesty/plugins/config_module/__init__.py b/src/nestipy/plugins/config_module/__init__.py similarity index 100% rename from src/pesty/plugins/config_module/__init__.py rename to src/nestipy/plugins/config_module/__init__.py diff --git a/src/pesty/plugins/config_module/__pycache__/__init__.cpython-311.pyc b/src/nestipy/plugins/config_module/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/config_module/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/plugins/config_module/__pycache__/__init__.cpython-311.pyc diff --git a/src/pesty/plugins/config_module/__pycache__/config_module.cpython-311.pyc b/src/nestipy/plugins/config_module/__pycache__/config_module.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/config_module/__pycache__/config_module.cpython-311.pyc rename to src/nestipy/plugins/config_module/__pycache__/config_module.cpython-311.pyc diff --git a/src/pesty/plugins/config_module/__pycache__/config_service.cpython-311.pyc b/src/nestipy/plugins/config_module/__pycache__/config_service.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/config_module/__pycache__/config_service.cpython-311.pyc rename to src/nestipy/plugins/config_module/__pycache__/config_service.cpython-311.pyc diff --git a/src/pesty/plugins/config_module/__pycache__/constant.cpython-311.pyc b/src/nestipy/plugins/config_module/__pycache__/constant.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/config_module/__pycache__/constant.cpython-311.pyc rename to src/nestipy/plugins/config_module/__pycache__/constant.cpython-311.pyc diff --git a/src/pesty/plugins/config_module/config_module.py b/src/nestipy/plugins/config_module/config_module.py similarity index 100% rename from src/pesty/plugins/config_module/config_module.py rename to src/nestipy/plugins/config_module/config_module.py diff --git a/src/pesty/plugins/config_module/config_service.py b/src/nestipy/plugins/config_module/config_service.py similarity index 100% rename from src/pesty/plugins/config_module/config_service.py rename to src/nestipy/plugins/config_module/config_service.py diff --git a/src/pesty/plugins/config_module/constant.py b/src/nestipy/plugins/config_module/constant.py similarity index 100% rename from src/pesty/plugins/config_module/constant.py rename to src/nestipy/plugins/config_module/constant.py diff --git a/src/pesty/plugins/database_module/__init__.py b/src/nestipy/plugins/database_module/__init__.py similarity index 100% rename from src/pesty/plugins/database_module/__init__.py rename to src/nestipy/plugins/database_module/__init__.py diff --git a/src/pesty/plugins/database_module/constant.py b/src/nestipy/plugins/database_module/constant.py similarity index 100% rename from src/pesty/plugins/database_module/constant.py rename to src/nestipy/plugins/database_module/constant.py diff --git a/src/pesty/plugins/database_module/database_module.py b/src/nestipy/plugins/database_module/database_module.py similarity index 100% rename from src/pesty/plugins/database_module/database_module.py rename to src/nestipy/plugins/database_module/database_module.py diff --git a/src/pesty/plugins/database_module/database_service.py b/src/nestipy/plugins/database_module/database_service.py similarity index 100% rename from src/pesty/plugins/database_module/database_service.py rename to src/nestipy/plugins/database_module/database_service.py diff --git a/src/pesty/plugins/dynamic_module/__init__.py b/src/nestipy/plugins/dynamic_module/__init__.py similarity index 100% rename from src/pesty/plugins/dynamic_module/__init__.py rename to src/nestipy/plugins/dynamic_module/__init__.py diff --git a/src/pesty/plugins/dynamic_module/__pycache__/__init__.cpython-311.pyc b/src/nestipy/plugins/dynamic_module/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/dynamic_module/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/plugins/dynamic_module/__pycache__/__init__.cpython-311.pyc diff --git a/src/pesty/plugins/dynamic_module/__pycache__/dynamic_module.cpython-311.pyc b/src/nestipy/plugins/dynamic_module/__pycache__/dynamic_module.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/dynamic_module/__pycache__/dynamic_module.cpython-311.pyc rename to src/nestipy/plugins/dynamic_module/__pycache__/dynamic_module.cpython-311.pyc diff --git a/src/pesty/plugins/dynamic_module/dynamic_module.py b/src/nestipy/plugins/dynamic_module/dynamic_module.py similarity index 100% rename from src/pesty/plugins/dynamic_module/dynamic_module.py rename to src/nestipy/plugins/dynamic_module/dynamic_module.py diff --git a/src/pesty/plugins/peewee_module/__init__.py b/src/nestipy/plugins/peewee_module/__init__.py similarity index 100% rename from src/pesty/plugins/peewee_module/__init__.py rename to src/nestipy/plugins/peewee_module/__init__.py diff --git a/src/pesty/plugins/peewee_module/__pycache__/__init__.cpython-311.pyc b/src/nestipy/plugins/peewee_module/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/peewee_module/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/plugins/peewee_module/__pycache__/__init__.cpython-311.pyc diff --git a/src/pesty/plugins/peewee_module/__pycache__/constant.cpython-311.pyc b/src/nestipy/plugins/peewee_module/__pycache__/constant.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/peewee_module/__pycache__/constant.cpython-311.pyc rename to src/nestipy/plugins/peewee_module/__pycache__/constant.cpython-311.pyc diff --git a/src/pesty/plugins/peewee_module/__pycache__/decorator.cpython-311.pyc b/src/nestipy/plugins/peewee_module/__pycache__/decorator.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/peewee_module/__pycache__/decorator.cpython-311.pyc rename to src/nestipy/plugins/peewee_module/__pycache__/decorator.cpython-311.pyc diff --git a/src/pesty/plugins/peewee_module/__pycache__/peewee_module.cpython-311.pyc b/src/nestipy/plugins/peewee_module/__pycache__/peewee_module.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/peewee_module/__pycache__/peewee_module.cpython-311.pyc rename to src/nestipy/plugins/peewee_module/__pycache__/peewee_module.cpython-311.pyc diff --git a/src/pesty/plugins/peewee_module/__pycache__/peewee_service.cpython-311.pyc b/src/nestipy/plugins/peewee_module/__pycache__/peewee_service.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/peewee_module/__pycache__/peewee_service.cpython-311.pyc rename to src/nestipy/plugins/peewee_module/__pycache__/peewee_service.cpython-311.pyc diff --git a/src/pesty/plugins/peewee_module/constant.py b/src/nestipy/plugins/peewee_module/constant.py similarity index 100% rename from src/pesty/plugins/peewee_module/constant.py rename to src/nestipy/plugins/peewee_module/constant.py diff --git a/src/pesty/plugins/peewee_module/decorator.py b/src/nestipy/plugins/peewee_module/decorator.py similarity index 100% rename from src/pesty/plugins/peewee_module/decorator.py rename to src/nestipy/plugins/peewee_module/decorator.py diff --git a/src/pesty/plugins/peewee_module/peewee_module.py b/src/nestipy/plugins/peewee_module/peewee_module.py similarity index 100% rename from src/pesty/plugins/peewee_module/peewee_module.py rename to src/nestipy/plugins/peewee_module/peewee_module.py diff --git a/src/pesty/plugins/peewee_module/peewee_service.py b/src/nestipy/plugins/peewee_module/peewee_service.py similarity index 100% rename from src/pesty/plugins/peewee_module/peewee_service.py rename to src/nestipy/plugins/peewee_module/peewee_service.py diff --git a/src/pesty/plugins/strawberry_module/__init__.py b/src/nestipy/plugins/strawberry_module/__init__.py similarity index 100% rename from src/pesty/plugins/strawberry_module/__init__.py rename to src/nestipy/plugins/strawberry_module/__init__.py diff --git a/src/pesty/plugins/strawberry_module/__pycache__/__init__.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/__pycache__/__init__.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/strawberry_module/__pycache__/__init__.cpython-311.pyc rename to src/nestipy/plugins/strawberry_module/__pycache__/__init__.cpython-311.pyc diff --git a/src/nestipy/plugins/strawberry_module/__pycache__/compiler.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/__pycache__/compiler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12e97396f39b92f339d30a51712c3de8668abd50 GIT binary patch literal 11253 zcmdryX>1!;dNU-4q$o;5-G?PvN+iW}borKJSx0;&*5SxfEJcw`)8t5^O^VbTDybD} zAuNn7T^NM|B#2OCQKHz*%9{icid|F-B!CK}fKe3a3^4_XDFhfO3UvERhVx^aU;Vx} zyoR)5CqRK>pGF_weDD0;cfR-LHzg%D1`=8Qcfnu9F#mxs>10Y}o=!vN6UNJUSwAzQ z{jxJGyc_(6fN{nY;AS`$@kYNnV41N%-sI){)zLD^n!O&lU0iY0+|%ox1}!8B*^8t<8AIIjsXW-kZOB3Qj64h1zzgU38DhD=Pu4tpHmJ*x~{#4_JEv)&ba(0&E#zOAD~&faMFY6@YaJMKJfW zg1J{hS$RQ=DsKfWdZo%=BJR+_lK)&V5c2s2;>qv@sK>k!{-0I?_=JhD5yk~MEqR#< z<{>)<%&-K4-etcaBJV`OKS%6PL&V0-&EH??UI+$+?y%@1f_S(4{UEv19l9G{2rhO5 zKf`ysMdC^2LjL7>-=f$phKc+ATLK|>U0ToGp49BRLU&cG%jH}2gHriSAd=_*qz)Rl}-r z)fC1xN~MV5Gw9>Bca=&=^MD7%v7G>i+S@w>P9~ zQ}GK^(uJvC7RN6Cp4;-tJ%dWmpj?-R6y^1im;ayATnd=j)MxAtmyy&HiICAwXQc%9g&NHi~h$)t%tLgrk zJd+ON)z5+uuCjT0$9WBTqjDg@h6vjST|GGPU@~F=2{w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odD!M ztWGt_vYLE=J?8Ql1?hQleR_&_uyLBrbS}W=NtvHiU}o0IKR-5?>duCr&+6w`{@mW4 z#cp&h)On(2Pis$>-O|Nta_^MV3u`{T55H4weu&@bo1bU?bLSb%jxn)=mBxG{rMun`v6*%%^4L)x<&yQy5PTFJq~QK# zIOwZN)-^>htiKE|my>*D`iKe@C7qBKO3z`uQAAQ8IZ9&RE>c|a2Vz`0@ z=`+B5p24E`86y~U(J%!*e<>0d-FF0!TNLmslSTO6AWTj{xysQC3DxFthkRkT-?t*b z=7QS&b5N|a3C93Y_@Pz$@(WF!h{plA=dD%v=2-Qw4$Axyg+G$uPsRCD+eVr1Q~17Z zF#iJy{&JkZEb}7@KO$L2sJx6htLdDyt0=n*KGSjgwHq+PL&x;99D;JAUA|#JplVl3 zsbe$~9>tIbtbvEV91IN9zeSC-e z`V4mPQWiWhLh-$KX@$K~16Ku6RvK7oOA`l2MgTH35n-oAEO!Lwc_dSW2y<$@Av#wG z&$1%`sx(zPLQ6+-O97>o8n_aiMMAeT*8BGe;zX}lK$B<6P87a_y2jKm3{XERp{*h7xva8Bme*a literal 0 HcmV?d00001 diff --git a/src/pesty/plugins/strawberry_module/__pycache__/constant.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/__pycache__/constant.cpython-311.pyc similarity index 100% rename from src/pesty/plugins/strawberry_module/__pycache__/constant.cpython-311.pyc rename to src/nestipy/plugins/strawberry_module/__pycache__/constant.cpython-311.pyc diff --git a/src/nestipy/plugins/strawberry_module/__pycache__/decorator.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/__pycache__/decorator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0dcee96c6090b1755941c03b5920ebc5c000f1b3 GIT binary patch literal 3992 zcmdT{&2Jk;6rb_#Iuqw(^DRW$Vjw9oN^FuA#AgMfQYi=vNDg2jtsL(*apSMdt{XY> zA%`AT3xC5}@*!Fj35gRoSMI4N-kY`8$+}I76(JaVf1aH;^Jd0J%eS z=^@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MX;Y=Dnj-* DG;TGcLt}7qy6yFq2X;prgj1nUYcr!WY_euMJ7g=-x zX|Z*r#kX06cHj-$Hhgwk43dTey#(kbacmoQvjcC~r2X1p0cBDzD4St?QE@a~b%9DQ z-n=?1pPQRKcWFL*>f-!D9?S?!IyN*Qh6*lG?thI5DK8XV z-L}+li6ORDy!Srvn+PL`(U8PqPGc~?#A@t1|JJSrjf0)>zHqICN!b?(c1y%k>5^KF z($w&t2mpa(U;>+8jV!`;#_T)4P>=8qHkKT!IrjRi+=^}Doa^WWJLTMco7~A2%kGM8 z<%-k;IftlCs%Vs!b<4>)?M=z1t(6SiC24ysTP%ZP!NzJVSZ z*%e|9mJtp;QX2?99eBwhF}{8y80<(xtJGlsfSrMnPQY#;77`ir+u+fib}S?T!YFDi z)z!FlBtI8BGz>lmbj^aWx&^`E(W$aSU=agcR(B%aQkzvVx zIvl4ZKn@-2(4sOn7Gw?0JKfS*e%hOyu1-$ZCZ~b_<5nndDFz9t^6>jsqdR;E@7@Z)CB*b3MNhDgRnX&hqO{D= zZ-uF_6|TF8K7_LWfcpY%a^Lb$ve^Rgkhff(Ou!66FA{L=IHjo|!-sAb9MvvjKSHpI z^?R6B8cTENy2qe}9_LC9ULEc0Y#5;?odtk@;Q?O<&OK0#AFIWWH4r;+pgx@5Jo&@P zt<#TBJe{fzpQ;U?@)CV|egDX#4;li@2&M%d%x4D3L9k6mDIB6e6Q0B=1WA>WWyP{= zNF}J&jx3Y+=nyT?ZP`I6xSw%)|tR3epCeqxQgWl-thQXDv_yGFl`o(XS^kI5ALh-RZR0odRehN+{YUU%;&8S_wA-$fH% zzh3VV?xK&pe!Y&eUU#pfaj(1Yazk)CFjIB@L$A9xM8t{>mSf;j>4le6_KE^rG_1Hj X5^5%r41~KEwmx}DrLX!71)1<4L)B4Q literal 0 HcmV?d00001 diff --git a/src/nestipy/plugins/strawberry_module/__pycache__/strawberry_module.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/__pycache__/strawberry_module.cpython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h6e^Ns2AUre`%9Jwrn^kIH~FXW#|BzkE5-ImD3Qc7gXKY6xApgl-N zgh(2^H9*4c;m)#0*%@epWcLq*x(ri85cMi$z%%3LM5ywsG&sWV#908d?UZIsns=Dt zIgH_tTyVTI$>?ktYO{9tM}^xdI65f8M;JzU@P}}=eb3IC;SWsvl0DF62#VlzzsA7L zj63B&J7HA+AL1pzPs!u=MR4wat-k+zy^~_L2vNel-;ao2l~+RB{E1xvIRvl!Do_X$ zL1>bp8h@H(%I~jDlJ)<4-5r=}l9&Dd+9Wx@zc$GgzrQxgWxu~R$#uWKHp$z5e{DsH zm~4rHa30_`K%U{)&qx5eVsd>vlvIeQ)Q)VP^o7y7Fxn7CTjHnycpW60Yg>1o;rP!; MaFHW};vCe!0eOTWq5uE@ literal 0 HcmV?d00001 diff --git a/src/pesty/plugins/strawberry_module/compiler.py b/src/nestipy/plugins/strawberry_module/compiler.py similarity index 100% rename from src/pesty/plugins/strawberry_module/compiler.py rename to src/nestipy/plugins/strawberry_module/compiler.py diff --git a/src/pesty/plugins/strawberry_module/constant.py b/src/nestipy/plugins/strawberry_module/constant.py similarity index 100% rename from src/pesty/plugins/strawberry_module/constant.py rename to src/nestipy/plugins/strawberry_module/constant.py diff --git a/src/pesty/plugins/strawberry_module/decorator.py b/src/nestipy/plugins/strawberry_module/decorator.py similarity index 96% rename from src/pesty/plugins/strawberry_module/decorator.py rename to src/nestipy/plugins/strawberry_module/decorator.py index 1ecdc84..366400c 100644 --- a/src/pesty/plugins/strawberry_module/decorator.py +++ b/src/nestipy/plugins/strawberry_module/decorator.py @@ -1,6 +1,6 @@ from strawberry import input, type as strawberry_type -from pesty.common.decorator import Injectable +from nestipy.common.decorator import Injectable class Resolver: diff --git a/src/pesty/plugins/strawberry_module/override/__init__.py b/src/nestipy/plugins/strawberry_module/override/__init__.py similarity index 100% rename from src/pesty/plugins/strawberry_module/override/__init__.py rename to src/nestipy/plugins/strawberry_module/override/__init__.py diff --git a/src/nestipy/plugins/strawberry_module/override/__pycache__/__init__.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/override/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9bec9210019ae342e20ecb5d0e4f755d1fe148fb GIT binary patch literal 197 zcmZ3^%ge<81cp(!Q$h4&5CH>>P{wCAAY(d13PUi1CZpd2>er~FM zNpWUTYH_80d45s0enDkPMt+`tL27YHrG9ZyGL%)2Q<|QcSFB%LQj}Pplv-3&8K0Y< zQks*hpI-*#Wu~O+$H!;pWtPOp>lIY~;;@0p+7+<^Edn{Em>)=dU}j`w{J;PsikN|7 E0Q4R-qyPW_ literal 0 HcmV?d00001 diff --git a/src/nestipy/plugins/strawberry_module/override/__pycache__/field.cpython-311.pyc b/src/nestipy/plugins/strawberry_module/override/__pycache__/field.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b13cc18fd3d8d3b1f7049dd1b49f62bc3882b3d2 GIT binary patch literal 2738 zcmcgu&2Jk;6rc6?w-e{XNz*jj=A(6z+NCWGpaLx+X-eC)ich@lxAAFlJs~AH@7I!gkJQ8YfYz(0q?Fz#_3?2~>(>XQ z0pLSwSR2&SQd%I?$6~NwL>tnFrD3iY)sE>S(uhF9M9rukH3kp-sOR4C<{>(Hn2Wm_ zYT~PyI<21hJSdH-o;=CSyg-AD;6xR}C|QbCEE(o^-?+Yf&GB9} zcAU_>qG`&yMjhYHqG>t7TS~cHG`5`3?J^oFniI;?`xR{qf@Y0s;#m@&64(j zvKNATjyShzNzRm6jRZ;5Q~Ss+c9i3958csc4pyY%ubsvSF1NT%ArWMO7@tiKs;| zvx*O3jR5fL5H(cnxi~_`EZH=Yj@JI2Mj%l$q zHUu)qw_Yk~Y#3N}40R@2IvBwM#;DL8nKf8$1oaV0%#UQ0Tk=R2nh+>tv)Ng(w0;lH zveshQ2~-_vZPEY;dO0h)u8yI`v6e;?FNMZZYfMCi6D<};PJmIX!i)`s3bq(LnCxCcgqObo^MqKCx8 z|1ui{Q%Hhnd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git a/src/pesty/plugins/strawberry_module/override/field.py b/src/nestipy/plugins/strawberry_module/override/field.py similarity index 100% rename from src/pesty/plugins/strawberry_module/override/field.py rename to src/nestipy/plugins/strawberry_module/override/field.py diff --git a/src/pesty/plugins/strawberry_module/override/resolver.py b/src/nestipy/plugins/strawberry_module/override/resolver.py similarity index 100% rename from src/pesty/plugins/strawberry_module/override/resolver.py rename to src/nestipy/plugins/strawberry_module/override/resolver.py diff --git a/src/pesty/plugins/strawberry_module/strawberry_middleware.py b/src/nestipy/plugins/strawberry_module/strawberry_middleware.py similarity index 89% rename from src/pesty/plugins/strawberry_module/strawberry_middleware.py rename to src/nestipy/plugins/strawberry_module/strawberry_middleware.py index 2836f57..49a7e3f 100644 --- a/src/pesty/plugins/strawberry_module/strawberry_middleware.py +++ b/src/nestipy/plugins/strawberry_module/strawberry_middleware.py @@ -5,7 +5,7 @@ from strawberry import Schema, type from strawberry.asgi import GraphQL -from pesty.common.decorator import PestyMiddleware, Inject +from nestipy.common.decorator import NestipyMiddleware, Inject from .constant import STRAWBERRY_MODULE_OPTION from .override.field import field @@ -20,7 +20,7 @@ def test(self) -> str: return 'Test ok' -class StrawberryMiddleware(PestyMiddleware): +class StrawberryMiddleware(NestipyMiddleware): option: 'StrawberryOption' = Inject(STRAWBERRY_MODULE_OPTION) def __init__(self): diff --git a/src/pesty/plugins/strawberry_module/strawberry_module.py b/src/nestipy/plugins/strawberry_module/strawberry_module.py similarity index 65% rename from src/pesty/plugins/strawberry_module/strawberry_module.py rename to src/nestipy/plugins/strawberry_module/strawberry_module.py index 539d5ab..109ada6 100644 --- a/src/pesty/plugins/strawberry_module/strawberry_module.py +++ b/src/nestipy/plugins/strawberry_module/strawberry_module.py @@ -2,13 +2,13 @@ from dataclasses import dataclass from typing import Any, Literal, Optional -from pesty.common.decorator import Module -from pesty.core.module.middleware import MiddlewareConsumer -from pesty.core.module.pesty import PestyModule -from pesty.plugins.dynamic_module.dynamic_module import DynamicModule -from pesty.plugins.strawberry_module.compiler import GraphqlCompiler -from pesty.plugins.strawberry_module.constant import STRAWBERRY_MODULE_OPTION -from pesty.plugins.strawberry_module.strawberry_middleware import StrawberryMiddleware +from nestipy.common.decorator import Module +from nestipy.core.module.middleware import MiddlewareConsumer +from nestipy.core.module.nestipy import NestipyModule +from nestipy.plugins.dynamic_module.dynamic_module import DynamicModule +from nestipy.plugins.strawberry_module.compiler import GraphqlCompiler +from nestipy.plugins.strawberry_module.constant import STRAWBERRY_MODULE_OPTION +from nestipy.plugins.strawberry_module.strawberry_middleware import StrawberryMiddleware @dataclass @@ -17,7 +17,7 @@ class StrawberryOption: @Module(providers=[]) -class StrawberryModule(DynamicModule, PestyModule): +class StrawberryModule(DynamicModule, NestipyModule): resolvers = [] @classmethod diff --git a/src/pesty/common/__pycache__/__init__.cpython-311.pyc b/src/pesty/common/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 1cd47f0a9dcf9b19b6b264984c4426f85b8ffc21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ3^%ge<81SfuOVsl}E0<@rU~`URCG8Tono1*yd)mHNd+$xv2uer_&MI6gizFS8^*Uaz3?7l%!5 heoARhs$CH)&@hm7#r#0x12ZEd;|B&9QN#=s0{~r?Dm?%I diff --git a/src/pesty/common/decorator/__pycache__/__init__.cpython-311.pyc b/src/pesty/common/decorator/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 306ffe5107ee12540a09f0630b11e06581080d61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 757 zcma)3KW`H;9Q`@I|H%;w3{^)KbPFeT#8OmXNEN~6|A{N z5M>K-+dUMpdDCbvjc%GBaOujx)k!^i2Qis`%4|V(*FP_NX~Wu diff --git a/src/pesty/common/templates/generator.py b/src/pesty/common/templates/generator.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/pesty/common/templates/views/controller.txt b/src/pesty/common/templates/views/controller.txt deleted file mode 100644 index ffe4b3d..0000000 --- a/src/pesty/common/templates/views/controller.txt +++ /dev/null @@ -1,24 +0,0 @@ - -from .dto import Create{{name|capitalize}}Dto),Update{{name|capitalize}}Dto) -from .{{name|lower}}_service import {{name|capitalize}}Service - -@Controller('{{name|lower}}') -class {{name}}Controller: - - {{name|lower}}_service: {{name|capitalize}}Service = Inject({{name|capitalize}}Service) - - @get() - async def list(self): - return await self.{{name|lower}}_service.list() - - @post() - async def create(self, data: Create{{name|capitalize}}Dto): - return await self.{{name|lower}}_service.create(data) - - @patch() - async def update(self,id, data: Update{{name|capitalize}}Dto): - return await self.{{name|lower}}_service.update(id,data) - - @delete() - async def delete(self, id): - return await self.{{name|lower}}_service.delete(id) \ No newline at end of file diff --git a/src/pesty/common/templates/views/entity.txt b/src/pesty/common/templates/views/entity.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/pesty/core/__pycache__/__init__.cpython-311.pyc b/src/pesty/core/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 7042ca7accdfa1d0c1ba2e2421aadda9b8229f67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 655 zcmY+Au}i~16vp2*ZPQp|EpE;Z2BBF+M9_khN}azp7X7?f`_WnG3T=+ zllf^FNhb3D(Ui?)@+eibVXo*tOy`Nv$vKPfNit=Wr^F|Z#`dVx)10@%pTiMqu5_7W}hMePQ1!8`y+>}KVofs4|r5aH~qv92g z8C#8cO*CnY*;H*e?O%>b4QMDT2jh$|nPL0^ON9kL2mURii7&HMBw6l1FmdPeT;8&| z&-Ls1nTTo^F_HKfr}I=|JmLAz;BZBEB(~Hj{qEVbl7)p3Dq*K+R|&gCyGrnic9pPK cw5x4h&q60d3%aWJEKm*J5mj4SJXv#F6B;pq8`FKQ{J>M z>Z6dr3XOcj9Q}eh2NXTRyP|&H9SzV(pcjK?f#4ScpL!n92t9(o5hz5X%ZT^hLAKW^D_n6VLhH7%%(Ctr%Ve^0To(ARD9DdcI{T)aOi5qi9wFtvo{GzpSuuTM zIVV8c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U67^%px560xyQ~qDMIxn?p(o0{#Pd AppPestyContext: - return AppPestyContext(module=cls, platform=platform, **kwargs) - diff --git a/src/pesty/core/ioc/__init__.py b/src/pesty/core/ioc/__init__.py deleted file mode 100644 index c5a2c38..0000000 --- a/src/pesty/core/ioc/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .container import PestyContainer diff --git a/src/pesty/core/module/__pycache__/compiler.cpython-311.pyc b/src/pesty/core/module/__pycache__/compiler.cpython-311.pyc deleted file mode 100644 index 9eaa7d78e091db8574c93ea96ed9396ad2cac87f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16414 zcmb_@X>1%KG4v7 zFy_PV{{FA}sH!Fv&+HT*|NZ*aJOA&0zt?|VSy{p137$3*f47I@{)N629&bML-IMao_{aUodqrPLmQ$j$ z*j{hETI65iVv%1_-O(6t1jLE-#AIqhmSZkMI5&|>OtKqUR1b9uU2N6^WqeyTdu?C?qzE z!X19RQVgI@l~@57M$KSZ&4?IEc*V+ucgiDHq3>!jDn`(Ozh~>(8;(UlJ3t2fYOfd69dG`+^^hRY*}3NhGk0z+{09jc}gw zLA`USTM5zdUZ0!0AxkY(*+-RKiG(CjW>*P2adg1A`wN%hkrSyY*11fJZEu%|vWUHs zv&nQkzEE$+c7NeTJ*vs00Lz?S7tMI?1s^r;RU2bkV+>!a^tO(SM-!s@?s|N!(3@N6 zYr~_O){px?=|_?O(Vim@M0L+eZO=)1)vmC_xMH%1Y4lIaV7u4F7$RN76ENpmpt@H>Gi1%Q5_o5 zhDOxx=e6$V*}F%(qpM@tm(|_-wB7qM7xdb?%yW8p*Gl@6h5H}; zVZyZaj4a!e;yzaPG&hd;UD1NF>K#A-Vbw8Ls4v6@|a4 z7)~YSG%5R23r8JTyEza0Dp9aJ%o+3#r{*RnQt~Ne3JnjUdzturnN#+Rn`!Ov!^00x zWxwQnUc!|bM1BmFYNgiv+JXo9AY#1r4U~6tp?25Jm~pZ zzjFA(#&_^l-7~HM3a@Lz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=0U+j{Iid(nI@{8({11HVLACe1)_We? zs75EX=p-ERo!xUj@Dc^z<8JiX!BxS@7l(K;cxt|*~aB-0TIE3uQR zFsuo~iZJ|3`iY9tyk89-(1Hix&?ES2FC9Fr_}hMyu}k z04YDh|C3h%^5<1M*%VyKI4`#@oYC`AU1of~43;I24)*6Id@u(cMWjmEJ&U|X^XGpX zxlrdY1M}r%@X18>&M;{0&zd&|m8wH()kUr9q9SaQ;GEohAA8S`5aTbHPA)I~2Xq&U zn)iZp!>53F;N`Z)Y#^2HMYQuR3S-Vp1>4= zX#y7r{FuO90^|}~><`9BMBmci6QDcGrd(;HTyp`?Jmp8&$YskPf)UFj%OgJ=(W`f_ z%xcx$iieWw>E81Ay~C^T;hKSW*a>R--I9@JENalN4kTJ!ylu>MA@{h`R`@g8|_9+c}nvOy6q?-3^m z1!+V(XsYy5RN4Yt{ay;ASzrwt*W-N|#U)r=4J!(26h!#J1zKvgP`iNA>`7(dM=}yi~n!o?_;ye^T4Ptg}GuUcoZnj@c;GlE@H>&ze z*F7W{{iZW$lAWCtalgxy=BK28LOl{GGJe(0;YR>GuX9z)>`&)96noOSc4fQtm}^n& z=`puYv8VF3I@hS!lg=Gc>}ku#xq@3R7vBgJmw~UT?AHXapRVAYMzdzc2QD7Fu|52n MmH&E&w`|k?AJ$3-qW}N^ diff --git a/src/pesty/core/module/__pycache__/middleware.cpython-311.pyc b/src/pesty/core/module/__pycache__/middleware.cpython-311.pyc deleted file mode 100644 index ad9726dccc603238d83d580317f7d45e11c30fa9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmc&zKX21O6n|$ssTw&oNKd^?b{N2S5=wHG%)&?J z3@msC0**njw-&$$d<*Jr482-vf`aq4|_Tc6$5`}A`E^5rLY_lvvxvHWS;y8kzbDAjQ_2om%i ztmn@OY^}PB)Hu~D#3UFg+;GZ zz$O8$`9%?&Ux=pL$$@s+JV!XHp1H$n59d%poz>cmZ;_%BWzAU{q@5~l=cQ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z+M~TgmfEAeLsr_a>K$^mJ=&pE$$D2dBq(d=;RVwEMSy}O>#cmsIcrGZ)AO+R0Se5Z Kz}bD_?*9O3-|RF1 diff --git a/src/pesty/plugins/strawberry_module/__pycache__/strawberry_module.cpython-311.pyc b/src/pesty/plugins/strawberry_module/__pycache__/strawberry_module.cpython-311.pyc deleted file mode 100644 index c5cee4ee3fbb5b43a98e70ddce50a45c583c66d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2517 zcma(S$!^<5bht^BL`9Bk*^ZM2ZdR)eBotjPZVY%$jMhpJr%RZFpps)*4Jj%^Dvk^} z5LzGHqCkC1jy}05>_dMchu*0`K?DK@3={?0Qx&*}Ag8_|wb44X!o=rK9QAQoXRhxS9e3_^P_yvCwyNDXfyHG)Gp zxC=V&!SLEHOndDGk_S|286~2BQA&bwxamR}rofV+mNX35;8I>yHN2K3c-APGB^?u> zMs8x$DtDNobLB!-&nq25>>9}ySMO`HhF;8TuE^-}?OW4d&dlGsbtkiQWA5|M<}){L z-d?P2rfW0hPx=*bz2)SyTg?NDiqCST8yQJqoy%r=5UNwDLwl;d*Ws0H^CC)xEgF zR^ieO*6KJOp$Y`N!tMgsUPqDv>P`<&_rwZgwT%JdKD*0;91O34YFye05o{XT18@R( zM6ir|xRBtSpoy)lWf4atIF~mq@LdR`V24vQlbisY3;-~x7USdNZ@x;c8ahr{W**Kf zr`8N|FI6mCt41MJq`^#?L}_6~t(40b%#_)QN=A3R(oabi%Z|8WkPI;lYyH%5HzwO# zt|}jcDphnC8L}g18lz)diw9zCo7=v-lcf#k!ywZpb{#5y)@?_z~yE9vrT5Pr+ zo3+K+BalRnsI)Rr>9`2UouGul#g9=4`NQ!|$MO4&ze+aP3cJ&L61~K2{=C`Xtaeqy zt|hjZU{cu%*B5GLhicT{3D)9 zd)OMYh8}Wv&>EBAX=Meyz?n|KR93N`T^Cb1uQU@Pp_aHw;sljep$<|KechZ`wpi54 z883h(3p=6thYEIU!V!ujU$7E_!<$%JA)}NZg5%XXIZc-gHmMsR^Tx+XoKiv%y_I~f zMDY4pU!HXKMu64a22e#!HV}#*j9hwZ?LV?drfMTo^^vKq>y7x^FXI=V$1m36m+SG% zTMGx$TQ7zto=*I_P?IL>(xfd-Hl(4K(uL>Jg&q0D`|~wvp)M`h?f&{8Hrhl?DBcAJ z(#h?2zQ6wC^)27`8d{SBPMA$<<+syg(`V7Mv*8(*do~f9zREqjDgdr@k_?zA{vC`X z>c>xENq+-S%S`$g0Aw7fCgo}QC2SNjrj;dDsknZ+&oSLiS1tl_f5KNq4N=uq&xnIg^-i{aSh@xdpQ^!#IDxuE<8K!`Si=3z65(O72 zpvSw>BTt#%;-v6%U=3`4jUkhi#FVXjwQcc}|qg#gmhrIw< zQn1`--udXiPVc?1Ybni0FO>f9z7aq1+%iQz02Z2^<{tnc`5C5xhHZa8Lo4A{p@a1{R^;6jXwYY diff --git a/tests/template.py b/tests/template.py new file mode 100644 index 0000000..e41fc22 --- /dev/null +++ b/tests/template.py @@ -0,0 +1,6 @@ +from nestipy.common.templates.generator import TemplateGenerator + +gen = TemplateGenerator() + +result = gen.render_template('controller.txt', name='Test') +print(result) \ No newline at end of file