instant-python 0.0.1__tar.gz → 0.1.1__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 (176) hide show
  1. {instant_python-0.0.1 → instant_python-0.1.1}/CHANGELOG.md +99 -200
  2. {instant_python-0.0.1 → instant_python-0.1.1}/PKG-INFO +2 -2
  3. {instant_python-0.0.1 → instant_python-0.1.1}/docs/contributing.md +4 -1
  4. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/managers.py +2 -2
  5. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/custom_template_manager.py +0 -2
  6. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/default_template_manager.py +0 -3
  7. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/file.py +1 -1
  8. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/node.py +2 -2
  9. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/question.py +4 -1
  10. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/template_types.py +2 -2
  11. instant_python-0.1.1/instant_python/templates/boilerplate/event_bus/exchange_type.py +14 -0
  12. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +12 -5
  13. instant_python-0.1.1/instant_python/templates/boilerplate/value_object/value_object.py +48 -0
  14. {instant_python-0.0.1 → instant_python-0.1.1}/pyproject.toml +6 -2
  15. instant_python-0.1.1/tox.ini +18 -0
  16. {instant_python-0.0.1 → instant_python-0.1.1}/uv.lock +290 -2
  17. instant_python-0.0.1/instant_python/installer/operating_systems.py +0 -7
  18. instant_python-0.0.1/instant_python/templates/boilerplate/event_bus/exchange_type.py +0 -7
  19. instant_python-0.0.1/instant_python/templates/boilerplate/value_object/value_object.py +0 -21
  20. {instant_python-0.0.1 → instant_python-0.1.1}/.github/FUNDING.yml +0 -0
  21. {instant_python-0.0.1 → instant_python-0.1.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  22. {instant_python-0.0.1 → instant_python-0.1.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  23. {instant_python-0.0.1 → instant_python-0.1.1}/.github/actions/python_setup/action.yml +0 -0
  24. {instant_python-0.0.1 → instant_python-0.1.1}/.github/workflows/publish.yml +0 -0
  25. {instant_python-0.0.1 → instant_python-0.1.1}/.github/workflows/release.yml +0 -0
  26. {instant_python-0.0.1 → instant_python-0.1.1}/.gitignore +0 -0
  27. {instant_python-0.0.1 → instant_python-0.1.1}/.python-version +0 -0
  28. {instant_python-0.0.1 → instant_python-0.1.1}/LICENSE +0 -0
  29. {instant_python-0.0.1 → instant_python-0.1.1}/README.md +0 -0
  30. {instant_python-0.0.1 → instant_python-0.1.1}/cz.yaml +0 -0
  31. {instant_python-0.0.1 → instant_python-0.1.1}/docs/assets/favicon.svg +0 -0
  32. {instant_python-0.0.1 → instant_python-0.1.1}/docs/assets/logo.svg +0 -0
  33. {instant_python-0.0.1 → instant_python-0.1.1}/docs/getting-started/features.md +0 -0
  34. {instant_python-0.0.1 → instant_python-0.1.1}/docs/getting-started/first-steps.md +0 -0
  35. {instant_python-0.0.1 → instant_python-0.1.1}/docs/getting-started/index.md +0 -0
  36. {instant_python-0.0.1 → instant_python-0.1.1}/docs/getting-started/installation.md +0 -0
  37. {instant_python-0.0.1 → instant_python-0.1.1}/docs/guide/creating-a-project.md +0 -0
  38. {instant_python-0.0.1 → instant_python-0.1.1}/docs/guide/custom-templates.md +0 -0
  39. {instant_python-0.0.1 → instant_python-0.1.1}/docs/guide/features.md +0 -0
  40. {instant_python-0.0.1 → instant_python-0.1.1}/docs/guide/folder-structure.md +0 -0
  41. {instant_python-0.0.1 → instant_python-0.1.1}/docs/guide/index.md +0 -0
  42. {instant_python-0.0.1 → instant_python-0.1.1}/docs/index.md +0 -0
  43. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/__init__.py +0 -0
  44. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/cli.py +0 -0
  45. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/folder_cli.py +0 -0
  46. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/__init__.py +0 -0
  47. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/dependency_manager.py +0 -0
  48. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/dependency_manager_factory.py +0 -0
  49. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/git_configurer.py +0 -0
  50. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/installer.py +0 -0
  51. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/pdm_manager.py +0 -0
  52. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/installer/uv_manager.py +0 -0
  53. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_cli.py +0 -0
  54. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/__init__.py +0 -0
  55. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/directory.py +0 -0
  56. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/folder_tree.py +0 -0
  57. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/jinja_custom_filters.py +0 -0
  58. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/project_generator.py +0 -0
  59. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/project_generator/template_manager.py +0 -0
  60. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/__init__.py +0 -0
  61. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/__init__.py +0 -0
  62. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/boolean_question.py +0 -0
  63. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/choice_question.py +0 -0
  64. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/conditional_question.py +0 -0
  65. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/dependencies_question.py +0 -0
  66. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/free_text_question.py +0 -0
  67. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question/multiple_choice_question.py +0 -0
  68. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/question_wizard.py +0 -0
  69. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/__init__.py +0 -0
  70. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/dependencies_step.py +0 -0
  71. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/general_custom_template_project_step.py +0 -0
  72. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/general_project_step.py +0 -0
  73. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/git_step.py +0 -0
  74. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/steps.py +0 -0
  75. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/step/template_step.py +0 -0
  76. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/question_prompter/user_requirements.py +0 -0
  77. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/__init__.py +0 -0
  78. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/.gitignore +0 -0
  79. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/.pre-commit-config.yml +0 -0
  80. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/.python-version +0 -0
  81. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/LICENSE +0 -0
  82. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/__init__.py +0 -0
  83. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/aggregate_root.py +0 -0
  84. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/domain_event.py +0 -0
  85. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +0 -0
  86. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +0 -0
  87. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +0 -0
  88. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/event_bus.py +0 -0
  89. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +0 -0
  90. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +0 -0
  91. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +0 -0
  92. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +0 -0
  93. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +0 -0
  94. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py +0 -0
  95. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py +0 -0
  96. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/__init__.py +0 -0
  97. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/domain_error.py +0 -0
  98. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +0 -0
  99. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +0 -0
  100. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +0 -0
  101. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +0 -0
  102. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/exceptions/required_value_error.py +0 -0
  103. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/fastapi/__init__.py +0 -0
  104. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/fastapi/application.py +0 -0
  105. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/fastapi/http_response.py +0 -0
  106. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/fastapi/lifespan.py +0 -0
  107. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/fastapi/status_code.py +0 -0
  108. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/github/action.yml +0 -0
  109. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/github/test_lint.yml +0 -0
  110. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/logger/__init__.py +0 -0
  111. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/logger/json_formatter.py +0 -0
  112. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/logger/logger.py +0 -0
  113. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/mypy.ini +0 -0
  114. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/__init__.py +0 -0
  115. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/alembic_migrator.py +0 -0
  116. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/README.md +0 -0
  117. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/__init__.py +0 -0
  118. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/alembic.ini +0 -0
  119. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +0 -0
  120. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/env.py +0 -0
  121. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/models_metadata.py +0 -0
  122. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/postgres_settings.py +0 -0
  123. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/script.py.mako +0 -0
  124. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +0 -0
  125. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/base.py +0 -0
  126. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/synchronous/__init__.py +0 -0
  127. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +0 -0
  128. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/pyproject.toml +0 -0
  129. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/pytest.ini +0 -0
  130. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/random_generator.py +0 -0
  131. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/add_dependency.sh +0 -0
  132. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/create_aggregate.py +0 -0
  133. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/insert_template.py +0 -0
  134. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/integration.sh +0 -0
  135. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/local_setup.sh +0 -0
  136. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/makefile +0 -0
  137. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/post-merge +0 -0
  138. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/pre-commit +0 -0
  139. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/pre-push +0 -0
  140. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/remove_dependency.sh +0 -0
  141. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/scripts/unit.sh +0 -0
  142. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/value_object/__init__.py +0 -0
  143. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/value_object/int_value_object.py +0 -0
  144. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/value_object/string_value_object.py +0 -0
  145. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/boilerplate/value_object/uuid.py +0 -0
  146. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/alembic_migrator.yml.j2 +0 -0
  147. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/async_alembic.yml.j2 +0 -0
  148. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/async_sqlalchemy.yml.j2 +0 -0
  149. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2 +0 -0
  150. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/clean_architecture/source.yml.j2 +0 -0
  151. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/clean_architecture/test.yml.j2 +0 -0
  152. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/domain_driven_design/bounded_context.yml.j2 +0 -0
  153. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/domain_driven_design/main_structure.yml.j2 +0 -0
  154. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/domain_driven_design/source.yml.j2 +0 -0
  155. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/domain_driven_design/test.yml.j2 +0 -0
  156. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/event_bus_domain.yml.j2 +0 -0
  157. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/event_bus_infra.yml.j2 +0 -0
  158. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/fastapi_app.yml.j2 +0 -0
  159. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/fastapi_infra.yml.j2 +0 -0
  160. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/github_action.yml.j2 +0 -0
  161. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/gitignore.yml.j2 +0 -0
  162. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/license.yml.j2 +0 -0
  163. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/logger.yml.j2 +0 -0
  164. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/macros.j2 +0 -0
  165. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/makefile.yml.j2 +0 -0
  166. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/mypy.yml.j2 +0 -0
  167. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/pre_commit.yml.j2 +0 -0
  168. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/pyproject.yml.j2 +0 -0
  169. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/pytest.yml.j2 +0 -0
  170. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/python_version.yml.j2 +0 -0
  171. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/standard_project/main_structure.yml.j2 +0 -0
  172. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/standard_project/source.yml.j2 +0 -0
  173. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/standard_project/test.yml.j2 +0 -0
  174. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2 +0 -0
  175. {instant_python-0.0.1 → instant_python-0.1.1}/instant_python/templates/project_structure/value_objects.yml.j2 +0 -0
  176. {instant_python-0.0.1 → instant_python-0.1.1}/mkdocs.yml +0 -0
@@ -1,65 +1,30 @@
1
- ## 0.12.1 (2025-04-06)
1
+ ## 0.1.1 (2025-04-08)
2
2
 
3
3
  ### 🐛 Bug Fixes
4
4
 
5
- - **project-generator**: add template types values to be able to use enum in jinja templates
6
- - **template**: write correct option when fastapi built in feature is selected
5
+ - **template**: correct typo in ExchangeType enum declaration
6
+ - **template**: correct typo on TypeVar declaration
7
7
 
8
8
  ### ♻️ Code Refactoring
9
9
 
10
- - **template**: include mypy, git and pytest configuration files only when the user has selected these options
11
- - **template**: include dependencies depending on user built in features selection
10
+ - **question**: use old generic type syntax to keep compatibility with old python versions
11
+ - **template**: update boilerplates so they can adhere to correct python versions syntax
12
+ - **project-generator**: standardize path separator in file name construction
13
+ - **installer**: remove unused enum OperatingSystems
14
+ - **prompter**: change TemplateTypes class to inherit from str and Enum for improved compatibility
15
+ - **project-generator**: change NodeType class to inherit from str and Enum for improved compatibility
16
+ - **installer**: change Managers class to inherit from str and Enum for better compatibility
17
+ - **project-generator**: remove override typing decorator to allow lower python versions compatibility
12
18
 
13
- ## 0.12.0 (2025-04-06)
14
-
15
- ### ✨ Features
16
-
17
- - **project-generator**: create new custom function to generate import path in templates
19
+ ## 0.1.0 (2025-04-06)
18
20
 
19
21
  ### 🐛 Bug Fixes
20
22
 
23
+ - **project-generator**: add template types values to be able to use enum in jinja templates
24
+ - **template**: write correct option when fastapi built in feature is selected
21
25
  - **template**: generate correctly the import statement in templates depending on the user selection
22
-
23
- ## 0.11.0 (2025-03-24)
24
-
25
- ## 0.10.4 (2025-03-24)
26
-
27
- ### 🐛 Bug Fixes
28
-
29
- - correct pages workflow
30
-
31
- ## 0.10.3 (2025-03-24)
32
-
33
- ### 🐛 Bug Fixes
34
-
35
- - correct pages workflow
36
-
37
- ## 0.10.2 (2025-03-24)
38
-
39
- ### 🐛 Bug Fixes
40
-
41
26
  - **installer**: correct answers when installing dependencies
42
-
43
- ## 0.10.1 (2025-03-24)
44
-
45
- ### 🐛 Bug Fixes
46
-
47
27
  - **prompter**: modify DependenciesQuestion to not enter an infinite loop of asking the user
48
-
49
- ## 0.10.0 (2025-03-23)
50
-
51
- ### ✨ Features
52
-
53
- - **prompter**: implement general project step that will only be used when custom template is passed
54
- - **cli**: add template command for project_cli.py to let users create a project using a custom template
55
- - **prompter**: implement ConditionalQuestion
56
- - **prompter**: implement TemplateStep to group all questions related to default template management
57
- - **project-generator**: implement CustomTemplateManager to manage when user passes a custom template file
58
- - **project-generator**: create TemplateManager interface
59
- - **cli**: add folder command to allow users to just generate the folder structure of the project
60
-
61
- ### 🐛 Bug Fixes
62
-
63
28
  - **cli**: temporarily disable template commands
64
29
  - **prompter**: extract the value of the base answer to check it with condition
65
30
  - **prompter**: remove init argument from year field
@@ -67,9 +32,18 @@
67
32
  - **prompter**: set default value for git field in UserRequirements to avoid failing when executing folder command
68
33
  - **prompter**: include last question in TemplateStep if selected template is domain_driven_design
69
34
  - **project-generator**: instantiate DefaultTemplateManager inside File class
35
+ - **build**: change build system and ensure templates directory gets included
36
+ - **project-generator**: substitute FileSystemLoader for PackageLoader to safer load when using it as a package
37
+ - **prompter**: correct default source folder name
38
+ - **template**: correct license field from pyproject.toml template
39
+ - **template**: use project_slug for project name inside pyproject.toml
40
+ - **project-generator**: correct path to templates
41
+ - **project-generator**: correct extra blocks that where being created when including templates
70
42
 
71
43
  ### ♻️ Code Refactoring
72
44
 
45
+ - **template**: include mypy, git and pytest configuration files only when the user has selected these options
46
+ - **template**: include dependencies depending on user built in features selection
73
47
  - **prompter**: update answers dictionary instead of add manually question key and answer
74
48
  - **prompter**: return a dictionary with the key of the question and the answer instead of just the answer
75
49
  - **cli**: modify cli help commands and descriptions
@@ -93,86 +67,19 @@
93
67
  - **cli**: add help description to both commands
94
68
  - **prompter**: move python and dependency manager from dependencies step to general project step as it's information that is needed in general to fill all files information
95
69
  - **cli**: rename generate_project command to new
96
-
97
- ## 0.9.0 (2025-03-14)
98
-
99
- ### ✨ Features
100
-
101
- - **project-generator**: format all project files with ruff once everything is generated
102
- - **cli**: remove user_requirements file once project has been generated
103
- - **prompter**: add remove method to UserRequirements class
104
-
105
- ### 🐛 Bug Fixes
106
-
107
- - **build**: change build system and ensure templates directory gets included
108
- - **project-generator**: substitute FileSystemLoader for PackageLoader to safer load when using it as a package
109
-
110
- ### ♻️ Code Refactoring
111
-
112
70
  - **prompter**: add file_path field to user requirements class
113
-
114
- ## 0.8.1 (2025-03-14)
115
-
116
- ### 🐛 Bug Fixes
117
-
118
- - **prompter**: correct default source folder name
119
- - **template**: correct license field from pyproject.toml template
120
-
121
- ### ♻️ Code Refactoring
122
-
123
71
  - **cli**: pass project slug name as the project directory that will be created
124
72
  - **project-generator**: pass the directory where the project will be created to FolderTree
125
73
  - **cli**: remove checking if a user_requirements file exists
126
74
  - **template**: remove writing author and email info only if manager is pdm
127
-
128
- ## 0.8.0 (2025-03-11)
129
-
130
- ### ✨ Features
131
-
132
- - **cli**: call to git configurer when user wants to initialize a git repository
133
- - **installer**: implement GitConfigurer
134
- - **cli**: include git step into cli steps
135
- - **prompter**: implement step to ask the user information to initialize a git repository
136
-
137
- ### ♻️ Code Refactoring
138
-
139
75
  - **installer**: avoid printing executed commands output by stdout
140
76
  - **template**: use git_email field in pyproject.toml
141
77
  - **prompter**: remove email field from UserRequirements and add git_email and git_user_name
142
78
  - **prompter**: remove email question from general project step
143
-
144
- ## 0.7.0 (2025-03-11)
145
-
146
- ### ✨ Features
147
-
148
- - **template**: add clean architecture template project structure
149
-
150
- ## 0.6.0 (2025-03-11)
151
-
152
- ### ✨ Features
153
-
154
- - **template**: add standard project project structure templates
155
-
156
- ### ♻️ Code Refactoring
157
-
158
79
  - **project-generator**: remove condition of loading the template only when is domain driven design
159
80
  - **template**: use include_and_indent custom macro inside domain_driven_design/test template
160
81
  - **template**: include always mypy and pytest ini configuration
161
82
  - **prompter**: rename empty project template to standard project
162
-
163
- ## 0.5.0 (2025-03-10)
164
-
165
- ### ✨ Features
166
-
167
- - **installer**: create factory method to choose which dependency manager gets instantiated
168
- - **installer**: implement PdmInstaller
169
-
170
- ### 🐛 Bug Fixes
171
-
172
- - **template**: use project_slug for project name inside pyproject.toml
173
-
174
- ### ♻️ Code Refactoring
175
-
176
83
  - **cli**: use DependencyManagerFactory instead of always instantiating UvManager
177
84
  - **installer**: remove ShellConfigurator and ZshConfigurator
178
85
  - **cli**: remove shell configurator injection
@@ -180,11 +87,86 @@
180
87
  - **prompter**: warn the user that project name cannot contain spaces
181
88
  - **prompter**: remove project name question and just leave project slug
182
89
  - **installer**: remove executable attribute from UvManager
90
+ - **installer**: specify working directory to UvManager so it installs everything at the generated project
91
+ - **cli**: pass generated project path to UvManager
92
+ - **installer**: inline uv install command attribute as is not something reusable
93
+ - **cli**: inject folder tree and template manager to project generator
94
+ - **project-generator**: set the directory where user project will be generated as FolderTree attribute and expose it through a property
95
+ - **project-generator**: pass folder_tree and template_manager injected into ProjectGenerator
96
+ - **cli**: pass user dependencies to installer
97
+ - **prompter**: substitute fixed default dependencies by dynamic ones that will be asked to the user
98
+ - **prompter**: remove question definition lists and basic prompter
99
+ - **cli**: substitute BasicPrompter for QuestionWizard
100
+ - **prompter**: remove python manager and operating system questions
101
+ - **prompter**: extract helper method to know if template is ddd
102
+ - **prompter**: delegate ask logic to each question instead of letting prompter what to do depending on flags
103
+ - **prompter**: redefine questions using concrete implementations
104
+ - **prompter**: make Question abstract and add ask abstract method
105
+ - **project-generator**: rename Directory's init attribute to python_module and remove default value for children
106
+ - **project-generator**: move children extraction only when node is a directory
107
+ - **src**: remove old src folder with cookiecutter project and convert current instant_python module into src
108
+ - **cli**: generate user requirements only if no other file has been already generated.
109
+ - **template**: move makefile template to scripts folder as this folder only makes sense if it's use with the makefile
110
+ - **template**: move base from sync sqlalchemy to persistence folder as it would be the same for both sync and async
111
+ - **template**: move sqlalchemy sync templates to specific folder
112
+ - **template**: move exceptions templates to specific folder
113
+ - **template**: move value object templates to specific folder
114
+ - **template**: move github actions templates to specific folder
115
+ - **template**: move logger templates to specific folder
116
+ - **project-generator**: modify File class to be able to manage the difference between the path to the template and the path where the file should be written
117
+ - **template**: change all yml templates to point to inner event_bus folder boilerplate
118
+ - **template**: move all boilerplate related to event bus inside specific folder
119
+ - **prompter**: change github information for basic name and email
120
+ - **prompter**: move default dependencies question to general questions and include the default dependencies that will be included
121
+ - **prompter**: remove converting to snake case all answers and set directly those answers in snake case if needed
122
+ - **templates**: use raw command inside github action instead of make
123
+ - **templates**: modify error templates to use DomainError
124
+ - **templates**: change all python-module types to directory and add python flag when need it
125
+ - **project-generator**: make Directory general for any type of folder and remove python module class
126
+ - **project-generator**: remove python_module node type
127
+ - **templates**: set all files of type file and add them the extension variable
128
+ - **project-generator**: add extension field to node and remove deprecated options
129
+ - **project-generator**: create a single node type File that will work with any kind of file
130
+ - **project-generator**: substitute python file and yml file node type for single file
131
+ - **templates**: use new operator to write a single children command in source
132
+ - **project-generator**: include new custom operator in jinja environment
133
+ - **templates**: remove populated shared template
134
+ - **templates**: include value objects template when is specified by the user
135
+ - **templates**: import and call macro inside project structures templates
136
+ - **prompter**: format all answers to snake case
137
+ - use TemplateTypes instead of literal string
138
+ - **project-generator**: change template path name when generating project
139
+ - **templates**: move ddd templates inside project_structure folder
140
+ - **prompter**: migrate BasicPrompter to use questionary instead of typer to make the questions as it manages multiple selections better
141
+ - **cli**: instantiate BasicPrompter instead of using class method
142
+ - **prompter**: simplify ask method by using Question object an iterating over the list of defined questions
143
+ - **templates**: modularize main_structure file
144
+ - **project-generator**: create project structure inside a temporary directory
145
+ - **project-generator**: delegate template management to TemplateManager
146
+ - **cli**: call BasicPrompter and ProjectGenerator inside cli app
183
147
 
184
- ## 0.4.0 (2025-03-09)
185
148
 
186
149
  ### ✨ Features
187
150
 
151
+ - **project-generator**: create new custom function to generate import path in templates
152
+ - **prompter**: implement general project step that will only be used when custom template is passed
153
+ - **cli**: add template command for project_cli.py to let users create a project using a custom template
154
+ - **prompter**: implement ConditionalQuestion
155
+ - **prompter**: implement TemplateStep to group all questions related to default template management
156
+ - **project-generator**: implement CustomTemplateManager to manage when user passes a custom template file
157
+ - **project-generator**: create TemplateManager interface
158
+ - **cli**: add folder command to allow users to just generate the folder structure of the project
159
+ - **project-generator**: format all project files with ruff once everything is generated
160
+ - **cli**: remove user_requirements file once project has been generated
161
+ - **prompter**: add remove method to UserRequirements class
162
+ - **cli**: call to git configurer when user wants to initialize a git repository
163
+ - **installer**: implement GitConfigurer
164
+ - **cli**: include git step into cli steps
165
+ - **prompter**: implement step to ask the user information to initialize a git repository
166
+ - **template**: add clean architecture template project structure
167
+ - **template**: add standard project project structure templates
168
+ - **installer**: create factory method to choose which dependency manager gets instantiated
169
+ - **installer**: implement PdmInstaller
188
170
  - **project-generator**: expose generated project path through ProjectGenerator
189
171
  - **installer**: add project_directory field to UvManager to know where to create the virtual environment
190
172
  - **installer**: add install_dependencies step to Installer
@@ -211,36 +193,6 @@
211
193
  - **project-generator**: create custom exception when node type does not exist
212
194
  - **cli**: make sure user_requirements are loaded
213
195
  - **prompter**: add load_from_file method to UserRequirements
214
-
215
- ### 🐛 Bug Fixes
216
-
217
- - **project-generator**: correct path to templates
218
-
219
- ### ♻️ Code Refactoring
220
-
221
- - **installer**: specify working directory to UvManager so it installs everything at the generated project
222
- - **cli**: pass generated project path to UvManager
223
- - **installer**: inline uv install command attribute as is not something reusable
224
- - **cli**: inject folder tree and template manager to project generator
225
- - **project-generator**: set the directory where user project will be generated as FolderTree attribute and expose it through a property
226
- - **project-generator**: pass folder_tree and template_manager injected into ProjectGenerator
227
- - **cli**: pass user dependencies to installer
228
- - **prompter**: substitute fixed default dependencies by dynamic ones that will be asked to the user
229
- - **prompter**: remove question definition lists and basic prompter
230
- - **cli**: substitute BasicPrompter for QuestionWizard
231
- - **prompter**: remove python manager and operating system questions
232
- - **prompter**: extract helper method to know if template is ddd
233
- - **prompter**: delegate ask logic to each question instead of letting prompter what to do depending on flags
234
- - **prompter**: redefine questions using concrete implementations
235
- - **prompter**: make Question abstract and add ask abstract method
236
- - **project-generator**: rename Directory's init attribute to python_module and remove default value for children
237
- - **project-generator**: move children extraction only when node is a directory
238
- - **src**: remove old src folder with cookiecutter project and convert current instant_python module into src
239
-
240
- ## 0.3.0 (2025-03-01)
241
-
242
- ### ✨ Features
243
-
244
196
  - **template**: include mock event bus template for testing
245
197
  - **template**: add scripts templates
246
198
  - **prompter**: add fastapi option to built in features
@@ -260,29 +212,6 @@
260
212
  - **templates**: add .gitignore template
261
213
  - **templates**: add pyproject template
262
214
  - **templates**: add makefile template
263
-
264
- ### ♻️ Code Refactoring
265
-
266
- - **cli**: generate user requirements only if no other file has been already generated.
267
- - **template**: move makefile template to scripts folder as this folder only makes sense if it's use with the makefile
268
- - **template**: move base from sync sqlalchemy to persistence folder as it would be the same for both sync and async
269
- - **template**: move sqlalchemy sync templates to specific folder
270
- - **template**: move exceptions templates to specific folder
271
- - **template**: move value object templates to specific folder
272
- - **template**: move github actions templates to specific folder
273
- - **template**: move logger templates to specific folder
274
- - **project-generator**: modify File class to be able to manage the difference between the path to the template and the path where the file should be written
275
- - **template**: change all yml templates to point to inner event_bus folder boilerplate
276
- - **template**: move all boilerplate related to event bus inside specific folder
277
- - **prompter**: change github information for basic name and email
278
- - **prompter**: move default dependencies question to general questions and include the default dependencies that will be included
279
- - **prompter**: remove converting to snake case all answers and set directly those answers in snake case if needed
280
- - **templates**: use raw command inside github action instead of make
281
-
282
- ## 0.2.0 (2025-02-27)
283
-
284
- ### ✨ Features
285
-
286
215
  - **templates**: add invalid id format error template
287
216
  - **templates**: add domain error template
288
217
  - **prompter**: add synchronous sqlalchemy option to built in features question
@@ -316,33 +245,3 @@
316
245
  - **prompter**: create basic class that asks project requirements to user
317
246
  - **cli**: create basic typer application with no implementation
318
247
 
319
- ### 🐛 Bug Fixes
320
-
321
- - **project-generator**: correct extra blocks that where being created when including templates
322
-
323
- ### ♻️ Code Refactoring
324
-
325
- - **templates**: modify error templates to use DomainError
326
- - **templates**: change all python-module types to directory and add python flag when need it
327
- - **project-generator**: make Directory general for any type of folder and remove python module class
328
- - **project-generator**: remove python_module node type
329
- - **templates**: set all files of type file and add them the extension variable
330
- - **project-generator**: add extension field to node and remove deprecated options
331
- - **project-generator**: create a single node type File that will work with any kind of file
332
- - **project-generator**: substitute python file and yml file node type for single file
333
- - **templates**: use new operator to write a single children command in source
334
- - **project-generator**: include new custom operator in jinja environment
335
- - **templates**: remove populated shared template
336
- - **templates**: include value objects template when is specified by the user
337
- - **templates**: import and call macro inside project structures templates
338
- - **prompter**: format all answers to snake case
339
- - use TemplateTypes instead of literal string
340
- - **project-generator**: change template path name when generating project
341
- - **templates**: move ddd templates inside project_structure folder
342
- - **prompter**: migrate BasicPrompter to use questionary instead of typer to make the questions as it manages multiple selections better
343
- - **cli**: instantiate BasicPrompter instead of using class method
344
- - **prompter**: simplify ask method by using Question object an iterating over the list of defined questions
345
- - **templates**: modularize main_structure file
346
- - **project-generator**: create project structure inside a temporary directory
347
- - **project-generator**: delegate template management to TemplateManager
348
- - **cli**: call BasicPrompter and ProjectGenerator inside cli app
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: instant-python
3
- Version: 0.0.1
3
+ Version: 0.1.1
4
4
  Summary: Python automatic project generator
5
5
  Author-email: dimanu-py <diegomtz126@gmail.com>
6
6
  License: Apache License
@@ -205,7 +205,7 @@ License: Apache License
205
205
  See the License for the specific language governing permissions and
206
206
  limitations under the License.
207
207
  License-File: LICENSE
208
- Requires-Python: >=3.12
208
+ Requires-Python: >=3.9
209
209
  Requires-Dist: jinja2>=3.1.5
210
210
  Requires-Dist: pyyaml>=6.0.2
211
211
  Requires-Dist: questionary>=2.1.0
@@ -1,10 +1,13 @@
1
- # Contributing
1
+ # Contributing & Reporting
2
2
 
3
3
  If you would like to contribute and help to improve this library feel free to fork this project and create a pull request.
4
4
 
5
5
  You may as well check out the [open issues](https://github.com/dimanu-py/instant-python/issues) to see whether somebody is already
6
6
  addressing your problem or solve your doubts. If not, feel free to open a new issue with any improvement that can be made.
7
7
 
8
+ Any bug that you find is welcome to be reported. Please make sure to include as much information as possible and follow the
9
+ correct templates. This will help us to understand the problem and fix it as soon as possible.
10
+
8
11
  If you find this library useful and want to help, you can also give it a star on GitHub or donate in the following link
9
12
 
10
13
  [![Donate](https://img.shields.io/badge/Buy_me_a_coffee-5d83f5?style=for-the-badge&logo=ko-fi&logoColor=white&__cf_chl_managed_tk__=pmd_sOkOcrsQ4T6MRVPX2TeB_mbk2ZryAIn3rNigWIBBC6U-1633993526-0-gqNtZGzNAyWjcnBszQkl)](https://buymeacoffee.com/dimanu.py)
@@ -1,7 +1,7 @@
1
- from enum import StrEnum
1
+ from enum import Enum
2
2
 
3
3
 
4
- class Managers(StrEnum):
4
+ class Managers(str, Enum):
5
5
  PYENV = "pyenv"
6
6
  UV = "uv"
7
7
  PDM = "pdm"
@@ -1,5 +1,4 @@
1
1
  from pathlib import Path
2
- from typing import override
3
2
 
4
3
  import yaml
5
4
 
@@ -10,7 +9,6 @@ class CustomTemplateManager(TemplateManager):
10
9
  def __init__(self, template_path: str) -> None:
11
10
  self._template_path = Path(template_path).expanduser().resolve()
12
11
 
13
- @override
14
12
  def get_project(self, template_name: str) -> dict[str, str]:
15
13
  if not self._template_path.is_file():
16
14
  raise FileNotFoundError(
@@ -1,5 +1,3 @@
1
- from typing import override
2
-
3
1
  import yaml
4
2
  from jinja2 import Environment, Template, PackageLoader
5
3
 
@@ -20,7 +18,6 @@ class DefaultTemplateManager(TemplateManager):
20
18
  self._env.filters["is_in"] = is_in
21
19
  self._env.filters["compute_base_path"] = compute_base_path
22
20
 
23
- @override
24
21
  def get_project(self, template_name: str) -> dict:
25
22
  template = self._get_template(
26
23
  f"{template_name}/{self._requirements.template}/main_structure.yml.j2"
@@ -7,7 +7,7 @@ from instant_python.project_generator.node import Node
7
7
  class File(Node):
8
8
 
9
9
  def __init__(self, name: str, extension: str) -> None:
10
- self._file_name = f"{name.split("/")[-1]}{extension}"
10
+ self._file_name = f"{name.split('/')[-1]}{extension}"
11
11
  self._template_path = f"boilerplate/{name}{extension}"
12
12
  self._template_manager = DefaultTemplateManager()
13
13
 
@@ -1,9 +1,9 @@
1
1
  from abc import ABC, abstractmethod
2
- from enum import StrEnum
2
+ from enum import Enum
3
3
  from pathlib import Path
4
4
 
5
5
 
6
- class NodeType(StrEnum):
6
+ class NodeType(str, Enum):
7
7
  DIRECTORY = "directory"
8
8
  FILE = "file"
9
9
 
@@ -1,7 +1,10 @@
1
1
  from abc import ABC, abstractmethod
2
2
 
3
+ from typing import TypeVar, Generic
3
4
 
4
- class Question[T](ABC):
5
+ T = TypeVar("T")
6
+
7
+ class Question(Generic[T], ABC):
5
8
  def __init__(self, key: str, message: str) -> None:
6
9
  self._key = key
7
10
  self._message = message
@@ -1,7 +1,7 @@
1
- from enum import StrEnum
1
+ from enum import Enum
2
2
 
3
3
 
4
- class TemplateTypes(StrEnum):
4
+ class TemplateTypes(str, Enum):
5
5
  DDD = "domain_driven_design"
6
6
  CLEAN = "clean_architecture"
7
7
  STANDARD = "standard_project"
@@ -0,0 +1,14 @@
1
+ {% if python_version in ["3.13", "3.12", "3.11"] %}
2
+ from enum import StrEnum
3
+
4
+
5
+ class ExchangeType(StrEnum):
6
+ {% else %}
7
+ from enum import Enum
8
+
9
+
10
+ class ExchangeType(str, Enum):
11
+ {% endif %}
12
+ TOPIC = "topic"
13
+ DIRECT = "direct"
14
+ FANOUT = "fanout"
@@ -1,6 +1,10 @@
1
1
  {% set template_domain_import = "shared.domain"|compute_base_path(template) %}
2
2
  {% set template_infra_import = "shared.infra"|compute_base_path(template) %}
3
- from typing import Type, TypeVar
3
+ {% if python_version in ["3.13", "3.12", "3.11"] %}
4
+ from typing import TypeVar
5
+ {% else %}
6
+ from typing import TypeVar, Generic
7
+ {% endif %}
4
8
 
5
9
  from {{ source_name }}.{{ template_domain_import }}.value_objects.uuid import Uuid
6
10
  from {{ source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.base import Base
@@ -9,10 +13,13 @@ from {{ source_name }}.{{ template_infra_import }}.persistence.sqlalchemy.sessio
9
13
  )
10
14
 
11
15
  Entity = TypeVar("Entity")
12
-
13
-
14
- class SqlAlchemyRepository[Model: Base]:
15
- _model_class: Type[Model]
16
+ {% if python_version in ["3.13", "3.12", "3.11"] %}
17
+ class SqlAlchemyRepository[Model: Base]:
18
+ {% else %}
19
+ Model = TypeVar("Model", bound=Base)
20
+ class SqlAlchemyRepository(Generic[Model]):
21
+ {% endif %}
22
+ _model_class: type[Model]
16
23
  _session_maker: SessionMaker
17
24
 
18
25
  def __init__(self, session_maker: SessionMaker, model_class: Type[Model]) -> None:
@@ -0,0 +1,48 @@
1
+ {% if python_version in ["3.13", "3.12", "3.11"] %}
2
+ from abc import ABC, abstractmethod
3
+ from typing import override
4
+
5
+ class ValueObject[T](ABC):
6
+ _value: T
7
+
8
+ def __init__(self, value: T) -> None:
9
+ self._validate(value)
10
+ self._value = value
11
+
12
+ @abstractmethod
13
+ def _validate(self, value: T) -> None: ...
14
+
15
+ @property
16
+ def value(self) -> T:
17
+ return self._value
18
+
19
+ @override
20
+ def __eq__(self, other: object) -> bool:
21
+ if not isinstance(other, ValueObject):
22
+ return False
23
+ return self.value == other.value
24
+ {% else %}
25
+ from abc import ABC, abstractmethod
26
+ from typing import TypeVar, Generic
27
+
28
+ T = TypeVar("T")
29
+
30
+ class ValueObject(Generic[T], ABC):
31
+ _value: T
32
+
33
+ def __init__(self, value: T) -> None:
34
+ self._validate(value)
35
+ self._value = value
36
+
37
+ @abstractmethod
38
+ def _validate(self, value: T) -> None: ...
39
+
40
+ @property
41
+ def value(self) -> T:
42
+ return self._value
43
+
44
+ def __eq__(self, other: object) -> bool:
45
+ if not isinstance(other, ValueObject):
46
+ return False
47
+ return self.value == other.value
48
+ {% endif %}
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "instant-python"
7
- version = "0.0.1"
7
+ version = "0.1.1"
8
8
  description = "Python automatic project generator"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
11
11
  authors = [{name = "dimanu-py", email = "diegomtz126@gmail.com"}]
12
- requires-python = ">=3.12"
12
+ requires-python = ">=3.9"
13
13
  dependencies = [
14
14
  "typer>=0.15.1",
15
15
  "jinja2>=3.1.5",
@@ -31,3 +31,7 @@ docs = [
31
31
  git = [
32
32
  "commitizen>=4.2.2",
33
33
  ]
34
+ lint = [
35
+ "tox>=4.25.0",
36
+ "vermin>=1.6.0",
37
+ ]
@@ -0,0 +1,18 @@
1
+ [tox]
2
+ envlist = py3.9, py310, py311, py312, py13
3
+
4
+ [testenv]
5
+ basepython =
6
+ py39: /home/dimanu/.local/share/uv/python/cpython-3.9.21-linux-x86_64-gnu/bin/python3.9
7
+ py310: /home/dimanu/.local/share/uv/python/cpython-3.10.16-linux-x86_64-gnu/bin/python3.10
8
+ py311: /home/dimanu/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/bin/python3.11
9
+ py312: /usr/bin/python3.12
10
+ py313: /home/dimanu/.local/share/uv/python/cpython-3.13.2-linux-x86_64-gnu/bin/python3.13
11
+
12
+ commands = python instant_python/cli.py --help
13
+
14
+ deps =
15
+ typer
16
+ jinja2
17
+ questionary
18
+ pyyaml