instant-python 0.9.2__py3-none-any.whl → 0.11.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.
- instant_python/commands/init.py +1 -1
- instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +11 -1
- instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +4 -0
- instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +9 -1
- instant_python/templates/boilerplate/event_bus/event_bus.py +4 -0
- instant_python/templates/boilerplate/event_bus/mock_event_bus.py +5 -0
- instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +16 -0
- instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +14 -1
- instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +19 -0
- instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +14 -0
- instant_python/templates/boilerplate/exceptions/domain_error.py +6 -1
- instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +6 -5
- instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +6 -4
- instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +7 -5
- instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +6 -4
- instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +8 -5
- instant_python/templates/boilerplate/exceptions/required_value_error.py +6 -4
- instant_python/templates/boilerplate/fastapi/application.py +10 -3
- instant_python/templates/boilerplate/fastapi/error_handlers.py +14 -2
- instant_python/templates/boilerplate/fastapi/fastapi_log_middleware.py +4 -0
- instant_python/templates/boilerplate/fastapi/lifespan.py +4 -0
- instant_python/templates/boilerplate/github/release.yml +18 -9
- instant_python/templates/boilerplate/logger/file_logger.py +4 -0
- instant_python/templates/boilerplate/logger/file_rotating_handler.py +4 -0
- instant_python/templates/boilerplate/persistence/alembic_migrator.py +4 -0
- instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +4 -0
- instant_python/templates/boilerplate/persistence/async/env.py +4 -0
- instant_python/templates/boilerplate/persistence/async/models_metadata.py +4 -0
- instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +10 -2
- instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +6 -0
- instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +11 -0
- instant_python/templates/boilerplate/pyproject.toml +17 -0
- instant_python/templates/boilerplate/scripts/insert_template.py +3 -3
- instant_python/templates/boilerplate/scripts/makefile +4 -4
- instant_python/templates/boilerplate/value_object/aggregate.py +4 -0
- instant_python/templates/boilerplate/value_object/int_primitives_mother.py +4 -0
- instant_python/templates/boilerplate/value_object/int_value_object.py +8 -0
- instant_python/templates/boilerplate/value_object/string_primitives_mother.py +4 -0
- instant_python/templates/boilerplate/value_object/string_value_object.py +7 -0
- instant_python/templates/boilerplate/value_object/test_int_value_object.py +16 -0
- instant_python/templates/boilerplate/value_object/test_string_value_object.py +13 -0
- instant_python/templates/boilerplate/value_object/test_uuid_value_object.py +16 -0
- instant_python/templates/boilerplate/value_object/uuid.py +8 -0
- instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py +4 -0
- instant_python/templates/project_structure/makefile.yml.j2 +1 -27
- instant_python/templates/project_structure/value_objects.yml.j2 +1 -1
- {instant_python-0.9.2.dist-info → instant_python-0.11.0.dist-info}/METADATA +1 -1
- {instant_python-0.9.2.dist-info → instant_python-0.11.0.dist-info}/RECORD +52 -52
- /instant_python/templates/boilerplate/exceptions/{error.py → base_error.py} +0 -0
- {instant_python-0.9.2.dist-info → instant_python-0.11.0.dist-info}/WHEEL +0 -0
- {instant_python-0.9.2.dist-info → instant_python-0.11.0.dist-info}/entry_points.txt +0 -0
- {instant_python-0.9.2.dist-info → instant_python-0.11.0.dist-info}/licenses/LICENSE +0 -0
instant_python/commands/init.py
CHANGED
|
@@ -48,9 +48,9 @@ def create_new_project(
|
|
|
48
48
|
formatter = ProjectFormatter(project_directory=configuration.project_folder_name)
|
|
49
49
|
formatter.format()
|
|
50
50
|
|
|
51
|
+
configuration.save_on_project_folder()
|
|
51
52
|
git_configurer = GitConfigurer(project_directory=configuration.project_folder_name)
|
|
52
53
|
git_configurer.setup_repository(configuration.git)
|
|
53
|
-
configuration.save_on_project_folder()
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
if __name__ == "__main__":
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
+
{% if template_domain_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
|
|
6
7
|
DomainEventSubscriber,
|
|
7
8
|
)
|
|
8
|
-
from {{ general.source_name }}.{{ template_domain_import }}.
|
|
9
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_event_type_not_found_error import (
|
|
9
10
|
DomainEventTypeNotFoundError,
|
|
10
11
|
)
|
|
12
|
+
{% else %}
|
|
13
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
14
|
+
from {{ general.source_name }}.event.domain_event_subscriber import (
|
|
15
|
+
DomainEventSubscriber,
|
|
16
|
+
)
|
|
17
|
+
from {{ general.source_name }}.errors.domain_event_type_not_found_error import (
|
|
18
|
+
DomainEventTypeNotFoundError,
|
|
19
|
+
)
|
|
20
|
+
{% endif %}
|
|
11
21
|
|
|
12
22
|
|
|
13
23
|
class DomainEventJsonDeserializer:
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
import json
|
|
3
3
|
|
|
4
|
+
{% if template_domain_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
8
|
+
{% endif %}
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class DomainEventJsonSerializer:
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
{% if pythono_version in ["3.12", "3.13"] %}
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
|
|
5
|
+
{% if template_domain_import %}
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
7
|
+
{% else %}
|
|
8
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
9
|
+
{% endif %}
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
class DomainEventSubscriber[EventType: DomainEvent](ABC):
|
|
@@ -18,7 +22,11 @@ class DomainEventSubscriber[EventType: DomainEvent](ABC):
|
|
|
18
22
|
from abc import ABC, abstractmethod
|
|
19
23
|
from typing import Generic, TypeVar
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
{% if template_domain_import %}
|
|
26
|
+
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
27
|
+
{% else %}
|
|
28
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
29
|
+
{% endif %}
|
|
22
30
|
|
|
23
31
|
EventType = TypeVar("EventType", bound=DomainEvent)
|
|
24
32
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
|
|
4
|
+
{% if template_domain_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
8
|
+
{% endif %}
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class EventBus(ABC):
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
from unittest.mock import AsyncMock
|
|
3
3
|
|
|
4
|
+
{% if template_domain_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.event.event_bus import EventBus
|
|
7
|
+
{% else %}
|
|
8
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
9
|
+
from {{ general.source_name }}.event.event_bus import EventBus
|
|
10
|
+
{% endif %}
|
|
6
11
|
|
|
7
12
|
|
|
8
13
|
class MockEventBus(EventBus):
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
3
3
|
|
|
4
|
+
{% if template_domain_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
|
|
6
7
|
DomainEventSubscriber,
|
|
7
8
|
)
|
|
9
|
+
{% else %}
|
|
10
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
11
|
+
from {{ general.source_name }}.event.domain_event_subscriber import (
|
|
12
|
+
DomainEventSubscriber,
|
|
13
|
+
)
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% if template_infra_import %}
|
|
8
16
|
from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_connection import (
|
|
9
17
|
RabbitMqConnection,
|
|
10
18
|
)
|
|
11
19
|
from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
|
|
12
20
|
RabbitMqQueueFormatter,
|
|
13
21
|
)
|
|
22
|
+
{% else %}
|
|
23
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_connection import (
|
|
24
|
+
RabbitMqConnection,
|
|
25
|
+
)
|
|
26
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
|
|
27
|
+
RabbitMqQueueFormatter,
|
|
28
|
+
)
|
|
29
|
+
{% endif %}
|
|
14
30
|
|
|
15
31
|
|
|
16
32
|
class RabbitMqConfigurer:
|
|
@@ -5,13 +5,26 @@ from typing import Callable
|
|
|
5
5
|
import pika
|
|
6
6
|
from pika.adapters.blocking_connection import BlockingChannel
|
|
7
7
|
|
|
8
|
+
{% if template_domain_import %}
|
|
8
9
|
from {{ general.source_name }}.{{ template_domain_import }}.event.exchange_type import ExchangeType
|
|
9
|
-
from {{ general.source_name }}.{{ template_domain_import }}.
|
|
10
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.rabbit_mq_connection_not_established_error import (
|
|
10
11
|
RabbitMqConnectionNotEstablishedError,
|
|
11
12
|
)
|
|
13
|
+
{% else %}
|
|
14
|
+
from {{ general.source_name }}.event.exchange_type import ExchangeType
|
|
15
|
+
from {{ general.source_name }}.errors.rabbit_mq_connection_not_established_error import (
|
|
16
|
+
RabbitMqConnectionNotEstablishedError,
|
|
17
|
+
)
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% if template_infra_import %}
|
|
12
20
|
from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_settings import (
|
|
13
21
|
RabbitMqSettings,
|
|
14
22
|
)
|
|
23
|
+
{% else %}
|
|
24
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_settings import (
|
|
25
|
+
RabbitMqSettings,
|
|
26
|
+
)
|
|
27
|
+
{% endif %}
|
|
15
28
|
|
|
16
29
|
|
|
17
30
|
class RabbitMqConnection:
|
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
from pika.adapters.blocking_connection import BlockingChannel
|
|
4
4
|
from pika.spec import Basic, BasicProperties
|
|
5
5
|
|
|
6
|
+
{% if template_domain_import %}
|
|
6
7
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
7
8
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
|
|
8
9
|
DomainEventSubscriber,
|
|
9
10
|
)
|
|
11
|
+
{% else %}
|
|
12
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
13
|
+
from {{ general.source_name }}.event.domain_event_subscriber import (
|
|
14
|
+
DomainEventSubscriber,
|
|
15
|
+
)
|
|
16
|
+
{% endif %}
|
|
17
|
+
{% if template_infra_import %}
|
|
10
18
|
from {{ general.source_name }}.{{ template_infra_import }}.event.domain_event_json_deserializer import (
|
|
11
19
|
DomainEventJsonDeserializer,
|
|
12
20
|
)
|
|
@@ -16,6 +24,17 @@ from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbi
|
|
|
16
24
|
from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
|
|
17
25
|
RabbitMqQueueFormatter,
|
|
18
26
|
)
|
|
27
|
+
{% else %}
|
|
28
|
+
from {{ general.source_name }}.event.domain_event_json_deserializer import (
|
|
29
|
+
DomainEventJsonDeserializer,
|
|
30
|
+
)
|
|
31
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_connection import (
|
|
32
|
+
RabbitMqConnection,
|
|
33
|
+
)
|
|
34
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
|
|
35
|
+
RabbitMqQueueFormatter,
|
|
36
|
+
)
|
|
37
|
+
{% endif %}
|
|
19
38
|
|
|
20
39
|
|
|
21
40
|
class RabbitMqConsumer:
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
3
|
+
{% if template_domain_import %}
|
|
3
4
|
from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.event.event_bus import EventBus
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.event.domain_event import DomainEvent
|
|
8
|
+
from {{ general.source_name }}.event.event_bus import EventBus
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% if template_infra_import %}
|
|
5
11
|
from {{ general.source_name }}.{{ template_infra_import }}.event.domain_event_json_serializer import (
|
|
6
12
|
DomainEventJsonSerializer,
|
|
7
13
|
)
|
|
8
14
|
from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_connection import (
|
|
9
15
|
RabbitMqConnection,
|
|
10
16
|
)
|
|
17
|
+
{% else %}
|
|
18
|
+
from {{ general.source_name }}.event.domain_event_json_serializer import (
|
|
19
|
+
DomainEventJsonSerializer,
|
|
20
|
+
)
|
|
21
|
+
from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_connection import (
|
|
22
|
+
RabbitMqConnection,
|
|
23
|
+
)
|
|
24
|
+
{% endif %}
|
|
11
25
|
|
|
12
26
|
|
|
13
27
|
class RabbitMqEventBus(EventBus):
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
2
|
+
{% if template_infra_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.base_error import BaseError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.base_error import BaseError
|
|
6
|
+
{% endif %}
|
|
7
|
+
|
|
3
8
|
|
|
4
9
|
class DomainError(Error):
|
|
5
10
|
...
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
{% if template_domain_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
6
|
+
{% endif %}
|
|
4
7
|
|
|
5
8
|
class DomainEventTypeNotFoundError(DomainError):
|
|
6
9
|
def __init__(self, name: str) -> None:
|
|
7
|
-
|
|
8
|
-
self._type = "domain_event_type_not_found"
|
|
9
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
10
|
+
super().__init__(message=f"Event type {name} not found among subscriber.", error_type="domain_event_type_not_found",)
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
2
|
from typing import TypeVar
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
{% if template_domain_import %}
|
|
5
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
8
|
+
{% endif %}
|
|
5
9
|
|
|
6
10
|
T = TypeVar("T")
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
class IncorrectValueTypeError(DomainError):
|
|
10
14
|
def __init__(self, value: T) -> None:
|
|
11
|
-
|
|
12
|
-
self._type = "incorrect_value_type"
|
|
13
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
15
|
+
super().__init__(message=f"Value '{value}' is not of type {type(value).__name__}", error_type="incorrect_value_type", )
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
2
|
+
{% if template_domain_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class InvalidIdFormatError(DomainError):
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
self._type = "invalid_id_format"
|
|
9
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
super().__init__(message="User id must be a valid UUID", error_type="invalid_id_format",)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
2
|
+
{% if template_domain_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class InvalidNegativeValueError(DomainError):
|
|
6
10
|
def __init__(self, value: int) -> None:
|
|
7
|
-
|
|
8
|
-
self._type = "invalid_negative_value"
|
|
9
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
11
|
+
super().__init__(message=f"Invalid negative value: {value}", error_type="invalid_negative_value",)
|
instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
2
|
+
{% if template_domain_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
6
|
+
{% endif %}
|
|
7
|
+
|
|
3
8
|
|
|
4
9
|
|
|
5
10
|
class RabbitMqConnectionNotEstablishedError(DomainError):
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
self._type = "rabbit_mq_connection"
|
|
9
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
11
|
+
def __init__(self) -> None:
|
|
12
|
+
super().__init__(message="RabbitMQ connection not established.", error_type="rabbit_mq_connection",)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
-
|
|
2
|
+
{% if template_domain_import %}
|
|
3
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
4
|
+
{% else %}
|
|
5
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class RequiredValueError(DomainError):
|
|
6
10
|
def __init__(self) -> None:
|
|
7
|
-
|
|
8
|
-
self._type = "required_value"
|
|
9
|
-
super().__init__(message=self._message, error_type=self._type)
|
|
11
|
+
super().__init__(message="Value is required, can't be None", error_type="required_value",)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
3
3
|
from fastapi import FastAPI
|
|
4
4
|
{% if "logger" in template.built_in_features %}
|
|
5
|
-
from fastapi.
|
|
5
|
+
from fastapi.errors import RequestValidationError
|
|
6
6
|
{% endif %}
|
|
7
7
|
|
|
8
8
|
{% if template.name == template_types.STANDARD %}
|
|
@@ -40,9 +40,17 @@ from {{ general.source_name }}.api.lifespan import lifespan
|
|
|
40
40
|
from {{ general.source_name }}.delivery.api.lifespan import lifespan
|
|
41
41
|
{% endif %}
|
|
42
42
|
{% endif %}
|
|
43
|
-
|
|
43
|
+
{% if template_domain_import %}
|
|
44
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
45
|
+
{% else %}
|
|
46
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
47
|
+
{% endif %}
|
|
44
48
|
{% if "logger" in template.built_in_features %}
|
|
49
|
+
{% if template_infra_import %}
|
|
45
50
|
from {{ general.source_name }}.{{ template_infra_import }}.logger.file_logger import create_file_logger
|
|
51
|
+
{% else %}
|
|
52
|
+
from {{ general.source_name }}.logger.file_logger import create_file_logger
|
|
53
|
+
{% endif %}
|
|
46
54
|
{% if template.name == template_types.STANDARD %}
|
|
47
55
|
from {{ general.source_name }}.api.middleare.fast_api_log_middleware import FastapiLogMiddleware
|
|
48
56
|
{% else %}
|
|
@@ -65,4 +73,3 @@ app.add_exception_handler(RequestValidationError, validation_error_handler)
|
|
|
65
73
|
{% endif %}
|
|
66
74
|
app.add_exception_handler(Exception, unexpected_exception_handler)
|
|
67
75
|
app.add_exception_handler(DomainError, domain_error_handler)
|
|
68
|
-
|
|
@@ -3,12 +3,24 @@
|
|
|
3
3
|
from fastapi import Request
|
|
4
4
|
from fastapi.responses import JSONResponse
|
|
5
5
|
{% if "logger" in template.built_in_features %}
|
|
6
|
-
from fastapi.
|
|
6
|
+
from fastapi.errors import RequestValidationError
|
|
7
7
|
from fastapi.exception_handlers import request_validation_exception_handler
|
|
8
|
+
{% if template_infra_import %}
|
|
8
9
|
from {{ general.source_name }}.{{ template_infra_import }}.logger.file_logger import create_file_logger
|
|
10
|
+
{% else %}
|
|
11
|
+
from {{ general.source_name }}.logger.file_logger import create_file_logger
|
|
12
|
+
{% endif %}
|
|
9
13
|
{% endif %}
|
|
14
|
+
{% if template_infra_import %}
|
|
10
15
|
from {{ general.source_name }}.{{ template_infra_import }}.http.error_response import InternalServerError, UnprocessableEntityError
|
|
11
|
-
|
|
16
|
+
{% else %}
|
|
17
|
+
from {{ general.source_name }}.http.error_response import InternalServerError, UnprocessableEntityError
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% if template_domain_import %}
|
|
20
|
+
from {{ general.source_name }}.{{ template_domain_import }}.errors.domain_error import DomainError
|
|
21
|
+
{% else %}
|
|
22
|
+
from {{ general.source_name }}.errors.domain_error import DomainError
|
|
23
|
+
{% endif %}
|
|
12
24
|
|
|
13
25
|
|
|
14
26
|
{% if "logger" in template.built_in_features %}
|
|
@@ -4,7 +4,11 @@ import time
|
|
|
4
4
|
from fastapi import Request, Response, FastAPI
|
|
5
5
|
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
|
|
6
6
|
|
|
7
|
+
{% if template_infra_import %}
|
|
7
8
|
from {{ general.source_name }}.{{ template_infra_import }}.logger.file_logger import FileLogger
|
|
9
|
+
{% else %}
|
|
10
|
+
from {{ general.source_name }}.logger.file_logger import FileLogger
|
|
11
|
+
{% endif %}
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
class FastapiLogMiddleware(BaseHTTPMiddleware):
|
|
@@ -4,7 +4,11 @@ from contextlib import asynccontextmanager
|
|
|
4
4
|
|
|
5
5
|
from fastapi import FastAPI
|
|
6
6
|
|
|
7
|
+
{% if template_infra_import %}
|
|
7
8
|
from {{ general.source_name }}.{{ template_infra_import }}.alembic_migrator import AlembicMigrator
|
|
9
|
+
{% else %}
|
|
10
|
+
from {{ general.source_name }}.alembic_migrator import AlembicMigrator
|
|
11
|
+
{% endif %}
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
@asynccontextmanager
|
|
@@ -20,8 +20,10 @@ jobs:
|
|
|
20
20
|
permissions:
|
|
21
21
|
contents: write
|
|
22
22
|
outputs:
|
|
23
|
-
released: ${{ steps.released.outputs.released }}
|
|
24
|
-
|
|
23
|
+
released: {% raw %}${{ steps.released.outputs.released }}{% endraw %}
|
|
24
|
+
|
|
25
|
+
tag: {% raw %}${{ steps.released.outputs.tag }}{% endraw %}
|
|
26
|
+
|
|
25
27
|
|
|
26
28
|
steps:
|
|
27
29
|
- name: 🛡️ Harden runner
|
|
@@ -46,17 +48,23 @@ jobs:
|
|
|
46
48
|
tag: true
|
|
47
49
|
vcs_release: true
|
|
48
50
|
config_file: pyproject.toml
|
|
49
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
|
52
|
+
|
|
53
|
+
git_committer_email: {% raw %}${{ vars.GIT_COMMITTER_EMAIL }}{% endraw %}
|
|
54
|
+
|
|
55
|
+
git_committer_name: {% raw %}${{ vars.GIT_COMMITTER_NAME }}{% endraw %}
|
|
56
|
+
|
|
57
|
+
ssh_public_signing_key: {% raw %}${{ vars.SSH_PUBLIC_SIGNING_KEY }}{% endraw %}
|
|
58
|
+
|
|
59
|
+
ssh_private_signing_key: {% raw %}${{ secrets.SSH_PRIVATE_SIGNING_KEY }}{% endraw %}
|
|
60
|
+
|
|
54
61
|
|
|
55
62
|
build-and-publish:
|
|
56
63
|
name: Publish to PyPI
|
|
57
64
|
needs:
|
|
58
65
|
- release
|
|
59
|
-
if: needs.release.outputs.released == 'true'
|
|
66
|
+
if: {% raw %}needs.release.outputs.released == 'true'{% endraw %}
|
|
67
|
+
|
|
60
68
|
runs-on: ubuntu-latest
|
|
61
69
|
environment: release
|
|
62
70
|
permissions:
|
|
@@ -73,7 +81,8 @@ jobs:
|
|
|
73
81
|
with:
|
|
74
82
|
fetch-depth: 0
|
|
75
83
|
persist-credentials: false
|
|
76
|
-
ref: refs/tags
|
|
84
|
+
ref: refs/tags/{% raw %}${{ needs.release.outputs.tag }}{% endraw %}
|
|
85
|
+
|
|
77
86
|
|
|
78
87
|
- name: 🛠️ Setup environment
|
|
79
88
|
uses: ./.github/actions/python_setup
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
2
2
|
import logging
|
|
3
3
|
|
|
4
|
+
{% if template_infra_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_infra_import }}.logger.file_rotating_handler import TimeRotatingFileHandler
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.logger.file_rotating_handler import TimeRotatingFileHandler
|
|
8
|
+
{% endif %}
|
|
5
9
|
|
|
6
10
|
|
|
7
11
|
class FileLogger:
|
|
@@ -6,7 +6,11 @@ from logging.handlers import TimedRotatingFileHandler
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from typing import Self
|
|
8
8
|
|
|
9
|
+
{% if template_infra_import %}
|
|
9
10
|
from {{ general.source_name }}.{{ template_infra_import }}.logger.json_formatter import JSONFormatter
|
|
11
|
+
{% else %}
|
|
12
|
+
from {{ general.source_name }}.logger.json_formatter import JSONFormatter
|
|
13
|
+
{% endif %}
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
class TimeRotatingFileHandler(logging.Handler):
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
2
2
|
import asyncio
|
|
3
3
|
|
|
4
|
+
{% if template_infra_import %}
|
|
4
5
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
6
|
+
{% else %}
|
|
7
|
+
from {{ general.source_name }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
8
|
+
{% endif %}
|
|
5
9
|
from alembic import command
|
|
6
10
|
from alembic.config import Config
|
|
7
11
|
|
|
@@ -3,7 +3,11 @@ from collections.abc import AsyncGenerator
|
|
|
3
3
|
import pytest
|
|
4
4
|
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
|
|
5
5
|
|
|
6
|
+
{% if template_infra_import %}
|
|
6
7
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
8
|
+
{% else %}
|
|
9
|
+
from {{ general.source_name }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
10
|
+
{% endif %}
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
@pytest.fixture
|
|
@@ -8,7 +8,11 @@ from sqlalchemy.engine import Connection
|
|
|
8
8
|
from sqlalchemy.ext.asyncio import async_engine_from_config
|
|
9
9
|
|
|
10
10
|
from migrations.models_metadata import base
|
|
11
|
+
{% if template_infra_import %}
|
|
11
12
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
13
|
+
{% else %}
|
|
14
|
+
from {{ general.source_name }}.persistence.sqlalchemy.postgres_settings import PostgresSettings
|
|
15
|
+
{% endif %}
|
|
12
16
|
|
|
13
17
|
# this is the Alembic Config object, which provides
|
|
14
18
|
# access to the values within the .ini file in use.
|
|
@@ -6,6 +6,10 @@ have already been imported. To keep the env.py file clean, we import the Base.me
|
|
|
6
6
|
needed models.
|
|
7
7
|
"""
|
|
8
8
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
9
|
+
{% if template_infra_import %}
|
|
9
10
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.base import Base
|
|
11
|
+
{% else %}
|
|
12
|
+
from {{ general.source_name }}.persistence.sqlalchemy.base import Base
|
|
13
|
+
{% endif %}
|
|
10
14
|
|
|
11
15
|
base = Base
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
{% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
|
|
3
3
|
from typing import TypeVar
|
|
4
4
|
|
|
5
|
+
{% if template_domain_import %}
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.uuid import Uuid
|
|
7
|
+
{% else %}
|
|
8
|
+
from {{ general.source_name }}.value_objects.uuid import Uuid
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% if template_infra_import %}
|
|
6
11
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.base import Base
|
|
7
|
-
|
|
12
|
+
{% else %}
|
|
13
|
+
from {{ general.source_name }}.persistence.sqlalchemy.base import Base
|
|
14
|
+
{% endif %}
|
|
15
|
+
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker
|
|
8
16
|
|
|
9
17
|
|
|
10
18
|
Entity = TypeVar("Entity")
|
|
@@ -12,7 +20,7 @@ Entity = TypeVar("Entity")
|
|
|
12
20
|
|
|
13
21
|
class SqlalchemyRepository[Model: Base]:
|
|
14
22
|
_model_class: type[Model]
|
|
15
|
-
_session_maker:
|
|
23
|
+
_session_maker: async_sessionmaker[AssyncSession]
|
|
16
24
|
|
|
17
25
|
def __init__(self, engine: AsyncEngine, model_class: type[Model]) -> None:
|
|
18
26
|
self._session_maker = async_sessionmaker(bind=engine)
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
from sqlalchemy import create_engine, Engine
|
|
3
3
|
from sqlalchemy.orm import sessionmaker, Session
|
|
4
4
|
|
|
5
|
+
{% if template_infra_import %}
|
|
5
6
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.base import (
|
|
6
7
|
Base,
|
|
7
8
|
)
|
|
9
|
+
{% else %}
|
|
10
|
+
from {{ general.source_name }}.persistence.sqlalchemy.base import (
|
|
11
|
+
Base,
|
|
12
|
+
)
|
|
13
|
+
{% endif %}
|
|
8
14
|
|
|
9
15
|
|
|
10
16
|
class SessionMaker:
|
|
@@ -6,11 +6,22 @@ from typing import TypeVar
|
|
|
6
6
|
from typing import TypeVar, Generic
|
|
7
7
|
{% endif %}
|
|
8
8
|
|
|
9
|
+
{% if template_domain_import %}
|
|
9
10
|
from {{ general.source_name }}.{{ template_domain_import }}.value_object.uuid import Uuid
|
|
11
|
+
{% else %}
|
|
12
|
+
from {{ general.source_name }}.value_object.uuid import Uuid
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% if template_infra_import %}
|
|
10
15
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.base import Base
|
|
11
16
|
from {{ general.source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.session_maker import (
|
|
12
17
|
SessionMaker,
|
|
13
18
|
)
|
|
19
|
+
{% else %}
|
|
20
|
+
from {{ general.source_name }}.persistence.sqlalchemy.base import Base
|
|
21
|
+
from {{ general.source_name }}.persistence.sqlalchemy.session_maker import (
|
|
22
|
+
SessionMaker,
|
|
23
|
+
)
|
|
24
|
+
{% endif %}
|
|
14
25
|
|
|
15
26
|
Entity = TypeVar("Entity")
|
|
16
27
|
{% if general.python_version in ["3.13", "3.12", "3.11"] %}
|
|
@@ -71,6 +71,22 @@ test = [
|
|
|
71
71
|
{% endif %}
|
|
72
72
|
{% endif %}
|
|
73
73
|
|
|
74
|
+
[tool.ruff]
|
|
75
|
+
line-length = 120
|
|
76
|
+
|
|
77
|
+
[tool.ruff.lint]
|
|
78
|
+
select = ["E", "F", "W", "B", "C4", "UP", "I"]
|
|
79
|
+
ignore = ["B008"]
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint.isort]
|
|
82
|
+
known-first-party = ["{{ general.source_name }}", "test"]
|
|
83
|
+
|
|
84
|
+
[tool.ruff.format]
|
|
85
|
+
quote-style = "double"
|
|
86
|
+
indent-style = "space"
|
|
87
|
+
skip-magic-trailing-comma = false
|
|
88
|
+
|
|
89
|
+
|
|
74
90
|
{% if "github_actions" in template.built_in_features %}
|
|
75
91
|
[project.optional-dependencies]
|
|
76
92
|
build = ["uv>=0.7.21"]
|
|
@@ -98,6 +114,7 @@ parse_squash_commits = false
|
|
|
98
114
|
ignore_merge_commits = true
|
|
99
115
|
|
|
100
116
|
[tool.semantic_release.changelog]
|
|
117
|
+
changelog_file = "CHANGELOG.md"
|
|
101
118
|
exclude_commit_patterns = ['''^Merge pull request #''', '''^Merge branch ''']
|
|
102
119
|
mode = "update"
|
|
103
120
|
#template_dir = "docs/changelog"
|
|
@@ -3,9 +3,9 @@ import sys
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
from scripts.templates.aggregate_root_template import aggregate_root_template
|
|
6
|
-
from scripts.templates.
|
|
7
|
-
from scripts.templates.
|
|
8
|
-
from scripts.templates.
|
|
6
|
+
from scripts.templates.errors.incorrect_value_error_template import incorrect_value_type_error_template
|
|
7
|
+
from scripts.templates.errors.required_value_error_template import required_value_error_template
|
|
8
|
+
from scripts.templates.errors.invalid_negative_value_error_template import invalid_negative_value_error_template
|
|
9
9
|
from scripts.templates.value_objects.string_value_object_template import string_value_object_template
|
|
10
10
|
from scripts.templates.value_objects.uuid_template import uuid_template
|
|
11
11
|
from scripts.templates.value_objects.value_object_template import value_object_template
|
|
@@ -34,12 +34,12 @@ update: ## Update dependencies.
|
|
|
34
34
|
{% endif %}
|
|
35
35
|
|
|
36
36
|
.PHONY: add-dep
|
|
37
|
-
add-dep: ## Add a new dependency
|
|
38
|
-
@uv
|
|
37
|
+
add-dep: ## Add a new dependency <make add-dep dep="pytest --group test>"
|
|
38
|
+
@uv add $(dep)
|
|
39
39
|
|
|
40
40
|
.PHONY: remove-dep
|
|
41
|
-
remove-dep: ## Remove a dependency
|
|
42
|
-
@uv
|
|
41
|
+
remove-dep: ## Remove a dependency <make remove-dep dep="pytest --group test">
|
|
42
|
+
@uv remove $(dep)
|
|
43
43
|
|
|
44
44
|
{% if dependencies | has_dependency("pytest") or ["github_actions", "makefile"] | is_in(template.built_in_features) %}
|
|
45
45
|
.PHONY: test
|
|
@@ -9,7 +9,11 @@ from typing_extensions import override
|
|
|
9
9
|
{% endif %}
|
|
10
10
|
from inspect import Parameter, _empty, signature
|
|
11
11
|
|
|
12
|
+
{% if template_domain_import %}
|
|
12
13
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.value_object import ValueObject
|
|
14
|
+
{% else %}
|
|
15
|
+
from {{ general.source_name }}.value_objects.value_object import ValueObject
|
|
16
|
+
{% endif %}
|
|
13
17
|
|
|
14
18
|
|
|
15
19
|
class Aggregate(ABC):
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from test.{{ template_domain_import }}.random_generator import RandomGenerator
|
|
4
|
+
{% else %}
|
|
5
|
+
from test.random_generator import RandomGenerator
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class IntPrimitivesMother:
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
3
4
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.invalid_negative_value_error import InvalidNegativeValueError
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.required_value_error import RequiredValueError
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.decorators.validation import validate
|
|
6
7
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.value_object import ValueObject
|
|
8
|
+
{% else %}
|
|
9
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
10
|
+
from {{ general.source_name }}.errors.invalid_negative_value_error import InvalidNegativeValueError
|
|
11
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
12
|
+
from {{ general.source_name }}.value_objects.decorators.validation import validate
|
|
13
|
+
from {{ general.source_name }}.value_objects.value_object import ValueObject
|
|
14
|
+
{% endif %}
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
class IntValueObject(ValueObject[int]):
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from test.{{ template_domain_import }}.random_generator import RandomGenerator
|
|
4
|
+
{% else %}
|
|
5
|
+
from test.random_generator import RandomGenerator
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class StringPrimitivesMother:
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
3
4
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.required_value_error import RequiredValueError
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.decorators.validation import validate
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.value_object import ValueObject
|
|
7
|
+
{% else %}
|
|
8
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
9
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
10
|
+
from {{ general.source_name }}.value_objects.decorators.validation import validate
|
|
11
|
+
from {{ general.source_name }}.value_objects.value_object import ValueObject
|
|
12
|
+
{% endif %}
|
|
6
13
|
|
|
7
14
|
|
|
8
15
|
class StringValueObject(ValueObject[str]):
|
|
@@ -4,6 +4,7 @@ import pytest
|
|
|
4
4
|
from expects import expect, equal, raise_error
|
|
5
5
|
{% endif %}
|
|
6
6
|
|
|
7
|
+
{% if template_domain_import %}
|
|
7
8
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import (
|
|
8
9
|
IncorrectValueTypeError,
|
|
9
10
|
)
|
|
@@ -17,6 +18,21 @@ from {{ general.source_name }}.{{ template_domain_import }}.value_objects.usable
|
|
|
17
18
|
from test.{{ template_domain_import }}.value_objects.int_primitives_mother import (
|
|
18
19
|
IntPrimitivesMother,
|
|
19
20
|
)
|
|
21
|
+
{% else %}
|
|
22
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import (
|
|
23
|
+
IncorrectValueTypeError,
|
|
24
|
+
)
|
|
25
|
+
from {{ general.source_name }}.errors.invalid_negative_value_error import (
|
|
26
|
+
InvalidNegativeValueError,
|
|
27
|
+
)
|
|
28
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
29
|
+
from {{ general.source_name }}.value_objects.usables.int_value_object import (
|
|
30
|
+
IntValueObject,
|
|
31
|
+
)
|
|
32
|
+
from test.value_objects.int_primitives_mother import (
|
|
33
|
+
IntPrimitivesMother,
|
|
34
|
+
)
|
|
35
|
+
{% endif %}
|
|
20
36
|
|
|
21
37
|
|
|
22
38
|
@pytest.mark.unit
|
|
@@ -4,6 +4,7 @@ import pytest
|
|
|
4
4
|
from expects import expect, equal, raise_error
|
|
5
5
|
{% endif %}
|
|
6
6
|
|
|
7
|
+
{% if template_domain_import %}
|
|
7
8
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import (
|
|
8
9
|
IncorrectValueTypeError,
|
|
9
10
|
)
|
|
@@ -14,6 +15,18 @@ from {{ general.source_name }}.{{ template_domain_import }}.value_objects.usable
|
|
|
14
15
|
from test.{{ template_domain_import }}.value_objects.string_primitives_mother import (
|
|
15
16
|
StringPrimitivesMother,
|
|
16
17
|
)
|
|
18
|
+
{% else %}
|
|
19
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import (
|
|
20
|
+
IncorrectValueTypeError,
|
|
21
|
+
)
|
|
22
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
23
|
+
from {{ general.source_name }}.value_objects.usables.string_value_object import (
|
|
24
|
+
StringValueObject,
|
|
25
|
+
)
|
|
26
|
+
from test.value_objects.string_primitives_mother import (
|
|
27
|
+
StringPrimitivesMother,
|
|
28
|
+
)
|
|
29
|
+
{% endif %}
|
|
17
30
|
|
|
18
31
|
|
|
19
32
|
@pytest.mark.unit
|
|
@@ -4,6 +4,7 @@ import pytest
|
|
|
4
4
|
from expects import expect, equal, raise_error
|
|
5
5
|
{% endif %}
|
|
6
6
|
|
|
7
|
+
{% if template_domain_import %}
|
|
7
8
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import (
|
|
8
9
|
IncorrectValueTypeError,
|
|
9
10
|
)
|
|
@@ -17,6 +18,21 @@ from {{ general.source_name }}.{{ template_domain_import }}.value_objects.usable
|
|
|
17
18
|
from test.{{ template_domain_import }}.value_objects.uuid_primitives_mother import (
|
|
18
19
|
UuidPrimitivesMother,
|
|
19
20
|
)
|
|
21
|
+
{% else %}
|
|
22
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import (
|
|
23
|
+
IncorrectValueTypeError,
|
|
24
|
+
)
|
|
25
|
+
from {{ general.source_name }}.errors.invalid_id_format_error import (
|
|
26
|
+
InvalidIdFormatError,
|
|
27
|
+
)
|
|
28
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
29
|
+
from {{ general.source_name }}.value_objects.usables.uuid import (
|
|
30
|
+
Uuid,
|
|
31
|
+
)
|
|
32
|
+
from test.value_objects.uuid_primitives_mother import (
|
|
33
|
+
UuidPrimitivesMother,
|
|
34
|
+
)
|
|
35
|
+
{% endif %}
|
|
20
36
|
|
|
21
37
|
|
|
22
38
|
@pytest.mark.unit
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
3
4
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.invalid_id_format_error import InvalidIdFormatError
|
|
4
5
|
from {{ general.source_name }}.{{ template_domain_import }}.errors.required_value_error import RequiredValueError
|
|
5
6
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.decorators.validation import validate
|
|
6
7
|
from {{ general.source_name }}.{{ template_domain_import }}.value_objects.value_object import ValueObject
|
|
8
|
+
{% else %}
|
|
9
|
+
from {{ general.source_name }}.errors.incorrect_value_type_error import IncorrectValueTypeError
|
|
10
|
+
from {{ general.source_name }}.errors.invalid_id_format_error import InvalidIdFormatError
|
|
11
|
+
from {{ general.source_name }}.errors.required_value_error import RequiredValueError
|
|
12
|
+
from {{ general.source_name }}.value_objects.decorators.validation import validate
|
|
13
|
+
from {{ general.source_name }}.value_objects.value_object import ValueObject
|
|
14
|
+
{% endif %}
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
class Uuid(ValueObject[str]):
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
{% if template_domain_import %}
|
|
2
3
|
from test.{{ template_domain_import }}.random_generator import RandomGenerator
|
|
4
|
+
{% else %}
|
|
5
|
+
from test.random_generator import RandomGenerator
|
|
6
|
+
{% endif %}
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
class UuidPrimitivesMother:
|
|
@@ -1,29 +1,3 @@
|
|
|
1
1
|
{% import "project_structure/macros.j2" as macros with context %}
|
|
2
2
|
- name: scripts/makefile
|
|
3
|
-
type: boilerplate_file
|
|
4
|
-
- name: scripts
|
|
5
|
-
type: directory
|
|
6
|
-
children:
|
|
7
|
-
- name: scripts/add_dependency
|
|
8
|
-
type: boilerplate_file
|
|
9
|
-
extension: .py
|
|
10
|
-
- name: scripts/remove_dependency
|
|
11
|
-
type: boilerplate_file
|
|
12
|
-
extension: .py
|
|
13
|
-
{% if "precommit_hook" not in template.built_in_features %}
|
|
14
|
-
- name: scripts/local_setup
|
|
15
|
-
type: boilerplate_file
|
|
16
|
-
extension: .py
|
|
17
|
-
- name: hooks
|
|
18
|
-
type: directory
|
|
19
|
-
children:
|
|
20
|
-
- name: scripts/pre-commit
|
|
21
|
-
type: boilerplate_file
|
|
22
|
-
extension: .py
|
|
23
|
-
- name: scripts/pre-push
|
|
24
|
-
type: boilerplate_file
|
|
25
|
-
extension: .py
|
|
26
|
-
- name: scripts/post-merge
|
|
27
|
-
type: boilerplate_file
|
|
28
|
-
extension: .py
|
|
29
|
-
{% endif %}
|
|
3
|
+
type: boilerplate_file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: instant-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Instant boilerplate generation for Python projects
|
|
5
5
|
Project-URL: documentation, https://dimanu-py.github.io/instant-python/
|
|
6
6
|
Project-URL: repository, https://github.com/dimanu-py/instant-python/
|
|
@@ -4,7 +4,7 @@ instant_python/cli/cli.py,sha256=g7-BiXJZBDX0p-_I1U0myiciu6DhwzyAp8X6BGE9bsQ,808
|
|
|
4
4
|
instant_python/cli/instant_python_typer.py,sha256=jVk2VV8O4WHbyVGGn56D8Id-oo03KriwfmxgPTQOdy4,1230
|
|
5
5
|
instant_python/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
instant_python/commands/config.py,sha256=m62zbX9A_dKaYdLmYaG89kZqRQmqtVQZyeHCyJOP9pU,1169
|
|
7
|
-
instant_python/commands/init.py,sha256=
|
|
7
|
+
instant_python/commands/init.py,sha256=ZrxJu99sDoLe0s3q4wpce1ZUJwdnmiv3gqeDlpnpFG4,2356
|
|
8
8
|
instant_python/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
instant_python/configuration/configuration_schema.py,sha256=KjZsLgY8IQynHaNIvhdBjFfvoVrtxMonkGuPijIrJTw,2680
|
|
10
10
|
instant_python/configuration/question_wizard.py,sha256=mK_tWJ88g-wETNxlW6n9OXCmzZ32177u56TM42OdOtA,347
|
|
@@ -86,86 +86,86 @@ instant_python/templates/boilerplate/LICENSE,sha256=wzw1JFV1qGbnRMfokpku4CO4ZKvt
|
|
|
86
86
|
instant_python/templates/boilerplate/README.md,sha256=qlaO6Tnd8k0A_ccRNVI8yt5Vn1dQP6AwxW_WH80P8Is,238
|
|
87
87
|
instant_python/templates/boilerplate/SECURITY.md,sha256=l2T8a7mcV3PUs1vloUDqFXlRXKseInsT_nR71wlLvGo,2024
|
|
88
88
|
instant_python/templates/boilerplate/mypy.ini,sha256=unPeeeN5XStcdwqobdxtHsPj-Ru1NWPyZ5WF4PbQqik,889
|
|
89
|
-
instant_python/templates/boilerplate/pyproject.toml,sha256=
|
|
89
|
+
instant_python/templates/boilerplate/pyproject.toml,sha256=UvtSTv7d5xjc3k9uP1rmMVPUH1MMTr7VUYXMd3R-MdE,3203
|
|
90
90
|
instant_python/templates/boilerplate/pytest.ini,sha256=Ur7Nw3dUSUSeea9r_woiv0wEsZMQFVs9hfTXtn6Mt74,248
|
|
91
91
|
instant_python/templates/boilerplate/random_generator.py,sha256=Nx5oRA4n9wvv9p2fvqQb9ItSwQ8KF1Lk6Rq1ODmBNjQ,386
|
|
92
92
|
instant_python/templates/boilerplate/event_bus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
93
|
instant_python/templates/boilerplate/event_bus/domain_event.py,sha256=aD4UGS4HWQwQvyfdKLpWN1emDfHUS6NQbYlGXRHVDas,312
|
|
94
|
-
instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py,sha256=
|
|
95
|
-
instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py,sha256=
|
|
96
|
-
instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py,sha256=
|
|
94
|
+
instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py,sha256=_a9zYWPB6vsetG1V53Y4-DFgUc8ZLwXjCRolaCBQwrE,1417
|
|
95
|
+
instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py,sha256=aQ12OCT64nSnC8IYsem2aFT4yGyFAW-7Wr0nAuT_qKE,630
|
|
96
|
+
instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py,sha256=HC6-uxR0_EP7syDlAaTjdcggkf3mFGP4cL5RLxRKebY,1316
|
|
97
97
|
instant_python/templates/boilerplate/event_bus/event_aggregate.py,sha256=nCNrtAZRRNK6VoRta2HNOVC_YbtBK9mZYOhbHMND5H4,696
|
|
98
|
-
instant_python/templates/boilerplate/event_bus/event_bus.py,sha256=
|
|
98
|
+
instant_python/templates/boilerplate/event_bus/event_bus.py,sha256=Oq1zKESysY9K2vmfA26PNallBEDHVn3L4cAHWdGOjGY,484
|
|
99
99
|
instant_python/templates/boilerplate/event_bus/exchange_type.py,sha256=N4tVSRqURhpZnUxu-sLejmbwojM_917Gy_WsCyHQri8,258
|
|
100
|
-
instant_python/templates/boilerplate/event_bus/mock_event_bus.py,sha256=
|
|
101
|
-
instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py,sha256=
|
|
102
|
-
instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py,sha256=
|
|
103
|
-
instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py,sha256=
|
|
104
|
-
instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py,sha256=
|
|
100
|
+
instant_python/templates/boilerplate/event_bus/mock_event_bus.py,sha256=HA3CqpBfcCd-j9QM0sDEFPs2ASSzTUsg0BvkBfVPklA,843
|
|
101
|
+
instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py,sha256=txylNfoi-H_QRVCxqG5nl2diT66wJ6ToccYxU8oTSn4,2619
|
|
102
|
+
instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py,sha256=swNo0MB0T24Pajyof9-whbBVa-JXse1iZD0YrowDS-c,3447
|
|
103
|
+
instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py,sha256=GC4DjdAlZpl8JUsZLhS2gc4hmW7PmNqQy76p5OhRSg0,2760
|
|
104
|
+
instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py,sha256=ZGSEyc2UZD6FFz-we91Rcrd4-E7bjF0WwtdoJQ2tvwc,1719
|
|
105
105
|
instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py,sha256=GNcYmzNLdx4M7s4Rr_gcNZcIP0bSU8BUO5KvApxd62c,902
|
|
106
106
|
instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py,sha256=0oOoAU0m9Jwo6CmBlGpEiFXU7lvIILI0OfkB9W7RNG4,131
|
|
107
107
|
instant_python/templates/boilerplate/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
|
-
instant_python/templates/boilerplate/exceptions/
|
|
109
|
-
instant_python/templates/boilerplate/exceptions/
|
|
110
|
-
instant_python/templates/boilerplate/exceptions/
|
|
111
|
-
instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py,sha256=
|
|
112
|
-
instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py,sha256=
|
|
113
|
-
instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py,sha256=
|
|
114
|
-
instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py,sha256=
|
|
115
|
-
instant_python/templates/boilerplate/exceptions/required_value_error.py,sha256=
|
|
108
|
+
instant_python/templates/boilerplate/exceptions/base_error.py,sha256=cNBBLYVwTNdqjV0i4F6FMsKFCA512Cf9HS8a3-XeMKk,494
|
|
109
|
+
instant_python/templates/boilerplate/exceptions/domain_error.py,sha256=MreianPri0Fa3ZJLfsqUQp_rUA-UUz3MyGZSObTLmTM,336
|
|
110
|
+
instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py,sha256=OAJDAENgtrEGMgAZ3Ge29bDzTHqWO-GlBFo_-UENtn0,518
|
|
111
|
+
instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py,sha256=R1653oEFEcUsIADjMVVlpZiHXVisacIv4-lnhLKs2AA,570
|
|
112
|
+
instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py,sha256=lQ2ikIeX0NrnJwFvE1SDjiO5RX-IkbQ5v2vCWIT91lU,481
|
|
113
|
+
instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py,sha256=MSVvuGXJrgOW52h719eFPsSV0QeoOPp3yHwyrmLNYdY,507
|
|
114
|
+
instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py,sha256=v1iGGGPW7dQdhYJBn-Y4sfKYZrx6G56YRMAadCrVP3k,510
|
|
115
|
+
instant_python/templates/boilerplate/exceptions/required_value_error.py,sha256=gtRQbm9ICLpVldyEzs89ULkfR0CZjTXhAe0RYZC-sZM,480
|
|
116
116
|
instant_python/templates/boilerplate/fastapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
-
instant_python/templates/boilerplate/fastapi/application.py,sha256=
|
|
118
|
-
instant_python/templates/boilerplate/fastapi/error_handlers.py,sha256=
|
|
117
|
+
instant_python/templates/boilerplate/fastapi/application.py,sha256=FDmbZ_YgGdqtcxnII4tY_uDc9thuR62vAAQXah6fSM4,2674
|
|
118
|
+
instant_python/templates/boilerplate/fastapi/error_handlers.py,sha256=sNGCuUv_U2ZIUFiQxmoUGRPkCHbwKHfbDp6kcA2iKjQ,2561
|
|
119
119
|
instant_python/templates/boilerplate/fastapi/error_response.py,sha256=vUy6kC7RFohuDMHSvdZtZnRV2xZoG5fuKbgM1IXGei4,834
|
|
120
|
-
instant_python/templates/boilerplate/fastapi/fastapi_log_middleware.py,sha256=
|
|
121
|
-
instant_python/templates/boilerplate/fastapi/lifespan.py,sha256=
|
|
120
|
+
instant_python/templates/boilerplate/fastapi/fastapi_log_middleware.py,sha256=z5oGUVTOYDy2UtWUXrow6RbX1J_fkA7YYDZS5GJyf14,1113
|
|
121
|
+
instant_python/templates/boilerplate/fastapi/lifespan.py,sha256=p1iBfybVgc3zp3pjpMqQ7riB_6g5vmgo2AjKqv4iUHY,569
|
|
122
122
|
instant_python/templates/boilerplate/fastapi/success_response.py,sha256=3K-Xw-fRV0Z9S2p1Oi201pwvhDsA5JL35WwBTfwyFUA,259
|
|
123
123
|
instant_python/templates/boilerplate/github/action.yml,sha256=orPXW0IIasWJDe3KZelFoITILKDPqRTYFC3WWOXQGa8,1036
|
|
124
124
|
instant_python/templates/boilerplate/github/bug_report.yml,sha256=DQ1OkBkQa2YNxXg2d7uPW1FI2sA_QZQH2E7Ju9tyi_g,1613
|
|
125
125
|
instant_python/templates/boilerplate/github/ci.yml,sha256=FwPxiFw8RMDXisQRjUnKCUQDpm89g8dll784KuKqenI,5269
|
|
126
126
|
instant_python/templates/boilerplate/github/feature_request.yml,sha256=Au116oHxO-julX2wJyNHbteTWKq68ulo2F45UakJppk,758
|
|
127
|
-
instant_python/templates/boilerplate/github/release.yml,sha256=
|
|
127
|
+
instant_python/templates/boilerplate/github/release.yml,sha256=he8zHkBUcL9l2lkubalFNeltU5NVDFHLRKtN6U-rZmI,3283
|
|
128
128
|
instant_python/templates/boilerplate/logger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
-
instant_python/templates/boilerplate/logger/file_logger.py,sha256=
|
|
130
|
-
instant_python/templates/boilerplate/logger/file_rotating_handler.py,sha256=
|
|
129
|
+
instant_python/templates/boilerplate/logger/file_logger.py,sha256=ydejFFO-kYEwTove40suwCi6dQpOlRQuB2DVAno3m_Q,1527
|
|
130
|
+
instant_python/templates/boilerplate/logger/file_rotating_handler.py,sha256=eAyFsj7bCgat6saMIa_i1UsZ3CJgqaFvAQIDdJsrYkU,1378
|
|
131
131
|
instant_python/templates/boilerplate/logger/json_formatter.py,sha256=DpqT3mH7Q077pXCWMkP-9HbWMwY5zfoZszThe6Qyjw4,389
|
|
132
132
|
instant_python/templates/boilerplate/persistence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
|
-
instant_python/templates/boilerplate/persistence/alembic_migrator.py,sha256=
|
|
133
|
+
instant_python/templates/boilerplate/persistence/alembic_migrator.py,sha256=Rmj969co2UdUfES2zRIjQoiqXO_PdAq8TmRqcurWgmI,907
|
|
134
134
|
instant_python/templates/boilerplate/persistence/base.py,sha256=AmKqS3E-iJCwkuO3GAoRBzCan0--CeFykadTHJoMz7s,77
|
|
135
135
|
instant_python/templates/boilerplate/persistence/async/README.md,sha256=ISVtAOvqvKk_5ThM5ioJE-lMkvf9IbknFUFVU_vPma4,58
|
|
136
136
|
instant_python/templates/boilerplate/persistence/async/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
137
|
instant_python/templates/boilerplate/persistence/async/alembic.ini,sha256=cO02jtPYm1RMq0M_oCbiqHaSWHyC12IdfhMsGPN5l7I,3981
|
|
138
|
-
instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py,sha256=
|
|
139
|
-
instant_python/templates/boilerplate/persistence/async/env.py,sha256=
|
|
140
|
-
instant_python/templates/boilerplate/persistence/async/models_metadata.py,sha256=
|
|
138
|
+
instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py,sha256=8dIUTStoDUCzaonHB9UOqp09OvOgcZg9Rai2T0oKsRk,871
|
|
139
|
+
instant_python/templates/boilerplate/persistence/async/env.py,sha256=m4MdmEWKr44wylBCiHHAspEBArYbjhSM_v2_irarMLo,2770
|
|
140
|
+
instant_python/templates/boilerplate/persistence/async/models_metadata.py,sha256=mF6BZ2EwLQJg5kgFqBcIa5WMQPj9LHSbQrY_mqLc_qE,669
|
|
141
141
|
instant_python/templates/boilerplate/persistence/async/postgres_settings.py,sha256=qJXTAxHKSXfW1-f-SjAZEO0nMSyVi-oFgTiOg8aW7No,655
|
|
142
142
|
instant_python/templates/boilerplate/persistence/async/script.py.mako,sha256=Btnw5t7dF2bdkT6TiO9_1tPOAntYj0YBUuzazNG_GkE,634
|
|
143
|
-
instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py,sha256=
|
|
143
|
+
instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py,sha256=fIaLyCulX1i3MlAfO8XluPnh7_HbPzKmqQwrNM2-QA8,1467
|
|
144
144
|
instant_python/templates/boilerplate/persistence/synchronous/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
instant_python/templates/boilerplate/persistence/synchronous/session_maker.py,sha256=
|
|
146
|
-
instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py,sha256=
|
|
145
|
+
instant_python/templates/boilerplate/persistence/synchronous/session_maker.py,sha256=oP2fD0bVrB60joFx6zwQX42f9_yjEJZO2QoijQOrYVY,766
|
|
146
|
+
instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py,sha256=3eskD5eDsTb8uKmCyVlIDBhLzIr1tOMi2ExoTdxB_m4,1915
|
|
147
147
|
instant_python/templates/boilerplate/scripts/add_dependency.py,sha256=KmWz8spKjejv9PCwQI_lm8d0xcrjufpNoiz_H6K13Lo,1259
|
|
148
148
|
instant_python/templates/boilerplate/scripts/create_aggregate.py,sha256=dgMCAtJEJjfvuvTMegjXgVGI86jupZN_z7q1fOoopNU,1061
|
|
149
|
-
instant_python/templates/boilerplate/scripts/insert_template.py,sha256=
|
|
149
|
+
instant_python/templates/boilerplate/scripts/insert_template.py,sha256=RFRZcKP6sEQ2nDCXyxDAg-N4qkUd7f952WfFV2bG_Ok,4264
|
|
150
150
|
instant_python/templates/boilerplate/scripts/integration.sh,sha256=bQe0acRChPrdBqzeEIviZezfZxlt8CeibHj1QXjLyZE,972
|
|
151
151
|
instant_python/templates/boilerplate/scripts/local_setup.py,sha256=oVUkqwudgzlI6AjTCf5eWLkvL4v0yAjFiz_xXhD2fY8,250
|
|
152
|
-
instant_python/templates/boilerplate/scripts/makefile,sha256=
|
|
152
|
+
instant_python/templates/boilerplate/scripts/makefile,sha256=n0oiKvL3CyQ1Db1B9YVUHAxzWqP9m8qlZ8TYfCWv_0o,6320
|
|
153
153
|
instant_python/templates/boilerplate/scripts/post-merge.py,sha256=b0Be5pbZi34ZvlCWpVM0VrqrFqlMPkXBfPdQslEwsVA,916
|
|
154
154
|
instant_python/templates/boilerplate/scripts/pre-commit.py,sha256=juV42m6haVvbBSTB-R0bIDJqkEzj2S3JeciAb6Xieqk,278
|
|
155
155
|
instant_python/templates/boilerplate/scripts/pre-push.py,sha256=2UpPIkPTnwO8UusCAij18JSSzYArrYBqFEQWjaXG1Po,50
|
|
156
156
|
instant_python/templates/boilerplate/scripts/remove_dependency.py,sha256=i4xoHtaqymkmPuCHe3P4Ns1UmJEZL7ytE9uw1yL9Q1M,1173
|
|
157
157
|
instant_python/templates/boilerplate/scripts/unit.sh,sha256=HWne-jgso6Lcp6mRtvIsX84e3cKzmVUTQ1YFRPPA35M,1115
|
|
158
158
|
instant_python/templates/boilerplate/value_object/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
159
|
-
instant_python/templates/boilerplate/value_object/aggregate.py,sha256=
|
|
160
|
-
instant_python/templates/boilerplate/value_object/int_primitives_mother.py,sha256=
|
|
161
|
-
instant_python/templates/boilerplate/value_object/int_value_object.py,sha256=
|
|
162
|
-
instant_python/templates/boilerplate/value_object/string_primitives_mother.py,sha256=
|
|
163
|
-
instant_python/templates/boilerplate/value_object/string_value_object.py,sha256=
|
|
164
|
-
instant_python/templates/boilerplate/value_object/test_int_value_object.py,sha256=
|
|
165
|
-
instant_python/templates/boilerplate/value_object/test_string_value_object.py,sha256=
|
|
166
|
-
instant_python/templates/boilerplate/value_object/test_uuid_value_object.py,sha256=
|
|
167
|
-
instant_python/templates/boilerplate/value_object/uuid.py,sha256=
|
|
168
|
-
instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py,sha256=
|
|
159
|
+
instant_python/templates/boilerplate/value_object/aggregate.py,sha256=DRCfaumK4jzt8ZKIww4giKItu8hraYclULf7bXIuhaM,3463
|
|
160
|
+
instant_python/templates/boilerplate/value_object/int_primitives_mother.py,sha256=SuTw10Pagpj5oNsTe7UsKaoEXRpMUcIlE4CoMzdRVJc,374
|
|
161
|
+
instant_python/templates/boilerplate/value_object/int_value_object.py,sha256=6hq9VGdtkrWfj2j9OPWVrDprU1uICMlGi9iNQSyC5n0,1650
|
|
162
|
+
instant_python/templates/boilerplate/value_object/string_primitives_mother.py,sha256=MJC4TBUtzMnpiIbC_dlQXorxGnxIr5TMJjK0aCaw7II,365
|
|
163
|
+
instant_python/templates/boilerplate/value_object/string_value_object.py,sha256=GGtGZR0OUtp_6QTEaxwQkXXmIlC4IR9CYPR1yyZxiE8,1268
|
|
164
|
+
instant_python/templates/boilerplate/value_object/test_int_value_object.py,sha256=Q1fZ8-0oIrk0upJm6cIMWXfjbaSVsTgsNrz8TcyQG10,3624
|
|
165
|
+
instant_python/templates/boilerplate/value_object/test_string_value_object.py,sha256=WSijrlv6y_v4TfHV3Z0q6S_wDubyQyh2XhW6SHrF8OU,3164
|
|
166
|
+
instant_python/templates/boilerplate/value_object/test_uuid_value_object.py,sha256=rwU3qbxplJTj-lU8Q2EnOWmKdVHi6S5bT3eoJNWBru8,3464
|
|
167
|
+
instant_python/templates/boilerplate/value_object/uuid.py,sha256=tbVrc7LFE__kghWhKl7jsEUv9-54rIx7qgkZ1SKSUJI,1658
|
|
168
|
+
instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py,sha256=AMMaiakUmCSz0mA644Z_VGNGOyLDWCcFR80qm5I5Z_w,437
|
|
169
169
|
instant_python/templates/boilerplate/value_object/validation.py,sha256=QQzinWCtIKEch24uFLmE8WdCP0tJJIcvRQRsDK3qepY,212
|
|
170
170
|
instant_python/templates/boilerplate/value_object/value_object.py,sha256=JrfqdR4R5l0paSka4dmg7AFIRK9qUw84jVr6HsVBHfA,3436
|
|
171
171
|
instant_python/templates/project_structure/alembic_migrator.yml.j2,sha256=7xCrOaZMHXuCz2QAGnM8xB9mgzdR9IqEFWV6Iyc3DY4,78
|
|
@@ -183,7 +183,7 @@ instant_python/templates/project_structure/gitignore.yml.j2,sha256=Ex3A7rvCvuIqx
|
|
|
183
183
|
instant_python/templates/project_structure/license.yml.j2,sha256=0h2OAyK4-HKWsM6Gllkh1wGRXmEl2mRJLlKgOPlyCY0,40
|
|
184
184
|
instant_python/templates/project_structure/logger.yml.j2,sha256=2oQqzCL1Z2S7k1ezAKcj7A6ehhzSYpe0FfMBOLewK6U,315
|
|
185
185
|
instant_python/templates/project_structure/macros.j2,sha256=oAvJhQDJsk6yLm1r6P_kUdKAuLpOmuqmMauJdhKYv0U,173
|
|
186
|
-
instant_python/templates/project_structure/makefile.yml.j2,sha256=
|
|
186
|
+
instant_python/templates/project_structure/makefile.yml.j2,sha256=T2wmbQxq1-7BUmWtLIvskauFuEty0FkO-G1NLeC6WtY,115
|
|
187
187
|
instant_python/templates/project_structure/mypy.yml.j2,sha256=Th3HkMdEu2xgORRhMV5QoqkilF90xfKb8JAEOXmEGUc,55
|
|
188
188
|
instant_python/templates/project_structure/precommit_hook.yml.j2,sha256=Yw-J9EoW1MzHLMCLJ6kBqQpEp2FsUiHa0OR6ubB7Hzg,69
|
|
189
189
|
instant_python/templates/project_structure/pyproject.yml.j2,sha256=QC_Q5Y1MfMen0fbVfllCDpX70idbNIR4gpL1gIgeQs0,61
|
|
@@ -193,7 +193,7 @@ instant_python/templates/project_structure/readme.yml.j2,sha256=Km1zSVKfGwx7GHn0
|
|
|
193
193
|
instant_python/templates/project_structure/security.yml.j2,sha256=-AqFqcu1wdEAqugXEN1NaxKQVTvsCUxOBi5mXCEqBhY,58
|
|
194
194
|
instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2,sha256=mC7WBchO0bzHcGkTw0k4woDstUvoQaJKlrCW82A96o8,467
|
|
195
195
|
instant_python/templates/project_structure/test_value_objects.yml.j2,sha256=9MUoo5BwsUBjNjd-3aYbRnNJXB05iwHOPz3oO_VwjjY,769
|
|
196
|
-
instant_python/templates/project_structure/value_objects.yml.j2,sha256=
|
|
196
|
+
instant_python/templates/project_structure/value_objects.yml.j2,sha256=K8n3cUwPH8cXvwUnPza4TQAJwbjBSTPkq9fa2BWFxpU,1420
|
|
197
197
|
instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2,sha256=h2G3EHJO8h_vWaIrF93zSQg55c4yRysjcmie_-RoY0U,2059
|
|
198
198
|
instant_python/templates/project_structure/clean_architecture/source.yml.j2,sha256=dwMKp9C5U_KIIoH6FeM3jsHBlscmIbijGRCbXG5yt_M,2459
|
|
199
199
|
instant_python/templates/project_structure/clean_architecture/test.yml.j2,sha256=wCwT3Tm3bjhsTF6nqP30KdiUlYrvkIN3Xkxw7uNoJqw,852
|
|
@@ -204,8 +204,8 @@ instant_python/templates/project_structure/domain_driven_design/test.yml.j2,sha2
|
|
|
204
204
|
instant_python/templates/project_structure/standard_project/main_structure.yml.j2,sha256=aPjYWo7iJdG5SDVIJEzPh1eBlMDE54WwPfMBmqOHHgI,2055
|
|
205
205
|
instant_python/templates/project_structure/standard_project/source.yml.j2,sha256=THNSxD_6mMd-oCzaGYkrHlTiRWzkN6X3X6cYi2cbyMk,1702
|
|
206
206
|
instant_python/templates/project_structure/standard_project/test.yml.j2,sha256=MHeZF6k50M2ZSwhEocSrepsHtUEm9FQmLB0xSgS7GZM,608
|
|
207
|
-
instant_python-0.
|
|
208
|
-
instant_python-0.
|
|
209
|
-
instant_python-0.
|
|
210
|
-
instant_python-0.
|
|
211
|
-
instant_python-0.
|
|
207
|
+
instant_python-0.11.0.dist-info/METADATA,sha256=Jz54jyGQruaHrXdNQ1vLdX_VyQtfoURWFi9_lVvyHpE,17692
|
|
208
|
+
instant_python-0.11.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
209
|
+
instant_python-0.11.0.dist-info/entry_points.txt,sha256=M8YUHQaTszBM3np_x9j7wmc1ngrmpfrd4ajBv2EzQuk,51
|
|
210
|
+
instant_python-0.11.0.dist-info/licenses/LICENSE,sha256=kf7wA-1IsqXkzXjlsG95sdQJtsqUON_lNXombfPlklo,11353
|
|
211
|
+
instant_python-0.11.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|