instant-python 0.2.0__tar.gz → 0.3.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.3.0/.github/workflows/release.yml +69 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/CHANGELOG.md +25 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/PKG-INFO +9 -3
- {instant_python-0.2.0 → instant_python-0.3.0}/README.md +1 -1
- instant_python-0.2.0/docs/getting-started/features.md → instant_python-0.3.0/docs/getting-started/features_overview.md +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/getting-started/first-steps.md +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/getting-started/index.md +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/getting-started/installation.md +5 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/guide/creating-a-project.md +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/guide/custom-templates.md +12 -4
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/guide/features.md +176 -18
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/guide/folder-structure.md +9 -18
- instant_python-0.3.0/docs/guide/index.md +9 -0
- instant_python-0.3.0/docs/guide/when-to-use-commands.md +39 -0
- instant_python-0.3.0/docs/welcome.md +57 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/folder_cli.py +9 -9
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_cli.py +3 -3
- instant_python-0.2.0/instant_python/project_generator/file.py → instant_python-0.3.0/instant_python/project_generator/boilerplate_file.py +3 -3
- instant_python-0.3.0/instant_python/project_generator/file.py +16 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/folder_tree.py +4 -0
- instant_python-0.3.0/instant_python/project_generator/jinja_environment.py +20 -0
- instant_python-0.2.0/instant_python/project_generator/default_template_manager.py → instant_python-0.3.0/instant_python/project_generator/jinja_template_manager.py +8 -13
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/node.py +1 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/project_generator.py +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question_wizard.py +3 -3
- instant_python-0.2.0/instant_python/question_prompter/user_requirements.py → instant_python-0.3.0/instant_python/question_prompter/requirements_configuration.py +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/aggregate_root.py +0 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/value_object/int_value_object.py +7 -4
- instant_python-0.3.0/instant_python/templates/project_structure/alembic_migrator.yml.j2 +3 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/async_alembic.yml.j2 +5 -5
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/async_sqlalchemy.yml.j2 +3 -3
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/clean_architecture/test.yml.j2 +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/domain_driven_design/source.yml.j2 +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/domain_driven_design/test.yml.j2 +3 -3
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/event_bus_domain.yml.j2 +7 -7
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/event_bus_infra.yml.j2 +8 -8
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/fastapi_app.yml.j2 +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/fastapi_infra.yml.j2 +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/github_action.yml.j2 +2 -2
- instant_python-0.3.0/instant_python/templates/project_structure/gitignore.yml.j2 +2 -0
- instant_python-0.3.0/instant_python/templates/project_structure/license.yml.j2 +2 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/logger.yml.j2 +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/makefile.yml.j2 +10 -10
- instant_python-0.3.0/instant_python/templates/project_structure/mypy.yml.j2 +3 -0
- instant_python-0.3.0/instant_python/templates/project_structure/pre_commit.yml.j2 +3 -0
- instant_python-0.3.0/instant_python/templates/project_structure/pyproject.yml.j2 +3 -0
- instant_python-0.3.0/instant_python/templates/project_structure/pytest.yml.j2 +3 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/python_version.yml.j2 +1 -1
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/standard_project/test.yml.j2 +2 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/synchronous_sqlalchemy.yml.j2 +3 -3
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/value_objects.yml.j2 +9 -9
- {instant_python-0.2.0 → instant_python-0.3.0}/mkdocs.yml +4 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/pyproject.toml +13 -2
- {instant_python-0.2.0 → instant_python-0.3.0}/uv.lock +1 -1
- instant_python-0.2.0/.github/workflows/release.yml +0 -41
- instant_python-0.2.0/docs/guide/index.md +0 -6
- instant_python-0.2.0/docs/index.md +0 -7
- instant_python-0.2.0/instant_python/templates/project_structure/alembic_migrator.yml.j2 +0 -3
- instant_python-0.2.0/instant_python/templates/project_structure/gitignore.yml.j2 +0 -2
- instant_python-0.2.0/instant_python/templates/project_structure/license.yml.j2 +0 -2
- instant_python-0.2.0/instant_python/templates/project_structure/mypy.yml.j2 +0 -3
- instant_python-0.2.0/instant_python/templates/project_structure/pre_commit.yml.j2 +0 -3
- instant_python-0.2.0/instant_python/templates/project_structure/pyproject.yml.j2 +0 -3
- instant_python-0.2.0/instant_python/templates/project_structure/pytest.yml.j2 +0 -3
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/FUNDING.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/actions/python_setup/action.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/workflows/pages.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.github/workflows/publish.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.gitignore +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/.python-version +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/LICENSE +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/cz.yaml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/assets/favicon.svg +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/assets/logo.svg +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/docs/contributing.md +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/cli.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/dependency_manager.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/dependency_manager_factory.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/git_configurer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/installer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/managers.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/pdm_manager.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/installer/uv_manager.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/custom_template_manager.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/directory.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/jinja_custom_filters.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/project_generator/template_manager.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/boolean_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/choice_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/conditional_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/dependencies_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/free_text_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/multiple_choice_question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/question/question.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/dependencies_step.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/general_custom_template_project_step.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/general_project_step.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/git_step.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/steps.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/step/template_step.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/question_prompter/template_types.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/.gitignore +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/.pre-commit-config.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/.python-version +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/LICENSE +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/domain_event.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_deserializer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/domain_event_json_serializer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/domain_event_subscriber.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/event_bus.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/exchange_type.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/mock_event_bus.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_configurer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_connection.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_consumer.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_event_bus.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_queue_formatter.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/event_bus/rabbit_mq_settings.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/domain_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/domain_event_type_not_found_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/incorrect_value_type_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/invalid_id_format_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/invalid_negative_value_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/rabbit_mq_connection_not_established_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/exceptions/required_value_error.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/fastapi/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/fastapi/application.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/fastapi/http_response.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/fastapi/lifespan.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/fastapi/status_code.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/github/action.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/github/test_lint.yml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/logger/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/logger/json_formatter.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/logger/logger.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/mypy.ini +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/alembic_migrator.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/README.md +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/alembic.ini +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/async_engine_fixture.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/env.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/models_metadata.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/postgres_settings.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/script.py.mako +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/async/sqlalchemy_repository.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/base.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/synchronous/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/synchronous/session_maker.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/persistence/synchronous/sqlalchemy_repository.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/pyproject.toml +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/pytest.ini +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/random_generator.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/add_dependency.sh +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/create_aggregate.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/insert_template.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/integration.sh +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/local_setup.sh +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/makefile +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/post-merge +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/pre-commit +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/pre-push +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/remove_dependency.sh +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/scripts/unit.sh +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/value_object/__init__.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/value_object/string_value_object.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/value_object/uuid.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/boilerplate/value_object/value_object.py +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/clean_architecture/main_structure.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/clean_architecture/source.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/domain_driven_design/bounded_context.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/domain_driven_design/main_structure.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/macros.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/standard_project/main_structure.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/instant_python/templates/project_structure/standard_project/source.yml.j2 +0 -0
- {instant_python-0.2.0 → instant_python-0.3.0}/tox.ini +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Generate Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
bump-version:
|
|
8
|
+
if: "!startsWith(github.event.head_commit.message, 'bump:')"
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
outputs:
|
|
11
|
+
tag: ${{ steps.bump.outputs.new_tag }}
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
with:
|
|
16
|
+
token: ${{ secrets.CHANGELOG_TOKEN }}
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Bump version and update changelog
|
|
20
|
+
uses: commitizen-tools/commitizen-action@master
|
|
21
|
+
with:
|
|
22
|
+
github_token: ${{ secrets.CHANGELOG_TOKEN }}
|
|
23
|
+
|
|
24
|
+
create-release:
|
|
25
|
+
needs: bump-version
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Check out
|
|
29
|
+
uses: actions/checkout@v3
|
|
30
|
+
with:
|
|
31
|
+
token: ${{ secrets.CHANGELOG_TOKEN }}
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- name: Get release tag
|
|
35
|
+
id: release_tag
|
|
36
|
+
run: |
|
|
37
|
+
if [ -z "${{ needs.bump_version.outputs.tag }}" ]; then
|
|
38
|
+
echo "No tag provided from bump version job. Running fallback command..."
|
|
39
|
+
git fetch --tags
|
|
40
|
+
echo "release_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
|
41
|
+
else
|
|
42
|
+
echo "Using tag provided from bump version job."
|
|
43
|
+
echo "release_tag=${{ needs.bump_version.outputs.tag }}" >> $GITHUB_OUTPUT
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
- name: Extract Changelog for Release
|
|
47
|
+
id: extract_changelog
|
|
48
|
+
run: |
|
|
49
|
+
release="${{ steps.determine_tag.outputs.release_tag }}"
|
|
50
|
+
echo "Extracting changelog for tag: ${release}"
|
|
51
|
+
|
|
52
|
+
awk -v tag="$release" '
|
|
53
|
+
BEGIN {flag=0}
|
|
54
|
+
/^## / {
|
|
55
|
+
if (flag == 1 && $0 !~ ("^## " tag)) { exit }
|
|
56
|
+
if ($0 ~ ("^## " tag)) { flag=1 }
|
|
57
|
+
}
|
|
58
|
+
flag { print }
|
|
59
|
+
' CHANGELOG.md > release_changelog.md
|
|
60
|
+
|
|
61
|
+
cat release_changelog.md
|
|
62
|
+
|
|
63
|
+
- name: Create release
|
|
64
|
+
uses: ncipollo/release-action@v1
|
|
65
|
+
with:
|
|
66
|
+
token: ${{ secrets.CHANGELOG_TOKEN }}
|
|
67
|
+
tag: ${{ steps.release_tag.outputs.release_tag }}
|
|
68
|
+
name: Release ${{ steps.release_tag.outputs.release_tag }}
|
|
69
|
+
bodyFile: release_changelog.md
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## 0.3.0 (2025-04-11)
|
|
2
|
+
|
|
3
|
+
### ✨ Features
|
|
4
|
+
|
|
5
|
+
- **project-generator**: add support for creating user File instances in folder tree
|
|
6
|
+
- **project-generator**: create new File class to model user files
|
|
7
|
+
- **project-generator**: create JinjaEnvironment class to manage independently jinja env
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **template**: correct IntValueObject template to call super init
|
|
12
|
+
- **template**: remove unnecessary newline in template import
|
|
13
|
+
- **template**: correct typo in jinja template
|
|
14
|
+
|
|
15
|
+
### ♻️ Code Refactoring
|
|
16
|
+
|
|
17
|
+
- **template**: modify all template file types
|
|
18
|
+
- **project-generator**: rename File class to BoilerplateFile to be able to differentiate a normal file introduced by the user and a file of the library that contains boilerplate
|
|
19
|
+
- **cli**: update template command parameter from template_name to template_path
|
|
20
|
+
- **cli**: rename configuration variable name from user_requirements to requirements
|
|
21
|
+
- **prompter**: modify configuration file name from user_requirements.yml to ipy.yml
|
|
22
|
+
- **prompter**: rename UserRequirements to RequirementsConfiguration
|
|
23
|
+
- **project-generator**: rename DefaultTemplateManager to JinjaTemplateManager
|
|
24
|
+
- **project-generator**: delegate jinja env management to JinjaEnvironment in DefaultTemplateManager
|
|
25
|
+
|
|
1
26
|
## 0.2.0 (2025-04-08)
|
|
2
27
|
|
|
3
28
|
### ✨ Features
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: instant-python
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Instant boilerplate generation for Python projects
|
|
5
|
+
Project-URL: documentation, https://dimanu-py.github.io/instant-python/
|
|
6
|
+
Project-URL: repository, https://github.com/dimanu-py/instant-python/
|
|
5
7
|
Author-email: dimanu-py <diegomtz126@gmail.com>
|
|
6
8
|
License: Apache License
|
|
7
9
|
Version 2.0, January 2004
|
|
@@ -205,6 +207,10 @@ License: Apache License
|
|
|
205
207
|
See the License for the specific language governing permissions and
|
|
206
208
|
limitations under the License.
|
|
207
209
|
License-File: LICENSE
|
|
210
|
+
Classifier: Environment :: Console
|
|
211
|
+
Classifier: Intended Audience :: Developers
|
|
212
|
+
Classifier: Operating System :: MacOS
|
|
213
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
208
214
|
Requires-Python: >=3.9
|
|
209
215
|
Requires-Dist: jinja2>=3.1.5
|
|
210
216
|
Requires-Dist: pyyaml>=6.0.2
|
|
@@ -261,7 +267,7 @@ as soon as possible. An overview of the features is given below, but you can fin
|
|
|
261
267
|
[documentation](https://dimanu-py.github.io/instant-python/guide/features/).
|
|
262
268
|
|
|
263
269
|
- Project slug: Configure the name of the main folder of your project.
|
|
264
|
-
- Source name: Configure the name of the source code of your project.
|
|
270
|
+
- Source name: Configure the name of the source code folder of your project.
|
|
265
271
|
- Description: Include a description about your project.
|
|
266
272
|
- Version: Set the initial version of your project.
|
|
267
273
|
- Author: Set the author of the project.
|
|
@@ -47,7 +47,7 @@ as soon as possible. An overview of the features is given below, but you can fin
|
|
|
47
47
|
[documentation](https://dimanu-py.github.io/instant-python/guide/features/).
|
|
48
48
|
|
|
49
49
|
- Project slug: Configure the name of the main folder of your project.
|
|
50
|
-
- Source name: Configure the name of the source code of your project.
|
|
50
|
+
- Source name: Configure the name of the source code folder of your project.
|
|
51
51
|
- Description: Include a description about your project.
|
|
52
52
|
- Version: Set the initial version of your project.
|
|
53
53
|
- Author: Set the author of the project.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Features
|
|
1
|
+
# Features Overview
|
|
2
2
|
|
|
3
3
|
`instant-python` provides a set of commands that allow you to generate different aspects of your Python project, from
|
|
4
4
|
generating a complete project to add some boilerplate or even create your custom template.
|
|
@@ -15,7 +15,7 @@ Create a new project setting up all projects files and configurations.
|
|
|
15
15
|
Generate the folder structure for your project.
|
|
16
16
|
|
|
17
17
|
- `ipy folder new`: Generate just the folders and files for your project, without any additional installation.
|
|
18
|
-
-
|
|
18
|
+
- `ipy folder template <template>`: Generate the folder structure using a custom template.
|
|
19
19
|
|
|
20
20
|
## Next steps
|
|
21
21
|
|
|
@@ -11,5 +11,5 @@ This will display the help message where you could see the available command and
|
|
|
11
11
|
## Next steps
|
|
12
12
|
|
|
13
13
|
Now that you have confirmed you have installed `instant-python` correctly, you can check out an
|
|
14
|
-
[overview of the available commands](
|
|
14
|
+
[overview of the available commands](features_overview) to see what you can do with the library or jump directly
|
|
15
15
|
to the [guides](../guide/index.md) section to learn how to use the library in more detail.
|
|
@@ -5,7 +5,7 @@ to quickly begin using the library.
|
|
|
5
5
|
|
|
6
6
|
- [Installing `instant-python`](installation.md)
|
|
7
7
|
- [First steps after installation](first-steps.md)
|
|
8
|
-
- [Overview of available commands](
|
|
8
|
+
- [Overview of available commands](features_overview)
|
|
9
9
|
|
|
10
10
|
If you want to go directly to the guides and learn all the possibilities that the library offers, you can
|
|
11
11
|
check the [Guide](../guide/index.md) section.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Installation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
!!! important
|
|
4
|
+
For the moment, `instant-python` is only supported in Unix-like systems. Windows support is coming soon.
|
|
5
|
+
|
|
6
|
+
To ensure a clean and isolated environment, we recommend installing `instant-python` using a virtual environment. At your
|
|
7
|
+
own risk, you can install it at you system Python installation, but this is not recommended.
|
|
4
8
|
Below are the preferred installation methods.
|
|
5
9
|
|
|
6
10
|
## Using `pipx`
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
One of the main commands you can use with `instant-pyton` is the `project` command. This command
|
|
6
6
|
will allow you to create and configure a complete new project from scratch.
|
|
7
7
|
|
|
8
|
-
!!!
|
|
8
|
+
!!! info
|
|
9
9
|
The `project` command it won't only create the folder structure of your project, but it will also
|
|
10
10
|
allow you to generate a bunch of boilerplate, install the Python version you want to use, install
|
|
11
11
|
dependencies and even configure a git repository for your project.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Custom Templates
|
|
1
|
+
# Custom Templates
|
|
2
2
|
|
|
3
3
|
Both commands available with `instant-python` allow the option of providing a custom template to generate
|
|
4
4
|
the project folder structure instead of using the default templates provided by the library.
|
|
@@ -9,12 +9,20 @@ This custom template must follow a specific structure and syntax to be able to g
|
|
|
9
9
|
- The first level of the yaml will always be `root`
|
|
10
10
|
- The rest of the hierarchy will be declared as a list of elements with the following structure:
|
|
11
11
|
- `name`: The name of the folder or file to create.
|
|
12
|
-
- `type`: The type of the element,
|
|
13
|
-
- `python`:
|
|
14
|
-
|
|
12
|
+
- `type`: The type of the element, which can be `directory` or `file`.
|
|
13
|
+
- `python`: **Only for directories**. Set its value to True if the directory is a python module to include the `__init__.py` file, otherwise
|
|
14
|
+
ignore this field.
|
|
15
|
+
- `extension`: **Only for files**. The extension of the file to create. If the file do not have an extension, you can ignore
|
|
16
|
+
this field.
|
|
17
|
+
- `children`: A list of elements that will be created inside the folder. This can be either another directory or files.
|
|
15
18
|
|
|
16
19
|
The available templates can be found in the [features](../getting-started/features.md) section. The library
|
|
17
20
|
offers a Domain Driven Design, Clean Architecture and Standard templates.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
???+ example
|
|
25
|
+
|
|
18
26
|
Let's imagine that you want to create a new project using a custom template with Hexagonal Architecture.
|
|
19
27
|
You can create a yaml file with the following content:
|
|
20
28
|
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
When using the subcommand `new` with either the `project` or `folder` command, you will be able to configure
|
|
4
4
|
different aspects of your project through a set of questions that will guide you through the process.
|
|
5
5
|
|
|
6
|
-
!!!
|
|
7
|
-
Depending on the main command you use, you will be able to configure
|
|
6
|
+
!!! info
|
|
7
|
+
Depending on the main command you use, you will be able to configure different kind of things. Here
|
|
8
8
|
is an overview of all the options that can be configured.
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
## Project slug
|
|
12
11
|
|
|
13
12
|
Configure the name of the main folder of your project. This name will be used in the _pyproject.toml_ file too.
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
!!! warning
|
|
15
|
+
When writing the project slug, you must convey _pyproject.toml_ conventions, so you should not write spaces
|
|
16
|
+
between words.
|
|
17
17
|
|
|
18
18
|
## Source name
|
|
19
19
|
|
|
@@ -21,7 +21,6 @@ Configure the name of the source code of your project.
|
|
|
21
21
|
|
|
22
22
|
The most typical option for this folder is _src_, but you can change it to whatever you want: _source_, _code_, _app_, etc.
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
## Description
|
|
26
25
|
|
|
27
26
|
Include a description about your project that will be included in the _pyproject.toml_ file.
|
|
@@ -42,7 +41,8 @@ This value will be included in the _pyproject.toml_ and _LICENSE_ files.
|
|
|
42
41
|
Choose between _MIT_, _Apache_ or _GPL_ licenses to set your project. By default,
|
|
43
42
|
it will place you on _MIT_ option to be the most popular license.
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
!!! info
|
|
45
|
+
If you want to use a different license, unfortunately, you will have to change it manually in the _LICENSE_ file.
|
|
46
46
|
|
|
47
47
|
## Python version
|
|
48
48
|
|
|
@@ -52,9 +52,13 @@ By default, it will place you on the latest version available.
|
|
|
52
52
|
## Dependency manager
|
|
53
53
|
|
|
54
54
|
Choose between two of the most popular dependencies and project manager for Python:
|
|
55
|
+
|
|
55
56
|
- [_uv_](https://docs.astral.sh/uv)
|
|
56
57
|
- [_pdm_](https://pdm-project.org/en/latest/)
|
|
57
58
|
|
|
59
|
+
These managers will allow you to manage your virtual environment, install dependencies and run tasks in your project. By default, it
|
|
60
|
+
will place you on _uv_ option, as is it the fastest and most lightweight dependency manager available.
|
|
61
|
+
|
|
58
62
|
## Git
|
|
59
63
|
|
|
60
64
|
You will be able to configure your project as a git repository automatically.
|
|
@@ -70,9 +74,12 @@ configured for Python projects.
|
|
|
70
74
|
There are some project templates already configured that you can use to create your project. These templates
|
|
71
75
|
will create the folder structure of your project following a specific pattern.
|
|
72
76
|
|
|
77
|
+
!!! info
|
|
78
|
+
These templates do not reflect your architecture, but the folder structure of your project. There is a key difference between these concepts.
|
|
79
|
+
|
|
73
80
|
### Domain Driven Design
|
|
74
81
|
|
|
75
|
-
Follows DDD pattern and screaming architecture.
|
|
82
|
+
Follows DDD pattern and screaming architecture organization.
|
|
76
83
|
|
|
77
84
|
Separates the source code and test folder in bounded contexts and aggregates.
|
|
78
85
|
Each aggregate will contain the known _domain_, _application_ and _infra_ layers. This template will allow you to create your first bounded context and aggregate.
|
|
@@ -131,26 +138,177 @@ Will create your project with the common pattern of source code and test folder.
|
|
|
131
138
|
## Out of the box implementations
|
|
132
139
|
|
|
133
140
|
When creating a new project, you will be able to include some boilerplate and implementations code
|
|
134
|
-
that will help you to start your project
|
|
141
|
+
that will help you to start your project.
|
|
142
|
+
|
|
143
|
+
!!! info
|
|
144
|
+
These implementations are completely subjective and personal. This does not mean that you must implement
|
|
145
|
+
them in the same way or that they are the best way to implement them. You can use them as a starting point
|
|
146
|
+
and iterate them as you need.
|
|
135
147
|
|
|
136
148
|
### Value objects and exceptions
|
|
137
149
|
|
|
138
150
|
Value objects are a common pattern in DDD to encapsulate primitives and encapsulate domain logic. If
|
|
139
151
|
you choose this option, it will include the following value objects:
|
|
140
152
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
???+ example "Base ValueObject"
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
class ValueObject[T](ABC):
|
|
157
|
+
_value: T
|
|
158
|
+
|
|
159
|
+
def __init__(self, value: T) -> None:
|
|
160
|
+
self._validate(value)
|
|
161
|
+
self._value = value
|
|
162
|
+
|
|
163
|
+
@abstractmethod
|
|
164
|
+
def _validate(self, value: T) -> None: ...
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def value(self) -> T:
|
|
168
|
+
return self._value
|
|
169
|
+
|
|
170
|
+
@override
|
|
171
|
+
def __eq__(self, other: object) -> bool:
|
|
172
|
+
if not isinstance(other, ValueObject):
|
|
173
|
+
return False
|
|
174
|
+
return self.value == other.value
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
???+ example "UUID"
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
|
|
181
|
+
class Uuid(ValueObject[str]):
|
|
182
|
+
def __init__(self, value: str) -> None:
|
|
183
|
+
super().__init__(value)
|
|
184
|
+
|
|
185
|
+
def _validate(self, value: str) -> None:
|
|
186
|
+
if value is None:
|
|
187
|
+
raise RequiredValueError
|
|
188
|
+
UUID(value)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
???+ example "StringValueObject"
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
class StringValueObject(ValueObject[str]):
|
|
195
|
+
def __init__(self, value: str) -> None:
|
|
196
|
+
super().__init__(value)
|
|
197
|
+
|
|
198
|
+
def _validate(self, value: str) -> None:
|
|
199
|
+
if value is None:
|
|
200
|
+
raise RequiredValueError
|
|
201
|
+
if not isinstance(value, str):
|
|
202
|
+
raise IncorrectValueTypeError
|
|
203
|
+
```
|
|
204
|
+
???+ example "IntValueObject"
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
class IntValueObject(ValueObject[int]):
|
|
208
|
+
def __init__(self, value: int) -> None:
|
|
209
|
+
super().__init__(value)
|
|
210
|
+
|
|
211
|
+
def _validate(self, value: int) -> None:
|
|
212
|
+
if value < 0:
|
|
213
|
+
raise InvalidNegativeValueError(value)
|
|
214
|
+
```
|
|
145
215
|
|
|
146
216
|
Along with these value objects, it will include a base exception class that you can use to create your own exceptions and
|
|
147
217
|
some common exceptions that you can use in your project:
|
|
148
218
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
219
|
+
???+ example "Base DomainError"
|
|
220
|
+
|
|
221
|
+
```python
|
|
222
|
+
class DomainError(Exception, ABC):
|
|
223
|
+
@property
|
|
224
|
+
@abstractmethod
|
|
225
|
+
def type(self) -> str: ...
|
|
226
|
+
|
|
227
|
+
@property
|
|
228
|
+
@abstractmethod
|
|
229
|
+
def message(self) -> str: ...
|
|
230
|
+
|
|
231
|
+
def to_dict(self) -> dict:
|
|
232
|
+
return {
|
|
233
|
+
"type": self.type,
|
|
234
|
+
"message": self.message,
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
???+ example "IncorrectValueTypeError"
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
T = TypeVar("T")
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class IncorrectValueTypeError(DomainError):
|
|
245
|
+
def __init__(self, value: T) -> None:
|
|
246
|
+
self._message = f"Value '{value}' is not of type {type(value).__name__}"
|
|
247
|
+
self._type = "incorrect_value_type"
|
|
248
|
+
super().__init__(self._message)
|
|
249
|
+
|
|
250
|
+
@property
|
|
251
|
+
def type(self) -> str:
|
|
252
|
+
return self._type
|
|
253
|
+
|
|
254
|
+
@property
|
|
255
|
+
def message(self) -> str:
|
|
256
|
+
return self._message
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
???+ example "InvalidIdFormatError"
|
|
260
|
+
|
|
261
|
+
```python
|
|
262
|
+
class InvalidIdFormatError(DomainError):
|
|
263
|
+
def __init__(self) -> None:
|
|
264
|
+
self._message = "User id must be a valid UUID"
|
|
265
|
+
self._type = "invalid_id_format"
|
|
266
|
+
super().__init__(self._message)
|
|
267
|
+
|
|
268
|
+
@property
|
|
269
|
+
def type(self) -> str:
|
|
270
|
+
return self._type
|
|
271
|
+
|
|
272
|
+
@property
|
|
273
|
+
def message(self) -> str:
|
|
274
|
+
return self._message
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
???+ example "InvalidNegativeValueError"
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
class InvalidNegativeValueError(DomainError):
|
|
281
|
+
def __init__(self, value: int) -> None:
|
|
282
|
+
self._message = f"Invalid negative value: {value}"
|
|
283
|
+
self._type = "invalid_negative_value"
|
|
284
|
+
super().__init__(self._message)
|
|
285
|
+
|
|
286
|
+
@property
|
|
287
|
+
def type(self) -> str:
|
|
288
|
+
return self._type
|
|
289
|
+
|
|
290
|
+
@property
|
|
291
|
+
def message(self) -> str:
|
|
292
|
+
return self._message
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
???+ example "RequiredValueError"
|
|
296
|
+
|
|
297
|
+
```python
|
|
298
|
+
class RequiredValueError(DomainError):
|
|
299
|
+
def __init__(self) -> None:
|
|
300
|
+
self._message = "Value is required, can't be None"
|
|
301
|
+
self._type = "required_value"
|
|
302
|
+
super().__init__(self._message)
|
|
303
|
+
|
|
304
|
+
@property
|
|
305
|
+
def type(self) -> str:
|
|
306
|
+
return self._type
|
|
307
|
+
|
|
308
|
+
@property
|
|
309
|
+
def message(self) -> str:
|
|
310
|
+
return self._message
|
|
311
|
+
```
|
|
154
312
|
|
|
155
313
|
### GitHub actions and workflows
|
|
156
314
|
|
|
@@ -9,7 +9,7 @@ This command has two subcommands that you can use to create a new project:
|
|
|
9
9
|
|
|
10
10
|
- `ipy folder new`: will generate a question wizard that will guide you through all steps to create the folders of
|
|
11
11
|
your project.
|
|
12
|
-
-
|
|
12
|
+
- `ipy folder template <template>`: will allow you to use a custom template where you specify the folder structure
|
|
13
13
|
you want to have.
|
|
14
14
|
|
|
15
15
|
## New
|
|
@@ -31,25 +31,16 @@ can check in the [features](features.md) section:
|
|
|
31
31
|
- Default templates
|
|
32
32
|
- Out of the box implementations (value objects, exceptions, GitHub actions, makefile, logger, FastAPI, SQL Alchemy, Alembic, event bus)
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
## Template
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
[//]: # (The `template` subcommand will only create the folder structure of the project using a custom template that the user)
|
|
36
|
+
The `template` subcommand will only create the folder structure of the project using a custom template that the user provides.
|
|
38
37
|
|
|
39
|
-
[//]: # (provides.)
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
!!! warning
|
|
40
|
+
With this option the user will only be able to create directories and empty files. No boilerplate will be available when
|
|
41
|
+
using a custom template.
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
[//]: # ( no additional files will be created.)
|
|
47
|
-
|
|
48
|
-
[//]: # ()
|
|
49
|
-
[//]: # ()
|
|
50
|
-
[//]: # (When using this subcommand you would be able to configure the following out of the box implementations that you)
|
|
51
|
-
|
|
52
|
-
[//]: # (can check in the [features](features.md) section:)
|
|
43
|
+
When using this subcommand you would be able to configure the following out of the box implementations that you
|
|
44
|
+
can check in the [features](features.md) section:
|
|
53
45
|
|
|
54
|
-
|
|
55
|
-
[//]: # (- Project slug)
|
|
46
|
+
- Project slug
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Guides Overview
|
|
2
|
+
|
|
3
|
+
Check the available guides to learn all the possibilities that the library offers.
|
|
4
|
+
|
|
5
|
+
- [Choosing the right command for your needs](when-to-use-commands.md)
|
|
6
|
+
- [Creating and configuring a new project](creating-a-project.md)
|
|
7
|
+
- [Creating only the folder structure](folder-structure.md)
|
|
8
|
+
- [All the available features](features.md)
|
|
9
|
+
- [How to create custom templates](custom-templates.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Choosing the Right Command for Your Needs
|
|
2
|
+
|
|
3
|
+
When working with `instant-python` you may ask when should you use the `project` or `folder` commands or even
|
|
4
|
+
when you should use the `new` or `template` subcommands. In this section we will try to clarify the differences
|
|
5
|
+
and needs of each command and subcommand.
|
|
6
|
+
|
|
7
|
+
## Project Command and Subcommands
|
|
8
|
+
|
|
9
|
+
The `project` command is intended not only to generate the folder structure of your project, but also to
|
|
10
|
+
configure a complete environment.
|
|
11
|
+
|
|
12
|
+
If you want to set a git repository, install dependencies easily at the start, have GitHub actions, makefile, or
|
|
13
|
+
some other implementation right away, this is the command you should use.
|
|
14
|
+
|
|
15
|
+
If you want to use some of the [default templates](https://dimanu-py.github.io/instant-python/guide/features/#default-templates) that are
|
|
16
|
+
available in the library or include some default implementations, you would want to use the `new` subcommand. However, if you have a specific
|
|
17
|
+
folder structure you want to use, and it's not available, or you want a custom version of one of the default templates, then you should use
|
|
18
|
+
the `template` subcommand.
|
|
19
|
+
|
|
20
|
+
!!! warning
|
|
21
|
+
Notice that with the `template` subcommand you will have a limitation of not being able to configure all the options that
|
|
22
|
+
the `new` subcommand offers. You can read more about the available options in the [project command section](./creating-a-project.md).
|
|
23
|
+
|
|
24
|
+
## Folder Command and Subcommands
|
|
25
|
+
|
|
26
|
+
The `folder` command is only intended to generate the folder structure of your project. It will not configure any additional aspect
|
|
27
|
+
of the project.
|
|
28
|
+
|
|
29
|
+
If you just want to generate the folders and some empty files fast and be able to begin configuring your project yourself, this is the command
|
|
30
|
+
you should use.
|
|
31
|
+
|
|
32
|
+
If you want to use some of the [default templates](https://dimanu-py.github.io/instant-python/guide/features/#default-templates) that are
|
|
33
|
+
available in the library or include some default implementations, you would want to use the `new` subcommand. However, if you have a specific
|
|
34
|
+
folder structure you want to use, and it's not available, or you want a custom version of one of the default templates, then you should use
|
|
35
|
+
the `template` subcommand.
|
|
36
|
+
|
|
37
|
+
!!! warning
|
|
38
|
+
Notice that with the `template` subcommand you will have a limitation of not being able to configure all the options that
|
|
39
|
+
the `new` subcommand offers. You can read more about the available options in the [project command section](./folder-structure.md).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
 
|
|
2
|
+
|
|
3
|
+
# Welcome to Instant Python!
|
|
4
|
+
|
|
5
|
+
Welcome to the [**Instant Python**](https://github.com/dimanu-py/instant-python-ddd) library, a powerful Python library to quickly
|
|
6
|
+
scaffold a modern Python project with best practices and a clean architecture. This template includes ready-to-use scripts, project
|
|
7
|
+
structure options, and automated setup commands to help you kickstart your Python projects.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Install `instant-python` from PyPI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# With pipx
|
|
15
|
+
pipx install instant-python
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# With pip in pyenv
|
|
20
|
+
pip install instant-python
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Documentation Structure
|
|
24
|
+
|
|
25
|
+
- [Welcome](./welcome.md)
|
|
26
|
+
- [Getting Started](./getting-started/index.md)
|
|
27
|
+
- [Installation](./getting-started/installation.md)
|
|
28
|
+
- [First Steps](./getting-started/first-steps.md)
|
|
29
|
+
- [Features Overview](./getting-started/features_overview.md)
|
|
30
|
+
- [Guide](./guide/index.md)
|
|
31
|
+
- [Choosing between templates](./guide/when-to-use-commands.md)
|
|
32
|
+
- [Creating a new project](./guide/creating-a-project.md)
|
|
33
|
+
- [Creating a folder structure](./guide/folder-structure.md)
|
|
34
|
+
- [Features](./guide/features.md)
|
|
35
|
+
- [Custom Templates](./guide/custom-templates.md)
|
|
36
|
+
- [Contributing](./contributing.md)
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
With `instant-python` there is a lot of features you can customize easily so you can start coding on your project
|
|
41
|
+
as soon as possible. An overview of the features is given below, but you can find a more detailed explanation in the
|
|
42
|
+
[documentation](https://dimanu-py.github.io/instant-python/guide/features/).
|
|
43
|
+
|
|
44
|
+
- Project slug: Configure the name of the main folder of your project.
|
|
45
|
+
- Source name: Configure the name of the source code folder of your project.
|
|
46
|
+
- Description: Include a description about your project.
|
|
47
|
+
- Version: Set the initial version of your project.
|
|
48
|
+
- Author: Set the author of the project.
|
|
49
|
+
- License: Choose between _MIT_, _Apache_ or _GPL_ licenses to set your project.
|
|
50
|
+
- Python version: Select the Python version you want to use for your project between versions 3.13 to 3.10.
|
|
51
|
+
- Dependency manager: Choose between _uv_ or _pdm_ dependency managers.
|
|
52
|
+
- Git: configure your project as a git repository automatically.
|
|
53
|
+
- Default templates: select your project template between Domain Driven Design, Clean Architecture or Standard Project to
|
|
54
|
+
automatically generate your project folders and files.
|
|
55
|
+
- Out of the box implementations: include some boilerplate and implementations code that will help you to start your project faster.
|
|
56
|
+
Some of the most popular implementations are value objects, domain error modelling, makefile and Async SQL Alchemy.
|
|
57
|
+
- Dependencies: install dependencies automatically in your project.
|