instant-python 0.10.0__tar.gz → 0.11.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.
- {instant_python-0.10.0 → instant_python-0.11.0}/CHANGELOG.md +24 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/PKG-INFO +1 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +11 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +9 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/event_bus.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +5 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +16 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +14 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +19 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +14 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/domain_error.py +11 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +10 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +15 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +11 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +11 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +12 -0
- instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/required_value_error.py +11 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/application.py +9 -2
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/error_handlers.py +14 -2
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/fastapi_log_middleware.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/lifespan.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/logger/file_logger.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/logger/file_rotating_handler.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/alembic_migrator.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/env.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/models_metadata.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +10 -2
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +6 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +11 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/pyproject.toml +16 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/insert_template.py +3 -3
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/makefile +4 -4
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/aggregate.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/int_primitives_mother.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/int_value_object.py +8 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/string_primitives_mother.py +4 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/string_value_object.py +7 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/test_int_value_object.py +16 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/test_string_value_object.py +13 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/test_uuid_value_object.py +16 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/uuid.py +8 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/uuid_primitives_mother.py +4 -0
- instant_python-0.11.0/instant_python/templates/project_structure/makefile.yml.j2 +3 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/value_objects.yml.j2 +1 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/pyproject.toml +1 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/uv.lock +1 -1
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/domain_error.py +0 -6
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +0 -9
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +0 -13
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +0 -9
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +0 -9
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +0 -9
- instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/required_value_error.py +0 -9
- instant_python-0.10.0/instant_python/templates/project_structure/makefile.yml.j2 +0 -29
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/FUNDING.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/actions/python_setup/action.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/pull_request_template.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/workflows/ci.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/workflows/pages.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.github/workflows/release.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.gitignore +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.pre-commit-config.yaml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/.python-version +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/CITATION.cff +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/LICENSE +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/README.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/SECURITY.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/codeql-config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/assets/favicon.svg +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/assets/logo.svg +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/changelog_header.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/changelog_init.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/changelog_update.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/changes.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/first_release.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/macros.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.components/versioned_changes.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/.release_notes.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/changelog/CHANGELOG.md.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/downloads_macro.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/examples/configuration.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/examples/custom_template.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/guide/command_config.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/guide/command_init.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/home/contributing.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/home/getting_started.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/home/index.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/home/releases.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/docs/home/security.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/cli/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/cli/cli.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/cli/instant_python_typer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/commands/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/commands/config.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/commands/init.py +1 -1
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/configuration_schema.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/dependency/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/dependency/dependency_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/dependency/not_dev_dependency_included_in_group.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/general/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/general/general_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/general/invalid_dependency_manager_value.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/general/invalid_license_value.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/general/invalid_python_version_value.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/git/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/git/git_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/git/git_user_or_email_not_present.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/config_key_not_present.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/configuration_file_not_found.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/empty_configuration_not_allowed.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/missing_mandatory_fields.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/parser/parser.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/boolean_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/choice_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/conditional_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/free_text_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/multiple_choice_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question/questionary.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/question_wizard.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/dependencies_step.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/general_step.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/git_step.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/steps.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/step/template_step.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/bounded_context_not_applicable.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/bounded_context_not_especified.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/invalid_built_in_features_values.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/invalid_template_value.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/configuration/template/template_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/command_execution_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/dependency_manager_factory.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/pdm_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/unknown_dependency_manager_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/dependency_manager/uv_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/formatter/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/formatter/project_formatter.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/git/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/git/git_configurer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/directory.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/file.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/file_has_not_been_created.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/file_system.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/node.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/project_creator/unknown_node_typer_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/custom_project_renderer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/jinja_custom_filters.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/jinja_environment.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/jinja_project_renderer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/template_file_not_found_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/render/unknown_template_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/application_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/error_types.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/supported_built_in_features.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/supported_licenses.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/supported_managers.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/supported_python_versions.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/shared/supported_templates.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/.gitignore +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/.pre-commit-config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/.python-version +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/CITATION.cff +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/LICENSE +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/README.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/SECURITY.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/domain_event.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/event_aggregate.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/exchange_type.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/exceptions/__init__.py +0 -0
- /instant_python-0.10.0/instant_python/templates/boilerplate/exceptions/error.py → /instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/base_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/error_response.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/fastapi/success_response.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/github/action.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/github/bug_report.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/github/ci.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/github/feature_request.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/github/release.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/logger/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/logger/json_formatter.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/mypy.ini +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/README.md +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/alembic.ini +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/postgres_settings.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/async/script.py.mako +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/base.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/persistence/synchronous/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/pytest.ini +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/random_generator.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/add_dependency.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/create_aggregate.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/integration.sh +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/local_setup.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/post-merge.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/pre-commit.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/pre-push.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/remove_dependency.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/scripts/unit.sh +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/validation.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/value_object/value_object.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/alembic_migrator.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/async_alembic.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/async_sqlalchemy.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/citation.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/clean_architecture/source.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/clean_architecture/test.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/domain_driven_design/bounded_context.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/domain_driven_design/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/domain_driven_design/source.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/domain_driven_design/test.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/event_bus_domain.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/event_bus_infra.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/fastapi_app.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/fastapi_domain.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/fastapi_infra.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/github_action.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/github_issues_template.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/gitignore.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/license.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/logger.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/macros.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/mypy.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/precommit_hook.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/pyproject.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/pytest.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/python_version.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/readme.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/security.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/standard_project/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/standard_project/source.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/standard_project/test.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/project_structure/test_value_objects.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/makefile +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/mkdocs.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/mypy.ini +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/scripts/add_dependency.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/scripts/remove_dependency.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/dependency/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/dependency/dependency_configuration_mother.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/dependency/test_dependency_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/general/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/general/general_configuration_mother.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/general/test_general_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/git/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/git/git_configuration_mother.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/git/test_git_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/approvaltests_config.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/approved_files/TestParser.test_should_parse_configuration.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/empty_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/missing_dependencies_fields_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/missing_general_fields_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/missing_git_fields_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/missing_keys_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/resources/missing_template_fields_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/parser/test_parser.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/question/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/question/test_boolean_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/question/test_choice_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/question/test_free_text_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/question/test_multiple_choice_question.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/template/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/template/template_configuration_mother.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/configuration/template/test_template_configuration.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/dependency_manager/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/dependency_manager/mock_pdm_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/dependency_manager/mock_uv_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/dependency_manager/test_pdm_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/dependency_manager/test_uv_dependency_manager.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/formatter/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/formatter/mock_project_formatter.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/formatter/test_project_formatter.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/git/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/git/mock_git_configurer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/git/test_git_configurer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approvaltests_config.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_file_system_in_disk.rendered_custom_project_structure.json.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_file_system_in_disk.rendered_project_structure.json.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_file_system_in_disk.rendered_project_structure_fastapi_with_logger.json.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_file_system_in_disk.rendered_project_structure_fastapi_with_migrator.json.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_file_system_in_disk.rendered_project_structure_only_with_fastapi.json.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_create_folders_and_files.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/approved_files/TestFileSystem.test_should_generate_file_system_tree.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/directory_mother.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/exceptions/domain_error.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/exceptions/domain_error_simple.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/fastapi/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/fastapi/application.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/fastapi/http_response.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/fastapi/lifespan.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/logger/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/logger/logger.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/boilerplate/persistence/alembic_migrator.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/clean_architecture/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/config_fastapi_with_logger.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/config_fastapi_with_migrator.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/config_with_only_fastapi.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/rendered_custom_project_structure.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/rendered_project_structure.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/rendered_project_structure_fastapi_with_logger.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/rendered_project_structure_fastapi_with_migrator.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/resources/rendered_project_structure_only_with_fastapi.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/test_directory.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/test_file.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/project_creator/test_file_system.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/random_generator.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/__init__.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approvaltests_config.json +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestCustomProjectRenderer.test_should_render_custom_template.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestJinjaProjectRenderer.test_should_render_template_for.clean_architecture_config.yml.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestJinjaProjectRenderer.test_should_render_template_for.domain_driven_design_config.yml.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestJinjaProjectRenderer.test_should_render_template_for.received.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestJinjaProjectRenderer.test_should_render_template_for.standard_project_with_dependency_config.yml.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/approved_files/TestJinjaProjectRenderer.test_should_render_template_for.standard_project_with_git_config.yml.approved.txt +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/clean_architecture/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/clean_architecture_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/custom_template.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/domain_driven_design/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/domain_driven_design_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/standard_project/main_structure.yml.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/standard_project_with_dependency_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/standard_project_with_git_config.yml +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/resources/test_template.j2 +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/test_custom_project_renderer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/test_jinja_environment.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/test/render/test_jinja_project_renderer.py +0 -0
- {instant_python-0.10.0 → instant_python-0.11.0}/tox.ini +0 -0
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- version list -->
|
|
4
4
|
|
|
5
|
+
## v0.11.0 (2025-09-30)
|
|
6
|
+
|
|
7
|
+
### ✨ Features
|
|
8
|
+
|
|
9
|
+
- **templates**: Add ruff linter and formatter rules in pyproject.toml template file
|
|
10
|
+
([`b600f62`](https://github.com/dimanu-py/instant-python/commit/b600f62ab807d0ed5309ee199fd6b772dad55317))
|
|
11
|
+
|
|
12
|
+
### 🪲 Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **templates**: Correct imports when selected template was standard project
|
|
15
|
+
([`4d8bda4`](https://github.com/dimanu-py/instant-python/commit/4d8bda4fb246a59e5556c78b5317845614e3f8b5))
|
|
16
|
+
|
|
17
|
+
### ♻️ Refactoring
|
|
18
|
+
|
|
19
|
+
- **templates**: Modify makefile template file simplifying add-dep and remove-dep commands
|
|
20
|
+
([`eb883f3`](https://github.com/dimanu-py/instant-python/commit/eb883f31aba41faf8b38908317ea02b53e700874))
|
|
21
|
+
|
|
22
|
+
- **templates**: Rename template file for base error
|
|
23
|
+
([`3a30d3d`](https://github.com/dimanu-py/instant-python/commit/3a30d3d3533bc88fe70f0822f204d34e3ad4280a))
|
|
24
|
+
|
|
25
|
+
- **commands**: Move ipy configuration file to project folder before creating first commit
|
|
26
|
+
([`8997e98`](https://github.com/dimanu-py/instant-python/commit/8997e984b2384e70ca2418e4cf7eb21aa3d7bdad))
|
|
27
|
+
|
|
28
|
+
|
|
5
29
|
## v0.10.0 (2025-09-30)
|
|
6
30
|
|
|
7
31
|
### ✨ Features
|
|
@@ -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/
|
|
@@ -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):
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class DomainError(Error):
|
|
10
|
+
...
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
class DomainEventTypeNotFoundError(DomainError):
|
|
9
|
+
def __init__(self, name: str) -> None:
|
|
10
|
+
super().__init__(message=f"Event type {name} not found among subscriber.", error_type="domain_event_type_not_found",)
|
instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
2
|
+
from typing import TypeVar
|
|
3
|
+
|
|
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 %}
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class IncorrectValueTypeError(DomainError):
|
|
14
|
+
def __init__(self, value: T) -> None:
|
|
15
|
+
super().__init__(message=f"Value '{value}' is not of type {type(value).__name__}", error_type="incorrect_value_type", )
|
instant_python-0.11.0/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class InvalidIdFormatError(DomainError):
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
super().__init__(message="User id must be a valid UUID", error_type="invalid_id_format",)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class InvalidNegativeValueError(DomainError):
|
|
10
|
+
def __init__(self, value: int) -> None:
|
|
11
|
+
super().__init__(message=f"Invalid negative value: {value}", error_type="invalid_negative_value",)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RabbitMqConnectionNotEstablishedError(DomainError):
|
|
11
|
+
def __init__(self) -> None:
|
|
12
|
+
super().__init__(message="RabbitMQ connection not established.", error_type="rabbit_mq_connection",)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set template_domain_import = "shared.domain"|compute_base_path(template.name) %}
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class RequiredValueError(DomainError):
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
super().__init__(message="Value is required, can't be None", error_type="required_value",)
|
|
@@ -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
|
|
@@ -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"] %}
|
{instant_python-0.10.0 → instant_python-0.11.0}/instant_python/templates/boilerplate/pyproject.toml
RENAMED
|
@@ -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"]
|
|
@@ -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):
|