instant-python 0.4.0__tar.gz → 0.5.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 (191) hide show
  1. {instant_python-0.4.0 → instant_python-0.5.0}/.github/workflows/release.yml +6 -6
  2. {instant_python-0.4.0 → instant_python-0.5.0}/CHANGELOG.md +30 -0
  3. {instant_python-0.4.0 → instant_python-0.5.0}/PKG-INFO +2 -2
  4. instant_python-0.4.0/docs/welcome.md → instant_python-0.5.0/docs/index.md +0 -1
  5. instant_python-0.5.0/instant_python/cli.py +28 -0
  6. instant_python-0.5.0/instant_python/errors/application_error.py +11 -0
  7. instant_python-0.5.0/instant_python/errors/command_execution_error.py +20 -0
  8. instant_python-0.5.0/instant_python/errors/error_types.py +6 -0
  9. instant_python-0.5.0/instant_python/errors/template_file_not_found_error.py +18 -0
  10. instant_python-0.5.0/instant_python/errors/unknown_dependency_manager_error.py +18 -0
  11. instant_python-0.5.0/instant_python/errors/unknown_node_typer_error.py +16 -0
  12. instant_python-0.5.0/instant_python/errors/unknown_template_error.py +16 -0
  13. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/dependency_manager_factory.py +5 -1
  14. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/git_configurer.py +3 -0
  15. instant_python-0.5.0/instant_python/installer/installer.py +24 -0
  16. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/managers.py +0 -1
  17. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/pdm_manager.py +7 -0
  18. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/uv_manager.py +4 -0
  19. instant_python-0.5.0/instant_python/intant_python_typer.py +30 -0
  20. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/custom_template_manager.py +2 -3
  21. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/folder_tree.py +3 -8
  22. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/jinja_custom_filters.py +2 -1
  23. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/project_generator.py +12 -7
  24. instant_python-0.5.0/instant_python/templates/boilerplate/value_object/__init__.py +0 -0
  25. {instant_python-0.4.0 → instant_python-0.5.0}/mkdocs.yml +2 -3
  26. {instant_python-0.4.0 → instant_python-0.5.0}/pyproject.toml +2 -2
  27. {instant_python-0.4.0 → instant_python-0.5.0}/uv.lock +1 -1
  28. instant_python-0.4.0/instant_python/cli.py +0 -11
  29. instant_python-0.4.0/instant_python/installer/installer.py +0 -18
  30. {instant_python-0.4.0 → instant_python-0.5.0}/.github/FUNDING.yml +0 -0
  31. {instant_python-0.4.0 → instant_python-0.5.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  32. {instant_python-0.4.0 → instant_python-0.5.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  33. {instant_python-0.4.0 → instant_python-0.5.0}/.github/actions/python_setup/action.yml +0 -0
  34. {instant_python-0.4.0 → instant_python-0.5.0}/.github/workflows/pages.yml +0 -0
  35. {instant_python-0.4.0 → instant_python-0.5.0}/.github/workflows/publish.yml +0 -0
  36. {instant_python-0.4.0 → instant_python-0.5.0}/.gitignore +0 -0
  37. {instant_python-0.4.0 → instant_python-0.5.0}/.python-version +0 -0
  38. {instant_python-0.4.0 → instant_python-0.5.0}/LICENSE +0 -0
  39. {instant_python-0.4.0 → instant_python-0.5.0}/README.md +0 -0
  40. {instant_python-0.4.0 → instant_python-0.5.0}/cz.yaml +0 -0
  41. {instant_python-0.4.0 → instant_python-0.5.0}/docs/assets/favicon.svg +0 -0
  42. {instant_python-0.4.0 → instant_python-0.5.0}/docs/assets/logo.svg +0 -0
  43. {instant_python-0.4.0 → instant_python-0.5.0}/docs/contributing.md +0 -0
  44. {instant_python-0.4.0 → instant_python-0.5.0}/docs/getting-started/features_overview.md +0 -0
  45. {instant_python-0.4.0 → instant_python-0.5.0}/docs/getting-started/first-steps.md +0 -0
  46. {instant_python-0.4.0 → instant_python-0.5.0}/docs/getting-started/index.md +0 -0
  47. {instant_python-0.4.0 → instant_python-0.5.0}/docs/getting-started/installation.md +0 -0
  48. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/creating-a-project.md +0 -0
  49. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/custom-templates.md +0 -0
  50. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/features.md +0 -0
  51. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/folder-structure.md +0 -0
  52. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/index.md +0 -0
  53. {instant_python-0.4.0 → instant_python-0.5.0}/docs/guide/when-to-use-commands.md +0 -0
  54. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/__init__.py +0 -0
  55. {instant_python-0.4.0/instant_python/installer → instant_python-0.5.0/instant_python/errors}/__init__.py +0 -0
  56. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/folder_cli.py +0 -0
  57. {instant_python-0.4.0/instant_python/project_generator → instant_python-0.5.0/instant_python/installer}/__init__.py +0 -0
  58. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/installer/dependency_manager.py +0 -0
  59. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_cli.py +0 -0
  60. {instant_python-0.4.0/instant_python/question_prompter → instant_python-0.5.0/instant_python/project_generator}/__init__.py +0 -0
  61. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/boilerplate_file.py +0 -0
  62. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/directory.py +0 -0
  63. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/file.py +0 -0
  64. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/jinja_environment.py +0 -0
  65. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/jinja_template_manager.py +0 -0
  66. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/node.py +0 -0
  67. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/project_generator/template_manager.py +0 -0
  68. {instant_python-0.4.0/instant_python/question_prompter/question → instant_python-0.5.0/instant_python/question_prompter}/__init__.py +0 -0
  69. {instant_python-0.4.0/instant_python/question_prompter/step → instant_python-0.5.0/instant_python/question_prompter/question}/__init__.py +0 -0
  70. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/boolean_question.py +0 -0
  71. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/choice_question.py +0 -0
  72. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/conditional_question.py +0 -0
  73. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/dependencies_question.py +0 -0
  74. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/free_text_question.py +0 -0
  75. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/multiple_choice_question.py +0 -0
  76. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question/question.py +0 -0
  77. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/question_wizard.py +0 -0
  78. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/requirements_configuration.py +0 -0
  79. {instant_python-0.4.0/instant_python/templates → instant_python-0.5.0/instant_python/question_prompter/step}/__init__.py +0 -0
  80. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/dependencies_step.py +0 -0
  81. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/general_custom_template_project_step.py +0 -0
  82. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/general_project_step.py +0 -0
  83. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/git_step.py +0 -0
  84. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/steps.py +0 -0
  85. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/step/template_step.py +0 -0
  86. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/question_prompter/template_types.py +0 -0
  87. {instant_python-0.4.0/instant_python/templates/boilerplate/event_bus → instant_python-0.5.0/instant_python/templates}/__init__.py +0 -0
  88. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/.gitignore +0 -0
  89. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/.pre-commit-config.yml +0 -0
  90. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/.python-version +0 -0
  91. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/LICENSE +0 -0
  92. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/README.md +0 -0
  93. {instant_python-0.4.0/instant_python/templates/boilerplate/exceptions → instant_python-0.5.0/instant_python/templates/boilerplate/event_bus}/__init__.py +0 -0
  94. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/aggregate_root.py +0 -0
  95. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/domain_event.py +0 -0
  96. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +0 -0
  97. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +0 -0
  98. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +0 -0
  99. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/event_bus.py +0 -0
  100. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/exchange_type.py +0 -0
  101. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +0 -0
  102. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +0 -0
  103. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +0 -0
  104. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +0 -0
  105. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +0 -0
  106. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py +0 -0
  107. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py +0 -0
  108. {instant_python-0.4.0/instant_python/templates/boilerplate/fastapi → instant_python-0.5.0/instant_python/templates/boilerplate/exceptions}/__init__.py +0 -0
  109. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/domain_error.py +0 -0
  110. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +0 -0
  111. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +0 -0
  112. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +0 -0
  113. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +0 -0
  114. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +0 -0
  115. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/exceptions/required_value_error.py +0 -0
  116. {instant_python-0.4.0/instant_python/templates/boilerplate/logger → instant_python-0.5.0/instant_python/templates/boilerplate/fastapi}/__init__.py +0 -0
  117. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/fastapi/application.py +0 -0
  118. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/fastapi/http_response.py +0 -0
  119. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/fastapi/lifespan.py +0 -0
  120. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/fastapi/status_code.py +0 -0
  121. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/github/action.yml +0 -0
  122. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/github/test_lint.yml +0 -0
  123. {instant_python-0.4.0/instant_python/templates/boilerplate/persistence → instant_python-0.5.0/instant_python/templates/boilerplate/logger}/__init__.py +0 -0
  124. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/logger/json_formatter.py +0 -0
  125. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/logger/logger.py +0 -0
  126. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/mypy.ini +0 -0
  127. {instant_python-0.4.0/instant_python/templates/boilerplate/persistence/async → instant_python-0.5.0/instant_python/templates/boilerplate/persistence}/__init__.py +0 -0
  128. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/alembic_migrator.py +0 -0
  129. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/README.md +0 -0
  130. {instant_python-0.4.0/instant_python/templates/boilerplate/persistence/synchronous → instant_python-0.5.0/instant_python/templates/boilerplate/persistence/async}/__init__.py +0 -0
  131. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/alembic.ini +0 -0
  132. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +0 -0
  133. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/env.py +0 -0
  134. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/models_metadata.py +0 -0
  135. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/postgres_settings.py +0 -0
  136. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/script.py.mako +0 -0
  137. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +0 -0
  138. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/base.py +0 -0
  139. {instant_python-0.4.0/instant_python/templates/boilerplate/value_object → instant_python-0.5.0/instant_python/templates/boilerplate/persistence/synchronous}/__init__.py +0 -0
  140. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +0 -0
  141. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +0 -0
  142. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/pyproject.toml +0 -0
  143. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/pytest.ini +0 -0
  144. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/random_generator.py +0 -0
  145. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/add_dependency.sh +0 -0
  146. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/create_aggregate.py +0 -0
  147. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/insert_template.py +0 -0
  148. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/integration.sh +0 -0
  149. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/local_setup.sh +0 -0
  150. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/makefile +0 -0
  151. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/post-merge +0 -0
  152. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/pre-commit +0 -0
  153. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/pre-push +0 -0
  154. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/remove_dependency.sh +0 -0
  155. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/scripts/unit.sh +0 -0
  156. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/value_object/int_value_object.py +0 -0
  157. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/value_object/string_value_object.py +0 -0
  158. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/value_object/uuid.py +0 -0
  159. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/boilerplate/value_object/value_object.py +0 -0
  160. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/alembic_migrator.yml.j2 +0 -0
  161. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/async_alembic.yml.j2 +0 -0
  162. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/async_sqlalchemy.yml.j2 +0 -0
  163. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2 +0 -0
  164. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/clean_architecture/source.yml.j2 +0 -0
  165. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/clean_architecture/test.yml.j2 +0 -0
  166. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/domain_driven_design/bounded_context.yml.j2 +0 -0
  167. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/domain_driven_design/main_structure.yml.j2 +0 -0
  168. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/domain_driven_design/source.yml.j2 +0 -0
  169. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/domain_driven_design/test.yml.j2 +0 -0
  170. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/event_bus_domain.yml.j2 +0 -0
  171. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/event_bus_infra.yml.j2 +0 -0
  172. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/fastapi_app.yml.j2 +0 -0
  173. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/fastapi_infra.yml.j2 +0 -0
  174. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/github_action.yml.j2 +0 -0
  175. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/gitignore.yml.j2 +0 -0
  176. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/license.yml.j2 +0 -0
  177. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/logger.yml.j2 +0 -0
  178. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/macros.j2 +0 -0
  179. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/makefile.yml.j2 +0 -0
  180. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/mypy.yml.j2 +0 -0
  181. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/pre_commit.yml.j2 +0 -0
  182. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/pyproject.yml.j2 +0 -0
  183. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/pytest.yml.j2 +0 -0
  184. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/python_version.yml.j2 +0 -0
  185. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/readme.yml.j2 +0 -0
  186. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/standard_project/main_structure.yml.j2 +0 -0
  187. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/standard_project/source.yml.j2 +0 -0
  188. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/standard_project/test.yml.j2 +0 -0
  189. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2 +0 -0
  190. {instant_python-0.4.0 → instant_python-0.5.0}/instant_python/templates/project_structure/value_objects.yml.j2 +0 -0
  191. {instant_python-0.4.0 → instant_python-0.5.0}/tox.ini +0 -0
@@ -4,11 +4,11 @@ on:
4
4
  workflow_dispatch:
5
5
 
6
6
  jobs:
7
- bump-version:
7
+ bump_version:
8
8
  if: "!startsWith(github.event.head_commit.message, 'bump:')"
9
9
  runs-on: ubuntu-latest
10
10
  outputs:
11
- tag: ${{ steps.bump.outputs.new_tag }}
11
+ tag: ${{ steps.bump.outputs.version }}
12
12
  steps:
13
13
  - name: Check out
14
14
  uses: actions/checkout@v3
@@ -22,8 +22,8 @@ jobs:
22
22
  with:
23
23
  github_token: ${{ secrets.CHANGELOG_TOKEN }}
24
24
 
25
- create-release:
26
- needs: bump-version
25
+ create_release:
26
+ needs: bump_version
27
27
  runs-on: ubuntu-latest
28
28
  steps:
29
29
  - name: Check out
@@ -35,13 +35,13 @@ jobs:
35
35
  - name: Get release tag
36
36
  id: release_tag
37
37
  run: |
38
- if [ -z "${{ needs.bump-version.outputs.tag }}" ]; then
38
+ if [ -z "${{ needs.bump_version.outputs.tag }}" ]; then
39
39
  echo "No tag provided from bump version job. Running fallback command..."
40
40
  git fetch --tags
41
41
  echo "release_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
42
42
  else
43
43
  echo "Using tag provided from bump version job."
44
- echo "release_tag=${{ needs.bump-version.outputs.tag }}" >> $GITHUB_OUTPUT
44
+ echo "release_tag=${{ needs.bump_version.outputs.tag }}" >> $GITHUB_OUTPUT
45
45
  fi
46
46
 
47
47
  - name: Extract Changelog for Release
@@ -1,3 +1,33 @@
1
+ ## 0.5.0 (2025-04-15)
2
+
3
+ ### ✨ Features
4
+
5
+ - **cli**: create main application based on custom implementation and add error handlers
6
+ - **cli**: implement a custom version of Typer application to be able to handle exceptions in FastAPI way using decorators
7
+ - **errors**: add UnknownTemplateError for handling unknown template types
8
+ - **errors**: add TemplateFileNotFoundError for missing template files and extend ErrorTypes with GENERATOR
9
+ - **errors**: add ErrorTypes enum for categorizing error types
10
+ - **errors**: add CommandExecutionError for handling command execution failures
11
+ - **errors**: add UnknownDependencyManagerError for handling unknown dependency managers
12
+ - **installer**: remove unused PYENV manager from Enum
13
+ - **errors**: create application error to be able to capture all expected errors
14
+
15
+ ### 🐛 Bug Fixes
16
+
17
+ - **errors**: correct typo in UnknownTemplateError message
18
+
19
+ ### ♻️ Code Refactoring
20
+
21
+ - **project-generator**: manage when a command fails by raising custom CommandExecutionError
22
+ - **installer**: manage when a command fails by raising custom CommandExecutionError
23
+ - **cli**: enhance error handling with rich console output
24
+ - **project-generator**: raise UnknownTemplateError for unknown template types
25
+ - **project-generator**: move UnknownErrorTypeError to errors module and inherit from ApplicationError
26
+ - **project-generator**: raise TemplateFileNotFoundError for missing template files
27
+ - **errors**: use ErrorTypes enum for error type in CommandExecutionError and UnknownDependencyManagerError
28
+ - **installer**: add stderr handling for subprocess calls
29
+ - **installer**: raise UnknownDependencyManagerError for unknown user managers
30
+
1
31
  ## 0.4.0 (2025-04-11)
2
32
 
3
33
  ### ✨ Features
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instant-python
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Instant boilerplate generation for Python projects
5
- Project-URL: documentation, https://dimanu-py.github.io/instant-python/welcome/
5
+ Project-URL: documentation, https://dimanu-py.github.io/instant-python/
6
6
  Project-URL: repository, https://github.com/dimanu-py/instant-python/
7
7
  Author-email: dimanu-py <diegomtz126@gmail.com>
8
8
  License: Apache License
@@ -22,7 +22,6 @@ pip install instant-python
22
22
 
23
23
  ## Documentation Structure
24
24
 
25
- - [Welcome](./welcome.md)
26
25
  - [Getting Started](./getting-started/index.md)
27
26
  - [Installation](./getting-started/installation.md)
28
27
  - [First Steps](./getting-started/first-steps.md)
@@ -0,0 +1,28 @@
1
+ from rich.console import Console
2
+ from rich.panel import Panel
3
+
4
+ from instant_python import folder_cli, project_cli
5
+ from instant_python.errors.application_error import ApplicationError
6
+ from instant_python.intant_python_typer import InstantPythonTyper
7
+
8
+ app = InstantPythonTyper()
9
+ console = Console()
10
+
11
+ app.add_typer(folder_cli.app, name="folder", help="Generate only the folder structure for a new project")
12
+ app.add_typer(project_cli.app, name="project", help="Generate a full project ready to be used")
13
+
14
+
15
+ @app.error_handler(ApplicationError)
16
+ def handle_application_error(exc: ApplicationError) -> None:
17
+ error_panel = Panel(exc.message, title="Error", border_style="red")
18
+ console.print(error_panel)
19
+
20
+
21
+ @app.error_handler(Exception)
22
+ def handle_unexpected_error(exc: Exception) -> None:
23
+ error_panel = Panel(f"An unexpected error occurred: {exc}", title="Error", border_style="red")
24
+ console.print(error_panel)
25
+
26
+
27
+ if __name__ == "__main__":
28
+ app()
@@ -0,0 +1,11 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+
4
+ class ApplicationError(Exception, ABC):
5
+ @property
6
+ @abstractmethod
7
+ def type(self) -> str: ...
8
+
9
+ @property
10
+ @abstractmethod
11
+ def message(self) -> str: ...
@@ -0,0 +1,20 @@
1
+ from instant_python.errors.application_error import ApplicationError
2
+ from instant_python.errors.error_types import ErrorTypes
3
+
4
+
5
+ class CommandExecutionError(ApplicationError):
6
+ def __init__(self, exit_code: int, stderr_output=None):
7
+ self._message = (
8
+ f"Unexpected error when executing a command, exit code {exit_code}"
9
+ )
10
+ if stderr_output:
11
+ self._message += f": {stderr_output.decode('utf-8').strip()}"
12
+ super().__init__(self._message)
13
+
14
+ @property
15
+ def type(self) -> str:
16
+ return ErrorTypes.INSTALLER.value
17
+
18
+ @property
19
+ def message(self) -> str:
20
+ return self._message
@@ -0,0 +1,6 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ErrorTypes(str, Enum):
5
+ INSTALLER = "installer_error"
6
+ GENERATOR = "project_generator_error"
@@ -0,0 +1,18 @@
1
+ from pathlib import Path
2
+
3
+ from instant_python.errors.application_error import ApplicationError
4
+ from instant_python.errors.error_types import ErrorTypes
5
+
6
+
7
+ class TemplateFileNotFoundError(ApplicationError):
8
+ def __init__(self, template_path: str | Path) -> None:
9
+ self._message = f"Could not find YAML file at: {template_path}"
10
+ super().__init__(self._message)
11
+
12
+ @property
13
+ def type(self) -> str:
14
+ return ErrorTypes.GENERATOR.value
15
+
16
+ @property
17
+ def message(self) -> str:
18
+ return self._message
@@ -0,0 +1,18 @@
1
+ from instant_python.errors.application_error import ApplicationError
2
+ from instant_python.errors.error_types import ErrorTypes
3
+
4
+
5
+ class UnknownDependencyManagerError(ApplicationError):
6
+ def __init__(self, manager: str) -> None:
7
+ self._message = (
8
+ f"Unknown dependency manager: {manager}. Please use 'pdm' or 'uv'."
9
+ )
10
+ super().__init__(self._message)
11
+
12
+ @property
13
+ def type(self) -> str:
14
+ return ErrorTypes.INSTALLER.value
15
+
16
+ @property
17
+ def message(self) -> str:
18
+ return self._message
@@ -0,0 +1,16 @@
1
+ from instant_python.errors.application_error import ApplicationError
2
+ from instant_python.errors.error_types import ErrorTypes
3
+
4
+
5
+ class UnknownNodeTypeError(ApplicationError):
6
+ def __init__(self, node_type: str) -> None:
7
+ self._message = f"Unknown node type: {node_type}"
8
+ super().__init__(self._message)
9
+
10
+ @property
11
+ def type(self) -> str:
12
+ return ErrorTypes.GENERATOR.value
13
+
14
+ @property
15
+ def message(self) -> str:
16
+ return self._message
@@ -0,0 +1,16 @@
1
+ from instant_python.errors.application_error import ApplicationError
2
+ from instant_python.errors.error_types import ErrorTypes
3
+
4
+
5
+ class UnknownTemplateError(ApplicationError):
6
+ def __init__(self, template_name: str) -> None:
7
+ self._message = f"Unknown template type: {template_name}"
8
+ super().__init__(self._message)
9
+
10
+ @property
11
+ def type(self) -> str:
12
+ return ErrorTypes.GENERATOR.value
13
+
14
+ @property
15
+ def message(self) -> str:
16
+ return self._message
@@ -1,3 +1,4 @@
1
+ from instant_python.errors.unknown_dependency_manager_error import UnknownDependencyManagerError
1
2
  from instant_python.installer.dependency_manager import DependencyManager
2
3
  from instant_python.installer.managers import Managers
3
4
  from instant_python.installer.pdm_manager import PdmManager
@@ -11,4 +12,7 @@ class DependencyManagerFactory:
11
12
  Managers.UV: UvManager,
12
13
  Managers.PDM: PdmManager,
13
14
  }
14
- return managers[Managers(user_manager)](project_path)
15
+ try:
16
+ return managers[Managers(user_manager)](project_path)
17
+ except KeyError:
18
+ raise UnknownDependencyManagerError(user_manager)
@@ -21,6 +21,7 @@ class GitConfigurer:
21
21
  check=True,
22
22
  cwd=self._project_directory,
23
23
  stdout=subprocess.DEVNULL,
24
+ stderr=subprocess.PIPE,
24
25
  )
25
26
  print(">>> Git repository initialized successfully")
26
27
 
@@ -32,6 +33,7 @@ class GitConfigurer:
32
33
  check=True,
33
34
  cwd=self._project_directory,
34
35
  stdout=subprocess.DEVNULL,
36
+ stderr=subprocess.PIPE,
35
37
  )
36
38
  print(">>> Git user and email configured successfully")
37
39
 
@@ -43,5 +45,6 @@ class GitConfigurer:
43
45
  check=True,
44
46
  cwd=self._project_directory,
45
47
  stdout=subprocess.DEVNULL,
48
+ stderr=subprocess.PIPE,
46
49
  )
47
50
  print(">>> Initial commit made successfully")
@@ -0,0 +1,24 @@
1
+ import subprocess
2
+
3
+ from instant_python.errors.command_execution_error import CommandExecutionError
4
+ from instant_python.installer.dependency_manager import DependencyManager
5
+
6
+
7
+ class Installer:
8
+ _dependency_manager: DependencyManager
9
+
10
+ def __init__(
11
+ self,
12
+ dependency_manager: DependencyManager,
13
+ ) -> None:
14
+ self._dependency_manager = dependency_manager
15
+
16
+ def perform_installation(
17
+ self, python_version: str, dependencies: list[str]
18
+ ) -> None:
19
+ try:
20
+ self._dependency_manager.install()
21
+ self._dependency_manager.install_python(python_version)
22
+ self._dependency_manager.install_dependencies(dependencies)
23
+ except subprocess.CalledProcessError as error:
24
+ raise CommandExecutionError(exit_code=error.returncode, stderr_output=error.stderr)
@@ -2,6 +2,5 @@ from enum import Enum
2
2
 
3
3
 
4
4
  class Managers(str, Enum):
5
- PYENV = "pyenv"
6
5
  UV = "uv"
7
6
  PDM = "pdm"
@@ -16,6 +16,8 @@ class PdmManager(DependencyManager):
16
16
  "curl -sSL https://pdm-project.org/install-pdm.py | python3 -",
17
17
  shell=True,
18
18
  check=True,
19
+ stdout=subprocess.DEVNULL,
20
+ stderr=subprocess.PIPE,
19
21
  )
20
22
  print(">>> pdm installed successfully")
21
23
 
@@ -27,6 +29,8 @@ class PdmManager(DependencyManager):
27
29
  shell=True,
28
30
  check=True,
29
31
  cwd=self._project_directory,
32
+ stdout=subprocess.DEVNULL,
33
+ stderr=subprocess.PIPE,
30
34
  )
31
35
  print(f">>> Python {version} installed successfully")
32
36
 
@@ -55,6 +59,8 @@ class PdmManager(DependencyManager):
55
59
  shell=True,
56
60
  check=True,
57
61
  cwd=self._project_directory,
62
+ stdout=subprocess.DEVNULL,
63
+ stderr=subprocess.PIPE,
58
64
  )
59
65
 
60
66
  @staticmethod
@@ -76,4 +82,5 @@ class PdmManager(DependencyManager):
76
82
  check=True,
77
83
  cwd=self._project_directory,
78
84
  stdout=subprocess.DEVNULL,
85
+ stderr=subprocess.PIPE,
79
86
  )
@@ -17,6 +17,7 @@ class UvManager(DependencyManager):
17
17
  shell=True,
18
18
  check=True,
19
19
  stdout=subprocess.DEVNULL,
20
+ stderr=subprocess.PIPE,
20
21
  )
21
22
  print(">>> uv installed successfully")
22
23
 
@@ -29,6 +30,7 @@ class UvManager(DependencyManager):
29
30
  check=True,
30
31
  cwd=self._project_directory,
31
32
  stdout=subprocess.DEVNULL,
33
+ stderr=subprocess.PIPE,
32
34
  )
33
35
  print(f">>> Python {version} installed successfully")
34
36
 
@@ -58,6 +60,7 @@ class UvManager(DependencyManager):
58
60
  check=True,
59
61
  cwd=self._project_directory,
60
62
  stdout=subprocess.DEVNULL,
63
+ stderr=subprocess.PIPE,
61
64
  )
62
65
  print(f">>> {dependency_name} installed successfully")
63
66
 
@@ -81,4 +84,5 @@ class UvManager(DependencyManager):
81
84
  check=True,
82
85
  cwd=self._project_directory,
83
86
  stdout=subprocess.DEVNULL,
87
+ stderr=subprocess.PIPE,
84
88
  )
@@ -0,0 +1,30 @@
1
+ from collections.abc import Callable
2
+
3
+ import typer
4
+
5
+ ExceptionType = type[Exception]
6
+ ErrorHandlingCallback = Callable[[Exception], None]
7
+
8
+
9
+ class InstantPythonTyper(typer.Typer):
10
+ error_handlers: dict[ExceptionType, ErrorHandlingCallback] = {}
11
+
12
+ def error_handler(self, exc: ExceptionType):
13
+ """Registers a callback function to be called when 'exc' (the given exception) is raised."""
14
+
15
+ def decorator(func: ErrorHandlingCallback):
16
+ self.error_handlers[exc] = func
17
+ return func
18
+
19
+ return decorator
20
+
21
+ def __call__(self, *args, **kwargs):
22
+ """Overrides Typer.__call__ so that when we run the CLI,
23
+ we can catch any exception that's raised and see if there's
24
+ a matching error handler for it.
25
+ """
26
+ try:
27
+ super().__call__(*args, **kwargs)
28
+ except Exception as error:
29
+ callback = self.error_handlers.get(error.__class__.__base__)
30
+ callback(error)
@@ -2,6 +2,7 @@ from pathlib import Path
2
2
 
3
3
  import yaml
4
4
 
5
+ from instant_python.errors.template_file_not_found_error import TemplateFileNotFoundError
5
6
  from instant_python.project_generator.template_manager import TemplateManager
6
7
 
7
8
 
@@ -11,8 +12,6 @@ class CustomTemplateManager(TemplateManager):
11
12
 
12
13
  def get_project(self, template_name: str) -> dict[str, str]:
13
14
  if not self._template_path.is_file():
14
- raise FileNotFoundError(
15
- f"Could not find YAML file at: {self._template_path}"
16
- )
15
+ raise TemplateFileNotFoundError(self._template_path)
17
16
  with open(self._template_path, "r", encoding="utf-8") as f:
18
17
  return yaml.safe_load(f)
@@ -1,17 +1,12 @@
1
1
  from pathlib import Path
2
2
 
3
- from instant_python.project_generator.directory import Directory
3
+ from instant_python.errors.unknown_node_typer_error import UnknownNodeTypeError
4
4
  from instant_python.project_generator.boilerplate_file import BoilerplateFile
5
+ from instant_python.project_generator.directory import Directory
5
6
  from instant_python.project_generator.file import File
6
7
  from instant_python.project_generator.node import Node, NodeType
7
8
 
8
9
 
9
- class UnknownNodeType(ValueError):
10
- def __init__(self, node_type: str) -> None:
11
- self._message = f"Unknown node type: {node_type}"
12
- super().__init__(self._message)
13
-
14
-
15
10
  class FolderTree:
16
11
  def __init__(self, project_directory: str) -> None:
17
12
  self._project_directory = Path(project_directory)
@@ -41,4 +36,4 @@ class FolderTree:
41
36
  extension = node.get("extension", "")
42
37
  return File(name=name, extension=extension)
43
38
  else:
44
- raise UnknownNodeType(node_type)
39
+ raise UnknownNodeTypeError(node_type)
@@ -1,3 +1,4 @@
1
+ from instant_python.errors.unknown_template_error import UnknownTemplateError
1
2
  from instant_python.question_prompter.template_types import TemplateTypes
2
3
 
3
4
 
@@ -15,4 +16,4 @@ def compute_base_path(initial_path: str, template_type: str) -> str:
15
16
  elif template_type == TemplateTypes.STANDARD:
16
17
  return ".".join(path_components[2:])
17
18
  else:
18
- raise ValueError(f"Unknown template type: {template_type}")
19
+ raise UnknownTemplateError(template_type)
@@ -1,5 +1,6 @@
1
1
  import subprocess
2
2
 
3
+ from instant_python.errors.command_execution_error import CommandExecutionError
3
4
  from instant_python.project_generator.folder_tree import FolderTree
4
5
  from instant_python.project_generator.jinja_template_manager import TemplateManager
5
6
 
@@ -18,13 +19,17 @@ class ProjectGenerator:
18
19
  self._format_project_files()
19
20
 
20
21
  def _format_project_files(self) -> None:
21
- subprocess.run(
22
- "uvx ruff format",
23
- shell=True,
24
- check=True,
25
- cwd=self._folder_tree.project_directory,
26
- stdout=subprocess.DEVNULL,
27
- )
22
+ try:
23
+ subprocess.run(
24
+ "uvx ruff format",
25
+ shell=True,
26
+ check=True,
27
+ cwd=self._folder_tree.project_directory,
28
+ stdout=subprocess.DEVNULL,
29
+ stderr=subprocess.PIPE,
30
+ )
31
+ except subprocess.CalledProcessError as error:
32
+ raise CommandExecutionError(exit_code=error.returncode, stderr_output=error.stderr)
28
33
 
29
34
  @property
30
35
  def path(self) -> str:
@@ -1,5 +1,5 @@
1
1
  site_name: Instant Python Generator
2
- site_url: https://dimanu-py.github.io/instant-python/welcome
2
+ site_url: https://dimanu-py.github.io/instant-python/
3
3
  site_description: >
4
4
  Get you Python project autogenerated, with the Python version you want,
5
5
  dependency manager, create automatically a git repository and even select
@@ -55,8 +55,7 @@ theme:
55
55
  primary: '#B4BEFE'
56
56
  accent: '#FAB387'
57
57
  nav:
58
- - Home:
59
- - welcome.md
58
+ - index.md
60
59
  - Getting Started:
61
60
  - getting-started/index.md
62
61
  - Installation: getting-started/installation.md
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "instant-python"
7
- version = "0.4.0"
7
+ version = "0.5.0"
8
8
  description = "Instant boilerplate generation for Python projects"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -28,7 +28,7 @@ include = [
28
28
  ]
29
29
 
30
30
  [project.urls]
31
- documentation = "https://dimanu-py.github.io/instant-python/welcome/"
31
+ documentation = "https://dimanu-py.github.io/instant-python/"
32
32
  repository = "https://github.com/dimanu-py/instant-python/"
33
33
 
34
34
  [project.scripts]
@@ -240,7 +240,7 @@ wheels = [
240
240
 
241
241
  [[package]]
242
242
  name = "instant-python"
243
- version = "0.4.0"
243
+ version = "0.5.0"
244
244
  source = { editable = "." }
245
245
  dependencies = [
246
246
  { name = "jinja2" },
@@ -1,11 +0,0 @@
1
- import typer
2
-
3
- from instant_python import folder_cli, project_cli
4
-
5
- app = typer.Typer()
6
- app.add_typer(folder_cli.app, name="folder", help="Generate only the folder structure for a new project")
7
- app.add_typer(project_cli.app, name="project", help="Generate a full project ready to be used")
8
-
9
-
10
- if __name__ == "__main__":
11
- app()
@@ -1,18 +0,0 @@
1
- from instant_python.installer.dependency_manager import DependencyManager
2
-
3
-
4
- class Installer:
5
- _dependency_manager: DependencyManager
6
-
7
- def __init__(
8
- self,
9
- dependency_manager: DependencyManager,
10
- ) -> None:
11
- self._dependency_manager = dependency_manager
12
-
13
- def perform_installation(
14
- self, python_version: str, dependencies: list[str]
15
- ) -> None:
16
- self._dependency_manager.install()
17
- self._dependency_manager.install_python(python_version)
18
- self._dependency_manager.install_dependencies(dependencies)
File without changes
File without changes
File without changes