local
dev_tool.services.execution.local
log = logging.getLogger(__name__)
module-attribute
LocalExecutionStrategy
Bases: ExecutionStrategy
An execution strategy for local development with only the database in Docker.
This is the legacy mode where Django runs locally and only PostgreSQL runs in a container.
The constructor for the LocalExecutionStrategy class.
Parameters:
-
docker_service(DockerServiceProtocol) –The Docker service for container management.
Source code in dev_tool/services/execution/local.py
cleanup
ensure_database
A method that ensures the database container is available.
Parameters:
-
recreate(bool, default:False) –Whether to recreate the database container.
Source code in dev_tool/services/execution/local.py
run_bun_command
A method that executes a Bun command locally.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/local.py
run_django_command
A method that executes a Django management command locally.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/local.py
run_pip_command
A method that executes a uv pip command locally.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/local.py
run_python_command
A method that executes a Python command locally.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/local.py
run_seed
A method that runs the database seeding script locally.
Parameters:
-
seed_script(Path) –The path to the seed script.
Source code in dev_tool/services/execution/local.py
run_server
A method that starts the Django development server locally.
Parameters:
Source code in dev_tool/services/execution/local.py
run_shell_script
A method that executes a Django shell script locally.
Parameters:
-
script(str) –The Python script to execute in Django shell.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.