zrb 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zrb/builtin/generator/fastapp/template/_automate/snake_zrb_app_name/_config.py +2 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/README.md +6 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/docker-compose.yml +26 -6
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/monitoring/frontend/nginx-config.conf +10 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/monitoring/otel-collector/otel-collector-config.yaml +39 -80
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/messagebus/__init__.py +27 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component/messagebus/kafka}/__init__.py +0 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/kafka/admin.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/kafka/consumer.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/kafka/publisher.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/messagebus.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/mock.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/rabbitmq/admin.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/rabbitmq/consumer.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/messagebus/rabbitmq/publisher.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/model/__init__.py +3 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/model/repo_model.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/repo/__init__.py +9 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/repo/db_repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/repo/repo.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/rpc/__init__.py +8 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/rpc/messagebus/caller.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/rpc/messagebus/server.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/schema/__init__.py +4 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/component/serializer/__init__.py +5 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/frontend/package.json +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core/rpc/messagebus → integration}/__init__.py +0 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/app.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/app_lifespan.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/app_state.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/db_connection.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/messagebus.py +12 -12
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/rpc.py +10 -10
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/main.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/api.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/__init__.py +25 -18
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/access_token/scheme.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/access_token/util.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/authorizer/rpc_authorizer.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/password_hasher/bcrypt_password_hasher.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/refresh_token/util.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/api.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/model.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/rpc.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/api.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/model.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/permission/rpc.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/table.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/api.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/model.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/repo.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/rpc.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/event.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/integration/__init__.py +19 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/access_token_scheme.py +6 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/access_token_util.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/authorizer.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/model/group_model.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/model/permission_model.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/model/user_model.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/integration/password_hasher.py +3 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/refresh_token_util.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/repo/group_repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/repo/permission_repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/repo/user_repo.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/migrate.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_module.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_permission.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/rpc.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/group.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/permission.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/user.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/api.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/component/__init__.py +0 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{core → component}/historical_repo_model.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/api.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/event.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/model.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/activity/rpc.py +4 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/entity/table.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/event.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/integration/__init__.py +3 -0
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{component → integration}/model/activity_model.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{component → integration}/repo/activity_repo.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/migrate.py +3 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/register_module.py +5 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/rpc.py +2 -2
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/schema/activity.py +1 -1
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/pyproject.toml +4 -4
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/api.py +5 -5
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/model.py +1 -1
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/repo.py +2 -2
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/snake_zrb_entity_name/rpc.py +4 -4
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/{component → integration}/model/snake_zrb_entity_name_model.py +4 -4
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/{component → integration}/repo/snake_zrb_entity_name_repo.py +2 -2
- zrb/builtin/generator/fastapp_crud/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/schema/snake_zrb_entity_name.py +1 -1
- zrb/builtin/generator/fastapp_module/helper.py +1 -0
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/api.py +3 -3
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/component/__init__.py +0 -3
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/entity/table.py +1 -1
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/event.py +2 -2
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/integration/__init__.py +3 -0
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/migrate.py +3 -3
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/register_module.py +5 -5
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/rpc.py +2 -2
- {zrb-0.8.0.dist-info → zrb-0.9.0.dist-info}/METADATA +1 -1
- {zrb-0.8.0.dist-info → zrb-0.9.0.dist-info}/RECORD +138 -139
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/messagebus/__init__.py +0 -22
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/model/__init__.py +0 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/repo/__init__.py +0 -9
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/rpc/__init__.py +0 -8
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/schema/__init__.py +0 -4
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/core/serializer/__init__.py +0 -5
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/frontend/package-lock.json +0 -3805
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/password_hasher.py +0 -3
- zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/core/__init__.py +0 -21
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/component/repo/__init__.py +0 -0
- zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/core/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/error.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core/messagebus/kafka → component/messagebus/rabbitmq}/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/repo/db_entity_mixin.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/repo/search_filter.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core/messagebus/rabbitmq → component/rpc/messagebus}/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/rpc/rpc.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/schema/base_schema.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{core → component}/serializer/serializer.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/frontend_index.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/log.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/access_token/_init_.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/authorizer/authorizer.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/password_hasher/password_hasher.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{core → component}/refresh_token/_init_.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/base.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/bearer_token_scheme.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/model/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/repo/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/{component → integration}/user.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{component → integration}/base.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{component → integration}/model/__init__.py +0 -0
- /zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/log/{component → integration}/repo/__init__.py +0 -0
- /zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/{component → integration}/base.py +0 -0
- /zrb/builtin/generator/{fastapp/template/src/kebab-zrb-app-name/src/module/log/core → fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/integration/model}/__init__.py +0 -0
- /zrb/builtin/generator/fastapp_module/template/src/kebab-zrb-app-name/src/module/snake_zrb_module_name/{component/model → integration/repo}/__init__.py +0 -0
- {zrb-0.8.0.dist-info → zrb-0.9.0.dist-info}/LICENSE +0 -0
- {zrb-0.8.0.dist-info → zrb-0.9.0.dist-info}/WHEEL +0 -0
- {zrb-0.8.0.dist-info → zrb-0.9.0.dist-info}/entry_points.txt +0 -0
@@ -1,15 +1,4 @@
|
|
1
|
-
from component.
|
2
|
-
from config import (
|
3
|
-
app_broker_type,
|
4
|
-
app_kafka_bootstrap_servers,
|
5
|
-
app_kafka_sasl_mechanism,
|
6
|
-
app_kafka_sasl_pass,
|
7
|
-
app_kafka_sasl_user,
|
8
|
-
app_kafka_security_protocol,
|
9
|
-
app_rmq_connection_string,
|
10
|
-
zrb_app_name,
|
11
|
-
)
|
12
|
-
from core.messagebus import (
|
1
|
+
from component.messagebus import (
|
13
2
|
Admin,
|
14
3
|
Consumer,
|
15
4
|
KafkaAdmin,
|
@@ -24,6 +13,17 @@ from core.messagebus import (
|
|
24
13
|
RMQConsumer,
|
25
14
|
RMQPublisher,
|
26
15
|
)
|
16
|
+
from config import (
|
17
|
+
app_broker_type,
|
18
|
+
app_kafka_bootstrap_servers,
|
19
|
+
app_kafka_sasl_mechanism,
|
20
|
+
app_kafka_sasl_pass,
|
21
|
+
app_kafka_sasl_user,
|
22
|
+
app_kafka_security_protocol,
|
23
|
+
app_rmq_connection_string,
|
24
|
+
zrb_app_name,
|
25
|
+
)
|
26
|
+
from integration.log import logger
|
27
27
|
|
28
28
|
|
29
29
|
def init_admin(default_admin: Admin) -> Admin:
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/{component → integration}/rpc.py
RENAMED
@@ -1,19 +1,19 @@
|
|
1
|
-
from component.
|
2
|
-
from component.
|
3
|
-
admin,
|
4
|
-
consumer,
|
5
|
-
message_serializer,
|
6
|
-
mock_consumer,
|
7
|
-
publisher,
|
8
|
-
)
|
1
|
+
from component.messagebus import KafkaConsumer, RMQConsumer
|
2
|
+
from component.rpc import Caller, MessagebusCaller, MessagebusServer, Server
|
9
3
|
from config import (
|
10
4
|
app_broker_type,
|
11
5
|
app_kafka_bootstrap_servers,
|
12
6
|
app_rmq_connection_string,
|
13
7
|
zrb_app_name,
|
14
8
|
)
|
15
|
-
from
|
16
|
-
from
|
9
|
+
from integration.log import logger
|
10
|
+
from integration.messagebus import (
|
11
|
+
admin,
|
12
|
+
consumer,
|
13
|
+
message_serializer,
|
14
|
+
mock_consumer,
|
15
|
+
publisher,
|
16
|
+
)
|
17
17
|
from ulid import ULID
|
18
18
|
|
19
19
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
3
|
+
from component.messagebus import Publisher
|
4
|
+
from component.rpc import Caller
|
5
5
|
from fastapi import FastAPI
|
6
|
-
from module.auth.
|
6
|
+
from module.auth.component import Authorizer
|
7
7
|
from module.auth.entity.group.api import register_api as register_group_api
|
8
8
|
from module.auth.entity.permission.api import register_api as register_permission_api
|
9
9
|
from module.auth.entity.user.api import register_api as register_user_api
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/component/__init__.py
CHANGED
@@ -1,19 +1,26 @@
|
|
1
|
-
from module.auth.component.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
from module.auth.component.
|
6
|
-
from module.auth.component.
|
7
|
-
from module.auth.component.
|
8
|
-
from module.auth.component.
|
1
|
+
from module.auth.component.access_token.scheme import (
|
2
|
+
AccessTokenScheme,
|
3
|
+
create_oauth2_bearer_access_token_scheme,
|
4
|
+
)
|
5
|
+
from module.auth.component.access_token.util import AccessTokenUtil, JWTAccessTokenUtil
|
6
|
+
from module.auth.component.authorizer.authorizer import Authorizer
|
7
|
+
from module.auth.component.authorizer.rpc_authorizer import RPCAuthorizer
|
8
|
+
from module.auth.component.password_hasher.bcrypt_password_hasher import (
|
9
|
+
BcryptPasswordHasher,
|
10
|
+
)
|
11
|
+
from module.auth.component.password_hasher.password_hasher import PasswordHasher
|
12
|
+
from module.auth.component.refresh_token.util import (
|
13
|
+
JWTRefreshTokenUtil,
|
14
|
+
RefreshTokenUtil,
|
15
|
+
)
|
9
16
|
|
10
|
-
assert
|
11
|
-
assert
|
12
|
-
assert
|
13
|
-
assert
|
14
|
-
assert
|
15
|
-
assert
|
16
|
-
assert
|
17
|
-
assert
|
18
|
-
assert
|
19
|
-
assert
|
17
|
+
assert Authorizer
|
18
|
+
assert RPCAuthorizer
|
19
|
+
assert PasswordHasher
|
20
|
+
assert BcryptPasswordHasher
|
21
|
+
assert AccessTokenScheme
|
22
|
+
assert create_oauth2_bearer_access_token_scheme
|
23
|
+
assert AccessTokenUtil
|
24
|
+
assert JWTAccessTokenUtil
|
25
|
+
assert RefreshTokenUtil
|
26
|
+
assert JWTRefreshTokenUtil
|
@@ -2,7 +2,7 @@ from typing import Callable, Optional
|
|
2
2
|
|
3
3
|
from fastapi import Depends
|
4
4
|
from fastapi.security import OAuth2PasswordBearer
|
5
|
-
from module.auth.
|
5
|
+
from module.auth.component.access_token.util import AccessTokenUtil
|
6
6
|
from module.auth.schema.token import AccessTokenData
|
7
7
|
from module.auth.schema.user import User
|
8
8
|
from starlette.requests import Request
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/api.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
3
|
+
from component.error import HTTPAPIException
|
4
|
+
from component.messagebus import Publisher
|
5
|
+
from component.rpc import Caller
|
6
6
|
from fastapi import Depends, FastAPI
|
7
|
-
from module.auth.component import
|
8
|
-
from module.auth.
|
7
|
+
from module.auth.component import Authorizer
|
8
|
+
from module.auth.integration import access_token_scheme
|
9
9
|
from module.auth.schema.group import Group, GroupData, GroupResult
|
10
10
|
from module.auth.schema.token import AccessTokenData
|
11
11
|
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/model.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
from module.auth.schema.group import Group, GroupData, GroupResult
|
2
|
-
from module.log.
|
2
|
+
from module.log.component.historical_repo_model import HistoricalRepoModel
|
3
3
|
|
4
4
|
|
5
5
|
class GroupModel(HistoricalRepoModel[Group, GroupData, GroupResult]):
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/repo.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
from abc import ABC
|
2
2
|
from typing import Any, Mapping
|
3
3
|
|
4
|
-
from
|
5
|
-
from module.auth.component import Base
|
4
|
+
from component.repo import DBEntityMixin, DBRepo, Repo
|
6
5
|
from module.auth.entity.permission.repo import DBEntityPermission
|
7
6
|
from module.auth.entity.table import group_permission
|
7
|
+
from module.auth.integration import Base
|
8
8
|
from module.auth.schema.group import Group, GroupData
|
9
9
|
from sqlalchemy import Column, String
|
10
10
|
from sqlalchemy.orm import Session, relationship
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/group/rpc.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
from typing import Any, Mapping
|
3
3
|
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from module.auth.
|
4
|
+
from component.messagebus import Publisher
|
5
|
+
from component.repo import SearchFilter
|
6
|
+
from component.rpc import Caller, Server
|
7
|
+
from module.auth.integration.model.group_model import group_model
|
8
8
|
from module.auth.schema.group import GroupData
|
9
9
|
from module.auth.schema.token import AccessTokenData
|
10
10
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
3
|
+
from component.error import HTTPAPIException
|
4
|
+
from component.messagebus import Publisher
|
5
|
+
from component.rpc import Caller
|
6
6
|
from fastapi import Depends, FastAPI
|
7
|
-
from module.auth.component import
|
8
|
-
from module.auth.
|
7
|
+
from module.auth.component import Authorizer
|
8
|
+
from module.auth.integration import access_token_scheme
|
9
9
|
from module.auth.schema.permission import Permission, PermissionData, PermissionResult
|
10
10
|
from module.auth.schema.token import AccessTokenData
|
11
11
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
from
|
1
|
+
from component.messagebus.messagebus import Publisher
|
2
2
|
from module.auth.entity.permission.repo import PermissionRepo
|
3
3
|
from module.auth.schema.permission import Permission, PermissionData, PermissionResult
|
4
|
-
from module.log.
|
4
|
+
from module.log.component.historical_repo_model import HistoricalRepoModel
|
5
5
|
|
6
6
|
|
7
7
|
class PermissionModel(
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
|
3
|
-
from
|
4
|
-
from module.auth.
|
3
|
+
from component.repo import DBEntityMixin, DBRepo, Repo
|
4
|
+
from module.auth.integration import Base
|
5
5
|
from module.auth.schema.permission import Permission, PermissionData
|
6
6
|
from sqlalchemy import Column, String
|
7
7
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
from typing import Any, Mapping
|
3
3
|
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from module.auth.
|
4
|
+
from component.messagebus import Publisher
|
5
|
+
from component.repo import SearchFilter
|
6
|
+
from component.rpc import Caller, Server
|
7
|
+
from module.auth.integration.model.permission_model import permission_model
|
8
8
|
from module.auth.schema.permission import PermissionData
|
9
9
|
from module.auth.schema.token import AccessTokenData
|
10
10
|
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/api.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
from typing import Annotated, List, Mapping
|
3
3
|
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
4
|
+
from component.error import HTTPAPIException
|
5
|
+
from component.messagebus import Publisher
|
6
|
+
from component.rpc import Caller
|
7
7
|
from fastapi import Depends, FastAPI
|
8
8
|
from fastapi.security import OAuth2PasswordRequestForm
|
9
|
-
from module.auth.component import
|
10
|
-
from module.auth.
|
9
|
+
from module.auth.component import Authorizer
|
10
|
+
from module.auth.integration import access_token_scheme, bearer_token_scheme
|
11
11
|
from module.auth.schema.request import IsAuthorizedRequest, RefreshTokenRequest
|
12
12
|
from module.auth.schema.token import AccessTokenData, TokenResponse
|
13
13
|
from module.auth.schema.user import User, UserData, UserLogin, UserResult
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/model.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
from typing import List, Mapping, Optional
|
2
2
|
|
3
|
-
from
|
4
|
-
from module.auth.
|
3
|
+
from component.messagebus.messagebus import Publisher
|
4
|
+
from module.auth.component import AccessTokenUtil, RefreshTokenUtil
|
5
5
|
from module.auth.entity.permission.model import PermissionModel
|
6
6
|
from module.auth.entity.user.repo import UserRepo
|
7
7
|
from module.auth.schema.token import AccessTokenData, RefreshTokenData, TokenResponse
|
8
8
|
from module.auth.schema.user import User, UserData, UserLogin, UserResult
|
9
|
-
from module.log.
|
9
|
+
from module.log.component.historical_repo_model import HistoricalRepoModel
|
10
10
|
|
11
11
|
|
12
12
|
class UserModel(HistoricalRepoModel[User, UserData, UserResult]):
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/repo.py
CHANGED
@@ -2,12 +2,12 @@ import logging
|
|
2
2
|
from abc import ABC, abstractmethod
|
3
3
|
from typing import Any, List, Mapping
|
4
4
|
|
5
|
-
from
|
6
|
-
from module.auth.component import
|
7
|
-
from module.auth.core import PasswordHasher
|
5
|
+
from component.repo import DBEntityMixin, DBRepo, Repo
|
6
|
+
from module.auth.component import PasswordHasher
|
8
7
|
from module.auth.entity.group.repo import DBEntityGroup
|
9
8
|
from module.auth.entity.permission.repo import DBEntityPermission
|
10
9
|
from module.auth.entity.table import user_group, user_permission
|
10
|
+
from module.auth.integration import Base
|
11
11
|
from module.auth.schema.user import User, UserData, UserLogin
|
12
12
|
from sqlalchemy import Column, String, or_
|
13
13
|
from sqlalchemy.engine import Engine
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/entity/user/rpc.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
from typing import Any, List, Mapping, Union
|
3
3
|
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from module.auth.
|
4
|
+
from component.messagebus import Publisher
|
5
|
+
from component.repo import SearchFilter
|
6
|
+
from component.rpc import Caller, Server
|
7
|
+
from module.auth.integration.model.user_model import user_model
|
8
8
|
from module.auth.schema.token import AccessTokenData
|
9
9
|
from module.auth.schema.user import UserData, UserLogin
|
10
10
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from module.auth.integration.access_token_scheme import access_token_scheme
|
2
|
+
from module.auth.integration.access_token_util import access_token_util
|
3
|
+
from module.auth.integration.authorizer import authorizer
|
4
|
+
from module.auth.integration.base import Base
|
5
|
+
from module.auth.integration.bearer_token_scheme import bearer_token_scheme
|
6
|
+
from module.auth.integration.password_hasher import password_hasher
|
7
|
+
from module.auth.integration.refresh_token_util import refresh_token_util
|
8
|
+
from module.auth.integration.user import admin_user, admin_user_password, guest_user
|
9
|
+
|
10
|
+
assert authorizer
|
11
|
+
assert Base
|
12
|
+
assert password_hasher
|
13
|
+
assert access_token_scheme
|
14
|
+
assert access_token_util
|
15
|
+
assert bearer_token_scheme
|
16
|
+
assert refresh_token_util
|
17
|
+
assert admin_user
|
18
|
+
assert admin_user_password
|
19
|
+
assert guest_user
|
@@ -1,7 +1,10 @@
|
|
1
1
|
from config import app_auth_access_token_cookie_key
|
2
|
-
from module.auth.component
|
3
|
-
|
4
|
-
|
2
|
+
from module.auth.component import (
|
3
|
+
AccessTokenScheme,
|
4
|
+
create_oauth2_bearer_access_token_scheme,
|
5
|
+
)
|
6
|
+
from module.auth.integration.access_token_util import access_token_util
|
7
|
+
from module.auth.integration.user import guest_user
|
5
8
|
|
6
9
|
access_token_scheme: AccessTokenScheme = (
|
7
10
|
create_oauth2_bearer_access_token_scheme( # noqa
|
@@ -3,7 +3,7 @@ from config import (
|
|
3
3
|
app_auth_jwt_token_algorithm,
|
4
4
|
app_auth_jwt_token_secret_key,
|
5
5
|
)
|
6
|
-
from module.auth.
|
6
|
+
from module.auth.component import AccessTokenUtil, JWTAccessTokenUtil
|
7
7
|
|
8
8
|
|
9
9
|
def init_token_util() -> AccessTokenUtil:
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from
|
2
|
-
from module.auth.component.repo.group_repo import group_repo
|
1
|
+
from integration.messagebus import publisher
|
3
2
|
from module.auth.entity.group.model import GroupModel
|
3
|
+
from module.auth.integration.repo.group_repo import group_repo
|
4
4
|
|
5
5
|
group_model: GroupModel = GroupModel(group_repo, publisher)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from
|
2
|
-
from module.auth.component.repo.permission_repo import permission_repo
|
1
|
+
from integration.messagebus import publisher
|
3
2
|
from module.auth.entity.permission.model import PermissionModel
|
3
|
+
from module.auth.integration.repo.permission_repo import permission_repo
|
4
4
|
|
5
5
|
permission_model: PermissionModel = PermissionModel(permission_repo, publisher)
|
@@ -1,14 +1,14 @@
|
|
1
|
-
from component.messagebus import publisher
|
2
1
|
from config import (
|
3
2
|
app_auth_access_token_expire_seconds,
|
4
3
|
app_auth_admin_active,
|
5
4
|
app_auth_refresh_token_expire_seconds,
|
6
5
|
)
|
7
|
-
from
|
8
|
-
from module.auth.component.model.permission_model import permission_model
|
9
|
-
from module.auth.component.repo.user_repo import user_repo
|
10
|
-
from module.auth.component.user import admin_user, admin_user_password, guest_user
|
6
|
+
from integration.messagebus import publisher
|
11
7
|
from module.auth.entity.user.model import UserModel
|
8
|
+
from module.auth.integration import access_token_util, refresh_token_util
|
9
|
+
from module.auth.integration.model.permission_model import permission_model
|
10
|
+
from module.auth.integration.repo.user_repo import user_repo
|
11
|
+
from module.auth.integration.user import admin_user, admin_user_password, guest_user
|
12
12
|
|
13
13
|
user_model: UserModel = UserModel(
|
14
14
|
repo=user_repo,
|
@@ -3,7 +3,7 @@ from config import (
|
|
3
3
|
app_auth_jwt_token_secret_key,
|
4
4
|
app_auth_refresh_token_type,
|
5
5
|
)
|
6
|
-
from module.auth.
|
6
|
+
from module.auth.component import JWTRefreshTokenUtil, RefreshTokenUtil
|
7
7
|
|
8
8
|
|
9
9
|
def init_token_util() -> RefreshTokenUtil:
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from
|
2
|
-
from
|
1
|
+
from integration.db_connection import engine
|
2
|
+
from integration.log import logger
|
3
3
|
from module.auth.entity.group.repo import GroupDBRepo, GroupRepo
|
4
4
|
|
5
5
|
group_repo: GroupRepo = GroupDBRepo(logger=logger, engine=engine)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
from
|
2
|
-
from
|
1
|
+
from integration.db_connection import engine
|
2
|
+
from integration.log import logger
|
3
3
|
from module.auth.entity.permission.repo import PermissionDBRepo, PermissionRepo
|
4
4
|
|
5
5
|
permission_repo: PermissionRepo = PermissionDBRepo(logger=logger, engine=engine)
|
@@ -1,7 +1,7 @@
|
|
1
|
-
from
|
2
|
-
from
|
3
|
-
from module.auth.component.password_hasher import password_hasher
|
1
|
+
from integration.db_connection import engine
|
2
|
+
from integration.log import logger
|
4
3
|
from module.auth.entity.user.repo import UserDBRepo, UserRepo
|
4
|
+
from module.auth.integration.password_hasher import password_hasher
|
5
5
|
|
6
6
|
user_repo: UserRepo = UserDBRepo(
|
7
7
|
logger=logger, engine=engine, password_hasher=password_hasher
|
@@ -1,8 +1,8 @@
|
|
1
|
-
from component.db_connection import engine
|
2
|
-
from component.log import logger
|
3
1
|
from config import app_enable_auth_module
|
4
2
|
from helper.migration import migrate
|
5
|
-
from
|
3
|
+
from integration.db_connection import engine
|
4
|
+
from integration.log import logger
|
5
|
+
from module.auth.integration import Base
|
6
6
|
from module.auth.register_permission import register_permission
|
7
7
|
|
8
8
|
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_module.py
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
from component.app import app
|
2
|
-
from component.log import logger
|
3
|
-
from component.messagebus import consumer, publisher
|
4
|
-
from component.rpc import rpc_caller, rpc_server
|
5
1
|
from config import (
|
6
2
|
app_enable_api,
|
7
3
|
app_enable_auth_module,
|
8
4
|
app_enable_event_handler,
|
9
5
|
app_enable_rpc_server,
|
10
6
|
)
|
7
|
+
from integration.app import app
|
8
|
+
from integration.log import logger
|
9
|
+
from integration.messagebus import consumer, publisher
|
10
|
+
from integration.rpc import rpc_caller, rpc_server
|
11
11
|
from module.auth.api import register_api
|
12
|
-
from module.auth.component import authorizer
|
13
12
|
from module.auth.event import register_event
|
13
|
+
from module.auth.integration import authorizer
|
14
14
|
from module.auth.rpc import register_rpc
|
15
15
|
|
16
16
|
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/register_permission.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import List, Optional
|
2
2
|
|
3
|
-
from module.auth.
|
3
|
+
from module.auth.integration.model.permission_model import permission_model
|
4
4
|
from module.auth.schema.permission import PermissionData
|
5
5
|
|
6
6
|
DEFAULT_ACTION_NAMES = ["get", "get_by_id", "insert", "update", "delete"]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
3
|
+
from component.messagebus import Publisher
|
4
|
+
from component.rpc import Caller, Server
|
5
5
|
from module.auth.entity.group.rpc import register_rpc as register_group_rpc
|
6
6
|
from module.auth.entity.permission.rpc import register_rpc as register_permission_rpc
|
7
7
|
from module.auth.entity.user.rpc import register_rpc as register_user_rpc
|
zrb/builtin/generator/fastapp/template/src/kebab-zrb-app-name/src/module/auth/schema/user.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import List
|
2
2
|
|
3
|
-
from
|
3
|
+
from component.schema import BaseCountSchema, BaseDateTimeSchema
|
4
4
|
from module.auth.schema.group import Group
|
5
5
|
from module.auth.schema.permission import Permission
|
6
6
|
from pydantic import BaseModel
|
@@ -1,9 +1,9 @@
|
|
1
1
|
from logging import Logger
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
3
|
+
from component.messagebus import Publisher
|
4
|
+
from component.rpc import Caller
|
5
5
|
from fastapi import FastAPI
|
6
|
-
from module.auth.
|
6
|
+
from module.auth.component import Authorizer
|
7
7
|
from module.log.entity.activity.api import register_api as register_activity_api
|
8
8
|
|
9
9
|
|