instant-python 0.15.2__tar.gz → 0.16.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. {instant_python-0.15.2 → instant_python-0.16.0}/CHANGELOG.md +80 -0
  2. {instant_python-0.15.2 → instant_python-0.16.0}/PKG-INFO +1 -1
  3. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/renderer/jinja_environment.py +6 -0
  4. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/.pre-commit-config.yml +2 -0
  5. instant_python-0.16.0/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +25 -0
  6. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +1 -6
  7. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +2 -11
  8. instant_python-0.16.0/instant_python/templates/boilerplate/event_bus/event_aggregate.py +18 -0
  9. instant_python-0.16.0/instant_python/templates/boilerplate/event_bus/event_bus.py +9 -0
  10. instant_python-0.16.0/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +16 -0
  11. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +4 -23
  12. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +3 -18
  13. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +5 -26
  14. instant_python-0.16.0/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +26 -0
  15. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py +2 -10
  16. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/domain_error.py +6 -0
  17. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +6 -0
  18. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +10 -0
  19. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +6 -0
  20. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +6 -0
  21. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +7 -0
  22. instant_python-0.16.0/instant_python/templates/boilerplate/exceptions/required_value_error.py +6 -0
  23. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/application.py +2 -12
  24. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/error_handlers.py +3 -17
  25. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/fastapi_log_middleware.py +1 -6
  26. instant_python-0.16.0/instant_python/templates/boilerplate/fastapi/lifespan.py +13 -0
  27. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/github/ci.yml +2 -2
  28. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/github/release.yml +1 -1
  29. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/logger/file_logger.py +1 -6
  30. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/logger/file_rotating_handler.py +1 -6
  31. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/alembic_migrator.py +1 -6
  32. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +1 -6
  33. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/async_session.py +1 -6
  34. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/env.py +1 -6
  35. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/models_metadata.py +1 -6
  36. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +2 -12
  37. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +1 -8
  38. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +3 -16
  39. instant_python-0.16.0/instant_python/templates/boilerplate/pyproject.toml +134 -0
  40. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/makefile +35 -42
  41. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/aggregate.py +1 -6
  42. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/int_primitives_mother.py +7 -0
  43. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/int_value_object.py +22 -0
  44. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/string_primitives_mother.py +7 -0
  45. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/string_value_object.py +16 -0
  46. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/test_int_value_object.py +5 -22
  47. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/test_string_value_object.py +4 -18
  48. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/test_uuid_value_object.py +5 -22
  49. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/uuid.py +26 -0
  50. instant_python-0.16.0/instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py +11 -0
  51. instant_python-0.16.0/instant_python/templates/project_structure/alembic_migrator.yml.j2 +6 -0
  52. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/async_alembic.yml.j2 +2 -0
  53. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/async_sqlalchemy.yml.j2 +3 -9
  54. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/event_bus_infra.yml.j2 +2 -2
  55. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/github_action.yml.j2 +3 -3
  56. instant_python-0.16.0/instant_python/templates/project_structure/persistence.yml.j2 +8 -0
  57. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/value_objects.yml.j2 +1 -1
  58. {instant_python-0.15.2 → instant_python-0.16.0}/pyproject.toml +1 -1
  59. instant_python-0.16.0/test/initialize/infra/renderer/test_jinja_environment.py +145 -0
  60. {instant_python-0.15.2 → instant_python-0.16.0}/uv.lock +1 -1
  61. instant_python-0.15.2/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +0 -36
  62. instant_python-0.15.2/instant_python/templates/boilerplate/event_bus/event_aggregate.py +0 -24
  63. instant_python-0.15.2/instant_python/templates/boilerplate/event_bus/event_bus.py +0 -14
  64. instant_python-0.15.2/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +0 -22
  65. instant_python-0.15.2/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +0 -42
  66. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/domain_error.py +0 -11
  67. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +0 -10
  68. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +0 -15
  69. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +0 -11
  70. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +0 -11
  71. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +0 -12
  72. instant_python-0.15.2/instant_python/templates/boilerplate/exceptions/required_value_error.py +0 -11
  73. instant_python-0.15.2/instant_python/templates/boilerplate/fastapi/lifespan.py +0 -18
  74. instant_python-0.15.2/instant_python/templates/boilerplate/pyproject.toml +0 -126
  75. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/int_primitives_mother.py +0 -12
  76. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/int_value_object.py +0 -31
  77. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/string_primitives_mother.py +0 -12
  78. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/string_value_object.py +0 -24
  79. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/uuid.py +0 -33
  80. instant_python-0.15.2/instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py +0 -16
  81. instant_python-0.15.2/instant_python/templates/project_structure/alembic_migrator.yml.j2 +0 -4
  82. instant_python-0.15.2/test/initialize/infra/renderer/test_jinja_environment.py +0 -33
  83. {instant_python-0.15.2 → instant_python-0.16.0}/.github/FUNDING.yml +0 -0
  84. {instant_python-0.15.2 → instant_python-0.16.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  85. {instant_python-0.15.2 → instant_python-0.16.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  86. {instant_python-0.15.2 → instant_python-0.16.0}/.github/actions/python_setup/action.yml +0 -0
  87. {instant_python-0.15.2 → instant_python-0.16.0}/.github/pull_request_template.md +0 -0
  88. {instant_python-0.15.2 → instant_python-0.16.0}/.github/workflows/ci.yml +0 -0
  89. {instant_python-0.15.2 → instant_python-0.16.0}/.github/workflows/pages.yml +0 -0
  90. {instant_python-0.15.2 → instant_python-0.16.0}/.github/workflows/release.yml +0 -0
  91. {instant_python-0.15.2 → instant_python-0.16.0}/.gitignore +0 -0
  92. {instant_python-0.15.2 → instant_python-0.16.0}/.pre-commit-config.yaml +0 -0
  93. {instant_python-0.15.2 → instant_python-0.16.0}/.python-version +0 -0
  94. {instant_python-0.15.2 → instant_python-0.16.0}/CITATION.cff +0 -0
  95. {instant_python-0.15.2 → instant_python-0.16.0}/LICENSE +0 -0
  96. {instant_python-0.15.2 → instant_python-0.16.0}/README.md +0 -0
  97. {instant_python-0.15.2 → instant_python-0.16.0}/SECURITY.md +0 -0
  98. {instant_python-0.15.2 → instant_python-0.16.0}/codeql-config.yml +0 -0
  99. {instant_python-0.15.2 → instant_python-0.16.0}/docs/assets/favicon.svg +0 -0
  100. {instant_python-0.15.2 → instant_python-0.16.0}/docs/assets/logo.svg +0 -0
  101. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/changelog_header.md.j2 +0 -0
  102. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/changelog_init.md.j2 +0 -0
  103. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/changelog_update.md.j2 +0 -0
  104. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/changes.md.j2 +0 -0
  105. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/first_release.md.j2 +0 -0
  106. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/macros.md.j2 +0 -0
  107. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.components/versioned_changes.md.j2 +0 -0
  108. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/.release_notes.md.j2 +0 -0
  109. {instant_python-0.15.2 → instant_python-0.16.0}/docs/changelog/CHANGELOG.md.j2 +0 -0
  110. {instant_python-0.15.2 → instant_python-0.16.0}/docs/development/contributing.md +0 -0
  111. {instant_python-0.15.2 → instant_python-0.16.0}/docs/development/releases.md +0 -0
  112. {instant_python-0.15.2 → instant_python-0.16.0}/docs/development/security.md +0 -0
  113. {instant_python-0.15.2 → instant_python-0.16.0}/docs/downloads_macro.py +0 -0
  114. {instant_python-0.15.2 → instant_python-0.16.0}/docs/getting_started/first_steps.md +0 -0
  115. {instant_python-0.15.2 → instant_python-0.16.0}/docs/getting_started/installation.md +0 -0
  116. {instant_python-0.15.2 → instant_python-0.16.0}/docs/guide/command_config.md +0 -0
  117. {instant_python-0.15.2 → instant_python-0.16.0}/docs/guide/command_init.md +0 -0
  118. {instant_python-0.15.2 → instant_python-0.16.0}/docs/guide/custom_projects.md +0 -0
  119. {instant_python-0.15.2 → instant_python-0.16.0}/docs/guide/default_features.md +0 -0
  120. {instant_python-0.15.2 → instant_python-0.16.0}/docs/guide/index.md +0 -0
  121. {instant_python-0.15.2 → instant_python-0.16.0}/docs/home/index.md +0 -0
  122. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/__init__.py +0 -0
  123. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/cli/__init__.py +0 -0
  124. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/cli/cli.py +0 -0
  125. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/cli/instant_python_typer.py +0 -0
  126. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/__init__.py +0 -0
  127. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/application/__init__.py +0 -0
  128. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/application/config_generator.py +0 -0
  129. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/delivery/__init__.py +0 -0
  130. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/delivery/cli.py +0 -0
  131. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/domain/__init__.py +0 -0
  132. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/domain/config_writer.py +0 -0
  133. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/domain/question_wizard.py +0 -0
  134. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/__init__.py +0 -0
  135. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/__init__.py +0 -0
  136. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/questionary_console_wizard.py +0 -0
  137. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/__init__.py +0 -0
  138. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/dependencies_step.py +0 -0
  139. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/general_step.py +0 -0
  140. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/git_step.py +0 -0
  141. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/questionary.py +0 -0
  142. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/steps.py +0 -0
  143. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/question_wizard/step/template_step.py +0 -0
  144. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/writer/__init__.py +0 -0
  145. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/config/infra/writer/yaml_config_writer.py +0 -0
  146. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/__init__.py +0 -0
  147. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/application/__init__.py +0 -0
  148. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/application/project_initializer.py +0 -0
  149. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/delivery/__init__.py +0 -0
  150. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/delivery/cli.py +0 -0
  151. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/__init__.py +0 -0
  152. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/config_repository.py +0 -0
  153. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/env_manager.py +0 -0
  154. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/node.py +0 -0
  155. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/project_formatter.py +0 -0
  156. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/project_renderer.py +0 -0
  157. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/project_structure.py +0 -0
  158. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/project_writer.py +0 -0
  159. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/domain/version_control_configurer.py +0 -0
  160. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/__init__.py +0 -0
  161. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/env_manager/__init__.py +0 -0
  162. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/env_manager/env_manager_factory.py +0 -0
  163. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/env_manager/pdm_env_manager.py +0 -0
  164. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/env_manager/system_console.py +0 -0
  165. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/env_manager/uv_env_manager.py +0 -0
  166. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/formatter/__init__.py +0 -0
  167. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/formatter/ruff_project_formatter.py +0 -0
  168. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/persistence/__init__.py +0 -0
  169. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/persistence/yaml_config_repository.py +0 -0
  170. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/renderer/__init__.py +0 -0
  171. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/renderer/jinja_project_renderer.py +0 -0
  172. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/version_control/__init__.py +0 -0
  173. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/version_control/git_configurer.py +0 -0
  174. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/writer/__init__.py +0 -0
  175. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/initialize/infra/writer/file_system_project_writer.py +0 -0
  176. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/__init__.py +0 -0
  177. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/application_error.py +0 -0
  178. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/__init__.py +0 -0
  179. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/config_schema.py +0 -0
  180. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/dependency_config.py +0 -0
  181. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/general_config.py +0 -0
  182. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/git_config.py +0 -0
  183. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/domain/template_config.py +0 -0
  184. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/supported_built_in_features.py +0 -0
  185. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/supported_licenses.py +0 -0
  186. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/supported_managers.py +0 -0
  187. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/supported_python_versions.py +0 -0
  188. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/shared/supported_templates.py +0 -0
  189. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/.gitignore +0 -0
  190. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/.python-version +0 -0
  191. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/CITATION.cff +0 -0
  192. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/LICENSE +0 -0
  193. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/README.md +0 -0
  194. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/SECURITY.md +0 -0
  195. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/__init__.py +0 -0
  196. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/domain_event.py +0 -0
  197. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/exchange_type.py +0 -0
  198. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py +0 -0
  199. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/exceptions/__init__.py +0 -0
  200. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/exceptions/base_error.py +0 -0
  201. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/__init__.py +0 -0
  202. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/error_response.py +0 -0
  203. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/fastapi/success_response.py +0 -0
  204. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/github/action.yml +0 -0
  205. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/github/bug_report.yml +0 -0
  206. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/github/feature_request.yml +0 -0
  207. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/logger/__init__.py +0 -0
  208. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/logger/json_formatter.py +0 -0
  209. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/mypy.ini +0 -0
  210. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/__init__.py +0 -0
  211. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/README.md +0 -0
  212. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/__init__.py +0 -0
  213. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/alembic.ini +0 -0
  214. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/postgres_settings.py +0 -0
  215. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/async/script.py.mako +0 -0
  216. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/base.py +0 -0
  217. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/persistence/synchronous/__init__.py +0 -0
  218. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/pytest.ini +0 -0
  219. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/random_generator.py +0 -0
  220. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/add_dependency.py +0 -0
  221. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/create_aggregate.py +0 -0
  222. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/insert_template.py +0 -0
  223. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/integration.sh +0 -0
  224. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/local_setup.py +0 -0
  225. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/post-merge.py +0 -0
  226. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/pre-commit.py +0 -0
  227. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/pre-push.py +0 -0
  228. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/remove_dependency.py +0 -0
  229. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/scripts/unit.sh +0 -0
  230. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/__init__.py +0 -0
  231. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/validation.py +0 -0
  232. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/boilerplate/value_object/value_object.py +0 -0
  233. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/citation.yml.j2 +0 -0
  234. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2 +0 -0
  235. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/clean_architecture/source.yml.j2 +0 -0
  236. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/clean_architecture/test.yml.j2 +0 -0
  237. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/domain_driven_design/bounded_context.yml.j2 +0 -0
  238. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/domain_driven_design/main_structure.yml.j2 +0 -0
  239. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/domain_driven_design/source.yml.j2 +0 -0
  240. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/domain_driven_design/test.yml.j2 +0 -0
  241. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/event_bus_domain.yml.j2 +0 -0
  242. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/fastapi_app.yml.j2 +0 -0
  243. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/fastapi_domain.yml.j2 +0 -0
  244. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/fastapi_infra.yml.j2 +0 -0
  245. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/github_issues_template.yml.j2 +0 -0
  246. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/gitignore.yml.j2 +0 -0
  247. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/license.yml.j2 +0 -0
  248. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/logger.yml.j2 +0 -0
  249. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/macros.j2 +0 -0
  250. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/makefile.yml.j2 +0 -0
  251. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/mypy.yml.j2 +0 -0
  252. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/precommit_hook.yml.j2 +0 -0
  253. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/pyproject.yml.j2 +0 -0
  254. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/pytest.yml.j2 +0 -0
  255. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/python_version.yml.j2 +0 -0
  256. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/readme.yml.j2 +0 -0
  257. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/security.yml.j2 +0 -0
  258. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/standard_project/main_structure.yml.j2 +0 -0
  259. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/standard_project/source.yml.j2 +0 -0
  260. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/standard_project/test.yml.j2 +0 -0
  261. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2 +0 -0
  262. {instant_python-0.15.2 → instant_python-0.16.0}/instant_python/templates/project_structure/test_value_objects.yml.j2 +0 -0
  263. {instant_python-0.15.2 → instant_python-0.16.0}/makefile +0 -0
  264. {instant_python-0.15.2 → instant_python-0.16.0}/mkdocs.yml +0 -0
  265. {instant_python-0.15.2 → instant_python-0.16.0}/mypy.ini +0 -0
  266. {instant_python-0.15.2 → instant_python-0.16.0}/scripts/add_dependency.py +0 -0
  267. {instant_python-0.15.2 → instant_python-0.16.0}/scripts/remove_dependency.py +0 -0
  268. {instant_python-0.15.2 → instant_python-0.16.0}/test/__init__.py +0 -0
  269. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/__init__.py +0 -0
  270. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/application/__init__.py +0 -0
  271. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/application/test_config_generator.py +0 -0
  272. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/infra/__init__.py +0 -0
  273. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/infra/writer/__init__.py +0 -0
  274. {instant_python-0.15.2 → instant_python-0.16.0}/test/config/infra/writer/test_yaml_config_writer.py +0 -0
  275. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/__init__.py +0 -0
  276. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/application/__init__.py +0 -0
  277. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/application/test_project_initializer.py +0 -0
  278. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/__init__.py +0 -0
  279. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approvaltests_config.json +0 -0
  280. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approved_files/TestInitCli.test_should_initialize_project_with_custom_project_structure.approved.txt +0 -0
  281. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approved_files/TestInitCli.test_should_initialize_project_with_general_section_combinations.approved.txt +0 -0
  282. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approved_files/TestInitCli.test_should_initialize_project_with_git_section_combinations.approved.txt +0 -0
  283. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approved_files/TestInitCli.test_should_initialize_project_with_predefined_dependencies_and_different_managers.approved.txt +0 -0
  284. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/approved_files/TestInitCli.test_should_initialize_project_with_template_section_combinations.approved.txt +0 -0
  285. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/delivery/test_init_cli.py +0 -0
  286. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/domain/__init__.py +0 -0
  287. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/domain/mothers/__init__.py +0 -0
  288. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/domain/mothers/node_mother.py +0 -0
  289. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/domain/mothers/project_structure_mother.py +0 -0
  290. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/domain/test_node.py +0 -0
  291. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/__init__.py +0 -0
  292. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/__init__.py +0 -0
  293. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/mother/__init__.py +0 -0
  294. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/mother/command_execution_result_mother.py +0 -0
  295. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/test_pdm_env_manager.py +0 -0
  296. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/test_system_console.py +0 -0
  297. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/env_manager/test_uv_env_manager.py +0 -0
  298. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/formatter/__init__.py +0 -0
  299. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/formatter/test_ruff_project_formatter.py +0 -0
  300. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/persistence/__init__.py +0 -0
  301. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/persistence/approvaltests_config.json +0 -0
  302. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/persistence/approved_files/TestYamlConfigRepository.test_should_read_existing_config_file.approved.txt +0 -0
  303. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/persistence/test_yaml_config_repository.py +0 -0
  304. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/renderer/__init__.py +0 -0
  305. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/renderer/test_jinja_project_renderer.py +0 -0
  306. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/version_control/__init__.py +0 -0
  307. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/version_control/test_git_configurer.py +0 -0
  308. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/writer/TestFileSystemProjectWriter.test_should_create_file_in_file_system.approved.txt +0 -0
  309. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/writer/TestFileSystemProjectWriter.test_should_create_python_module_in_file_system.approved.txt +0 -0
  310. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/writer/TestFileSystemProjectWriter.test_should_create_standard_directory_in_file_system.approved.txt +0 -0
  311. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/writer/__init__.py +0 -0
  312. {instant_python-0.15.2 → instant_python-0.16.0}/test/initialize/infra/writer/test_file_system_project_writer.py +0 -0
  313. {instant_python-0.15.2 → instant_python-0.16.0}/test/random_generator.py +0 -0
  314. {instant_python-0.15.2 → instant_python-0.16.0}/test/resources/base_ipy_config.yml +0 -0
  315. {instant_python-0.15.2 → instant_python-0.16.0}/test/resources/domain_error_template.py +0 -0
  316. {instant_python-0.15.2 → instant_python-0.16.0}/test/resources/hello_world.j2 +0 -0
  317. {instant_python-0.15.2 → instant_python-0.16.0}/test/resources/main_structure.yml.j2 +0 -0
  318. {instant_python-0.15.2 → instant_python-0.16.0}/test/resources/standard_project/main_structure.yml.j2 +0 -0
  319. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/__init__.py +0 -0
  320. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/__init__.py +0 -0
  321. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/__init__.py +0 -0
  322. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/config_schema_mother.py +0 -0
  323. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/dependency_config_mother.py +0 -0
  324. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/general_config_mother.py +0 -0
  325. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/git_config_mother.py +0 -0
  326. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/mothers/template_config_mother.py +0 -0
  327. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/test_config_schema.py +0 -0
  328. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/test_dependency_config.py +0 -0
  329. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/test_general_config.py +0 -0
  330. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/test_git_config.py +0 -0
  331. {instant_python-0.15.2 → instant_python-0.16.0}/test/shared/domain/test_template_configuration.py +0 -0
  332. {instant_python-0.15.2 → instant_python-0.16.0}/test/utils.py +0 -0
  333. {instant_python-0.15.2 → instant_python-0.16.0}/tox.ini +0 -0
@@ -2,6 +2,86 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v0.16.0 (2025-11-12)
6
+
7
+ ### ✨ Features
8
+
9
+ - **initialize**: Add resolve_import_path filter to jinja environment
10
+ ([`22d7fa7`](https://github.com/dimanu-py/instant-python/commit/22d7fa7d9d671f21a9807e8f08ea5882f99eefcb))
11
+
12
+ - **initialize**: Add _resolve_import_path function to be able to get the full import path
13
+ ([`1b284ab`](https://github.com/dimanu-py/instant-python/commit/1b284ab4821d3ff91c73bac00717dd96b366b566))
14
+
15
+ ### 🪲 Bug Fixes
16
+
17
+ - **templates**: Include pydantic and pydantic settings deps by default when async sqlalchemy is
18
+ selected
19
+ ([`a8b1f5d`](https://github.com/dimanu-py/instant-python/commit/a8b1f5df7ffb96040ea0abaa78c4f884b6eaa097))
20
+
21
+ - **templates**: Correct import in domain_event_json_deserializer.py template
22
+ ([`33a8864`](https://github.com/dimanu-py/instant-python/commit/33a88646e57251b7c818839388373a1c0ee9ca6d))
23
+
24
+ - **templates**: Correct templates names in event_bus_infra.yml.j2
25
+ ([`41a49f8`](https://github.com/dimanu-py/instant-python/commit/41a49f8ddb5a7c456025e7996a511fe8f4fdb1fb))
26
+
27
+ - **templates**: Write correct names in GitHub action and value object templates
28
+ ([`7b96b4c`](https://github.com/dimanu-py/instant-python/commit/7b96b4c0378a0b92cf65c5ad5d43ada73e87e4fa))
29
+
30
+ - **templates**: Import UUID inside uuid.py template
31
+ ([`c5d0045`](https://github.com/dimanu-py/instant-python/commit/c5d0045defadf3d36f323a0e878dce32abc89b70))
32
+
33
+ - **templates**: Correct wrong indentation in dependencies in pyproject.toml file and write them in
34
+ separate lines
35
+ ([`60c6ca0`](https://github.com/dimanu-py/instant-python/commit/60c6ca059d99451a73287d147e107581c95e3f96))
36
+
37
+ ### ♻️ Refactoring
38
+
39
+ - **templates**: Move persistence folder with postgres settings structure to its separate template
40
+ and import it as expected in sqlalchemy and migrator
41
+ ([`022ead8`](https://github.com/dimanu-py/instant-python/commit/022ead8119bcb53147e796311a6396643d1fb102))
42
+
43
+ - **templates**: Modify imports in boilerplate to import postgres settings from persistence
44
+ ([`f5cefc3`](https://github.com/dimanu-py/instant-python/commit/f5cefc333c268a26cf8e95c7684df7dfda1c158c))
45
+
46
+ - **templates**: Write postgres settings file inside persistence folder instead of
47
+ persistence/sqlalchemy
48
+ ([`841f24e`](https://github.com/dimanu-py/instant-python/commit/841f24ea8c39967f759ae1b1e0210f4e50697ce4))
49
+
50
+ - **templates**: Include models metadata file only if async sqlalchemy has been included
51
+ ([`ca892e6`](https://github.com/dimanu-py/instant-python/commit/ca892e61973761b6dba52ccdb813ea99a0e69a0b))
52
+
53
+ - **templates**: Remove extra empty lines in makefile template
54
+ ([`1cb2153`](https://github.com/dimanu-py/instant-python/commit/1cb2153f6c7a59bebb751c5d07452a21faae75c8))
55
+
56
+ - **templates**: Update how development dependencies are set in the pyproject.toml template file
57
+ ([`9613543`](https://github.com/dimanu-py/instant-python/commit/961354338756f6d8d2f95eaca173fdc540ecd67f))
58
+
59
+ - **templates**: Update how production dependencies are set in the pyproject.toml template file
60
+ ([`7dd9be7`](https://github.com/dimanu-py/instant-python/commit/7dd9be7051cae7dacb7c780c072383410111602b))
61
+
62
+ - **templates**: Update pyproject.toml to support dynamic dependency manager and conditional ruff
63
+ configuration
64
+ ([`5209286`](https://github.com/dimanu-py/instant-python/commit/52092862625d8d75d920afabf266562f92c32fb5))
65
+
66
+ - **templates**: Modify github release workflow to use user's dependency manager to build library
67
+ instead of hardcoding uv
68
+ ([`6555ba1`](https://github.com/dimanu-py/instant-python/commit/6555ba12921c4e052bce1d64ed093cb339b8d6bb))
69
+
70
+ - **templates**: Modify default github ci workflow to use user's dependency manager to run tests
71
+ instead of hardcoding uv
72
+ ([`d2a8fd0`](https://github.com/dimanu-py/instant-python/commit/d2a8fd014e3988a0aa5874202a77d07e8b4bb3cd))
73
+
74
+ - **templates**: Modify makefile template to be easier to change with local variables
75
+ ([`9ba8ead`](https://github.com/dimanu-py/instant-python/commit/9ba8eadc8578c2a93f0b6a21906d09adbb2abcc3))
76
+
77
+ - **templates**: Include pre push stages in pre commit hook file only if makefile built in feature
78
+ is selected
79
+ ([`e138a0e`](https://github.com/dimanu-py/instant-python/commit/e138a0ec765cabcb1cd7d028fa805a42916df8ef))
80
+
81
+ - **templates**: Simplify import statements using resolve_import_path filter
82
+ ([`644da31`](https://github.com/dimanu-py/instant-python/commit/644da319a4a8694aa235ee855e0282f10e5a17a9))
83
+
84
+
5
85
  ## v0.15.2 (2025-11-10)
6
86
 
7
87
  ### 🪲 Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instant-python
3
- Version: 0.15.2
3
+ Version: 0.16.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/
@@ -30,6 +30,7 @@ class JinjaEnvironment:
30
30
  self.add_filter("is_in", _is_in)
31
31
  self.add_filter("compute_base_path", _compute_base_path)
32
32
  self.add_filter("has_dependency", _has_dependency)
33
+ self.add_filter("resolve_import_path", _resolve_import_path)
33
34
 
34
35
  def render_template(self, name: str, context: dict[str, Any] | None = None) -> str:
35
36
  template = self._env.get_template(name)
@@ -63,3 +64,8 @@ def _compute_base_path(initial_path: str, template_type: str) -> str:
63
64
  return ".".join(path_components[2:])
64
65
  else:
65
66
  raise UnknownTemplateError(template_type)
67
+
68
+
69
+ def _resolve_import_path(initial_path: str, template_type: str) -> str:
70
+ base_path = _compute_base_path(initial_path, template_type)
71
+ return f".{base_path}" if base_path else ""
@@ -54,6 +54,7 @@ repos:
54
54
  stages:
55
55
  - commit-msg
56
56
 
57
+ {% if "makefile" in template.built_in_features %}
57
58
  - repo: local
58
59
  hooks:
59
60
  - id: lint
@@ -69,3 +70,4 @@ repos:
69
70
  language: system
70
71
  stages:
71
72
  - pre-push
73
+ {% endif %}
@@ -0,0 +1,25 @@
1
+ import json
2
+
3
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
4
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event_subscriber" | resolve_import_path(template.name) }} import (
5
+ DomainEventSubscriber,
6
+ )
7
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event_type_not_found_errorr" | resolve_import_path(template.name) }} import (
8
+ DomainEventTypeNotFoundError,
9
+ )
10
+
11
+
12
+ class DomainEventJsonDeserializer:
13
+ _events_mapping: dict[str, type[DomainEvent]]
14
+
15
+ def __init__(self, subscriber: DomainEventSubscriber[DomainEvent]) -> None:
16
+ self._events_mapping = {event.name(): event for event in subscriber.subscribed_to()}
17
+
18
+ def deserialize(self, body: bytes) -> DomainEvent:
19
+ content = json.loads(body)
20
+ event_class = self._events_mapping.get(content["data"]["type"])
21
+
22
+ if not event_class:
23
+ raise DomainEventTypeNotFoundError(content["data"]["type"])
24
+
25
+ return event_class(**content["data"]["attributes"])
@@ -1,11 +1,6 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
1
  import json
3
2
 
4
- {% if template_domain_import %}
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 %}
3
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
9
4
 
10
5
 
11
6
  class DomainEventJsonSerializer:
@@ -1,12 +1,7 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
1
  {% if python_version in ["3.12", "3.13"] %}
3
2
  from abc import ABC, abstractmethod
4
3
 
5
- {% if template_domain_import %}
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 %}
4
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
10
5
 
11
6
 
12
7
  class DomainEventSubscriber[EventType: DomainEvent](ABC):
@@ -22,11 +17,7 @@ class DomainEventSubscriber[EventType: DomainEvent](ABC):
22
17
  from abc import ABC, abstractmethod
23
18
  from typing import Generic, TypeVar
24
19
 
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 %}
20
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
30
21
 
31
22
  EventType = TypeVar("EventType", bound=DomainEvent)
32
23
 
@@ -0,0 +1,18 @@
1
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
2
+ from {{ general.source_name }}{{ "shared.domain.value_objects.aggregate" | resolve_import_path(template.name) }} import Aggregate
3
+
4
+
5
+ class EventAggregate(Aggregate):
6
+ _domain_events: list[DomainEvent]
7
+
8
+ def __init__(self) -> None:
9
+ self._domain_events = []
10
+
11
+ def record(self, event: DomainEvent) -> None:
12
+ self._domain_events.append(event)
13
+
14
+ def pull_domain_events(self) -> list[DomainEvent]:
15
+ recorded_domain_events = self._domain_events
16
+ self._domain_events = []
17
+
18
+ return recorded_domain_events
@@ -0,0 +1,9 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
4
+
5
+
6
+ class EventBus(ABC):
7
+ @abstractmethod
8
+ async def publish(self, events: list[DomainEvent]) -> None:
9
+ raise NotImplementedError
@@ -0,0 +1,16 @@
1
+ from unittest.mock import AsyncMock
2
+
3
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
4
+ from {{ general.source_name }}{{ "shared.domain.event.event_bus" | resolve_import_path(template.name) }} import EventBus
5
+
6
+
7
+ class MockEventBus(EventBus):
8
+ def __init__(self) -> None:
9
+ self._mock_publish = AsyncMock()
10
+
11
+ async def publish(self, events: list[DomainEvent]) -> None:
12
+ await self._mock_publish(events)
13
+
14
+ def should_have_published(self, event: DomainEvent) -> None:
15
+ self._mock_publish.assert_awaited_once_with([event])
16
+ self._mock_publish.reset_mock()
@@ -1,32 +1,13 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
3
-
4
- {% if template_domain_import %}
5
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
6
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
7
- DomainEventSubscriber,
8
- )
9
- {% else %}
10
- from {{ general.source_name }}.event.domain_event import DomainEvent
11
- from {{ general.source_name }}.event.domain_event_subscriber import (
1
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
2
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event_subscriber" | resolve_import_path(template.name) }} import (
12
3
  DomainEventSubscriber,
13
4
  )
14
- {% endif %}
15
- {% if template_infra_import %}
16
- from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_connection import (
17
- RabbitMqConnection,
18
- )
19
- from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
20
- RabbitMqQueueFormatter,
21
- )
22
- {% else %}
23
- from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_connection import (
5
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_connection" | resolve_import_path(template.name) }} import (
24
6
  RabbitMqConnection,
25
7
  )
26
- from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
8
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_queue_formatter" | resolve_import_path(template.name) }} import (
27
9
  RabbitMqQueueFormatter,
28
10
  )
29
- {% endif %}
30
11
 
31
12
 
32
13
  class RabbitMqConfigurer:
@@ -1,30 +1,15 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
3
1
  from typing import Callable
4
2
 
5
3
  import pika
6
4
  from pika.adapters.blocking_connection import BlockingChannel
7
5
 
8
- {% if template_domain_import %}
9
- from {{ general.source_name }}.{{ template_domain_import }}.event.exchange_type import ExchangeType
10
- from {{ general.source_name }}.{{ template_domain_import }}.errors.rabbit_mq_connection_not_established_error import (
6
+ from {{ general.source_name }}{{ "shared.domain.event.exchange_type" | resolve_import_path(template.name) }} import ExchangeType
7
+ from {{ general.source_name }}{{ "shared.domain.errors.rabbit_mq_connection_not_established_error" | resolve_import_path(template.name) }} import (
11
8
  RabbitMqConnectionNotEstablishedError,
12
9
  )
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 %}
20
- from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_settings import (
21
- RabbitMqSettings,
22
- )
23
- {% else %}
24
- from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_settings import (
10
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_settings" | resolve_import_path(template.name) }} import (
25
11
  RabbitMqSettings,
26
12
  )
27
- {% endif %}
28
13
 
29
14
 
30
15
  class RabbitMqConnection:
@@ -1,40 +1,19 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
3
1
  from pika.adapters.blocking_connection import BlockingChannel
4
2
  from pika.spec import Basic, BasicProperties
5
3
 
6
- {% if template_domain_import %}
7
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
8
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
4
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
5
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event_subscriber" | resolve_import_path(template.name) }} import (
9
6
  DomainEventSubscriber,
10
7
  )
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 %}
18
- from {{ general.source_name }}.{{ template_infra_import }}.event.domain_event_json_deserializer import (
19
- DomainEventJsonDeserializer,
20
- )
21
- from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_connection import (
22
- RabbitMqConnection,
23
- )
24
- from {{ general.source_name }}.{{ template_infra_import }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
25
- RabbitMqQueueFormatter,
26
- )
27
- {% else %}
28
- from {{ general.source_name }}.event.domain_event_json_deserializer import (
8
+ from {{ general.source_name }}{{ "shared.infra.event.domain_event_json_deserializer" | resolve_import_path(template.name) }} import (
29
9
  DomainEventJsonDeserializer,
30
10
  )
31
- from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_connection import (
11
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_connection" | resolve_import_path(template.name) }} import (
32
12
  RabbitMqConnection,
33
13
  )
34
- from {{ general.source_name }}.event.rabbit_mq.rabbit_mq_queue_formatter import (
14
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_queue_formatter" | resolve_import_path(template.name) }} import (
35
15
  RabbitMqQueueFormatter,
36
16
  )
37
- {% endif %}
38
17
 
39
18
 
40
19
  class RabbitMqConsumer:
@@ -0,0 +1,26 @@
1
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
2
+ from {{ general.source_name }}{{ "shared.domain.event.event_bus" | resolve_import_path(template.name) }} import EventBus
3
+ from {{ general.source_name }}{{ "shared.infra.event.domain_event_json_serializer" | resolve_import_path(template.name) }} import (
4
+ DomainEventJsonSerializer,
5
+ )
6
+ from {{ general.source_name }}{{ "shared.infra.event.rabbit_mq.rabbit_mq_connection" | resolve_import_path(template.name) }} import (
7
+ RabbitMqConnection,
8
+ )
9
+
10
+
11
+ class RabbitMqEventBus(EventBus):
12
+ def __init__(self, client: RabbitMqConnection, exchange_name: str) -> None:
13
+ self._client = client
14
+ self._exchange_name = exchange_name
15
+ self._event_serializer = DomainEventJsonSerializer()
16
+
17
+ def publish(self, events: list[DomainEvent]) -> None:
18
+ for event in events:
19
+ self._client.publish(
20
+ content=self._serialize_event(event),
21
+ exchange=self._exchange_name,
22
+ routing_key=event.name(),
23
+ )
24
+
25
+ def _serialize_event(self, event: DomainEvent) -> str:
26
+ return self._event_serializer.serialize(event)
@@ -1,17 +1,9 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
1
  import re
3
2
 
4
- {% if template_domain_import %}
5
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event import DomainEvent
6
- from {{ general.source_name }}.{{ template_domain_import }}.event.domain_event_subscriber import (
3
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event" | resolve_import_path(template.name) }} import DomainEvent
4
+ from {{ general.source_name }}{{ "shared.domain.event.domain_event_subscriber" | resolve_import_path(template.name) }} import (
7
5
  DomainEventSubscriber,
8
6
  )
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
7
 
16
8
 
17
9
  class RabbitMqQueueFormatter:
@@ -0,0 +1,6 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.base_error" | resolve_import_path(template.name) }} import BaseError
2
+
3
+
4
+ class DomainError(BaseError):
5
+ ...
6
+
@@ -0,0 +1,6 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
2
+
3
+
4
+ class DomainEventTypeNotFoundError(DomainError):
5
+ def __init__(self, name: str) -> None:
6
+ super().__init__(message=f"Event type {name} not found among subscriber.")
@@ -0,0 +1,10 @@
1
+ from typing import TypeVar
2
+
3
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
4
+
5
+ T = TypeVar("T")
6
+
7
+
8
+ class IncorrectValueTypeError(DomainError):
9
+ def __init__(self, value: T) -> None:
10
+ super().__init__(message=f"Value '{value}' is not of type {type(value).__name__}")
@@ -0,0 +1,6 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
2
+
3
+
4
+ class InvalidIdFormatError(DomainError):
5
+ def __init__(self) -> None:
6
+ super().__init__(message="Id must be a valid UUID")
@@ -0,0 +1,6 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
2
+
3
+
4
+ class InvalidNegativeValueError(DomainError):
5
+ def __init__(self, value: int) -> None:
6
+ super().__init__(message=f"Invalid negative value: {value}")
@@ -0,0 +1,7 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
2
+
3
+
4
+
5
+ class RabbitMqConnectionNotEstablishedError(DomainError):
6
+ def __init__(self) -> None:
7
+ super().__init__(message="RabbitMQ connection not established.")
@@ -0,0 +1,6 @@
1
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
2
+
3
+
4
+ class RequiredValueError(DomainError):
5
+ def __init__(self) -> None:
6
+ super().__init__(message="Value is required, can't be None")
@@ -1,5 +1,3 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
3
1
  from fastapi import FastAPI
4
2
  {% if "logger" in template.built_in_features %}
5
3
  from fastapi.errors import RequestValidationError
@@ -40,17 +38,9 @@ from {{ general.source_name }}.api.lifespan import lifespan
40
38
  from {{ general.source_name }}.delivery.api.lifespan import lifespan
41
39
  {% endif %}
42
40
  {% endif %}
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 %}
41
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
48
42
  {% if "logger" in template.built_in_features %}
49
- {% if template_infra_import %}
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 %}
43
+ from {{ general.source_name }}{{ "shared.infra.logger.file_logger" | resolve_import_path(template.name) }} import create_file_logger
54
44
  {% if template.name == template_types.STANDARD %}
55
45
  from {{ general.source_name }}.api.middleare.fast_api_log_middleware import FastapiLogMiddleware
56
46
  {% else %}
@@ -1,26 +1,12 @@
1
- {% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
2
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
3
1
  from fastapi import Request
4
2
  from fastapi.responses import JSONResponse
5
3
  {% if "logger" in template.built_in_features %}
6
4
  from fastapi.errors import RequestValidationError
7
5
  from fastapi.exception_handlers import request_validation_exception_handler
8
- {% if template_infra_import %}
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 %}
13
- {% endif %}
14
- {% if template_infra_import %}
15
- from {{ general.source_name }}.{{ template_infra_import }}.http.error_response import InternalServerError, UnprocessableEntityError
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
6
+ from {{ general.source_name }}{{ "shared.infra.logger.file_logger" | resolve_import_path(template.name) }} import create_file_logger
23
7
  {% endif %}
8
+ from {{ general.source_name }}{{ "shared.infra.http.error_response" | resolve_import_path(template.name) }} import InternalServerError, UnprocessableEntityError
9
+ from {{ general.source_name }}{{ "shared.domain.errors.domain_error" | resolve_import_path(template.name) }} import DomainError
24
10
 
25
11
 
26
12
  {% if "logger" in template.built_in_features %}
@@ -1,14 +1,9 @@
1
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
2
1
  import time
3
2
 
4
3
  from fastapi import Request, Response, FastAPI
5
4
  from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
6
5
 
7
- {% if template_infra_import %}
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 %}
6
+ from {{ general.source_name }}{{ "shared.infra.logger.file_logger" | resolve_import_path(template.name) }} import FileLogger
12
7
 
13
8
 
14
9
  class FastapiLogMiddleware(BaseHTTPMiddleware):
@@ -0,0 +1,13 @@
1
+ from collections.abc import AsyncGenerator
2
+ from contextlib import asynccontextmanager
3
+
4
+ from fastapi import FastAPI
5
+
6
+ from {{ general.source_name }}{{ "shared.infra.alembic_migrator" | resolve_import_path(template.name) }} import AlembicMigrator
7
+
8
+
9
+ @asynccontextmanager
10
+ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]:
11
+ migrator = AlembicMigrator()
12
+ await migrator.migrate()
13
+ yield
@@ -183,10 +183,10 @@ jobs:
183
183
  uses: ./.github/actions/python_setup
184
184
 
185
185
  - name: 📦 Install test dependencies
186
- run: uv pip install pytest pytest-cov
186
+ run: {{ general.dependency_manager }} add pytest pytest-cov
187
187
 
188
188
  - name: 🏃 Run tests
189
- run: uv run pytest --cov --cov-report=xml --cov-branch test -ra -s
189
+ run: {{ general.dependency_manager }} run pytest --cov --cov-report=xml --cov-branch test -ra -s
190
190
 
191
191
  - name: 📥 Upload coverage report to Codecov
192
192
  uses: codecov/codecov-action@v5
@@ -88,7 +88,7 @@ jobs:
88
88
  uses: ./.github/actions/python_setup
89
89
 
90
90
  - name: 🏃 Build package
91
- run: uv build
91
+ run: {{ general.dependency_manager }} build
92
92
 
93
93
  - name: 🚀 Publish
94
94
  uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,11 +1,6 @@
1
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
2
1
  import logging
3
2
 
4
- {% if template_infra_import %}
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 %}
3
+ from {{ general.source_name }}{{ "shared.infra.logger.file_rotating_handler" | resolve_import_path(template.name) }} import TimeRotatingFileHandler
9
4
 
10
5
 
11
6
  class FileLogger:
@@ -1,4 +1,3 @@
1
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
2
1
  import logging
3
2
  from collections.abc import Sequence
4
3
  from datetime import date
@@ -6,11 +5,7 @@ from logging.handlers import TimedRotatingFileHandler
6
5
  from pathlib import Path
7
6
  from typing import Self
8
7
 
9
- {% if template_infra_import %}
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 %}
8
+ from {{ general.source_name }}{{ "shared.infra.logger.json_formatter" | resolve_import_path(template.name) }} import JSONFormatter
14
9
 
15
10
 
16
11
  class TimeRotatingFileHandler(logging.Handler):
@@ -1,11 +1,6 @@
1
- {% set template_infra_import = "shared.infra"|compute_base_path(template.name) %}
2
1
  import asyncio
3
2
 
4
- {% if template_infra_import %}
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 %}
3
+ from {{ general.source_name }}{{ "shared.infra.persistence.postgres_settings" | resolve_import_path(template.name) }} import PostgresSettings
9
4
  from alembic import command
10
5
  from alembic.config import Config
11
6