Local
swerex.deployment.local.LocalDeployment
LocalDeployment(*, logger: Logger | None = None, **kwargs: Any)
Bases: AbstractDeployment
The most boring of the deployment classes.
This class does nothing but wrap around Runtime
so you can switch out
your deployment method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments (see |
{}
|
Source code in swerex/deployment/local.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
runtime
property
runtime: LocalRuntime
Returns the runtime if running.
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
add_hook
add_hook(hook: DeploymentHook)
Source code in swerex/deployment/local.py
36 37 |
|
from_config
classmethod
from_config(config: LocalDeploymentConfig) -> Self
Source code in swerex/deployment/local.py
39 40 41 |
|
is_alive
async
is_alive(*, timeout: float | None = None) -> IsAliveResponse
Checks if the runtime is alive. The return value can be tested with bool().
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
Source code in swerex/deployment/local.py
43 44 45 46 47 48 49 50 51 52 |
|
start
async
start()
Starts the runtime.
Source code in swerex/deployment/local.py
54 55 56 |
|
stop
async
stop()
Stops the runtime.
Source code in swerex/deployment/local.py
58 59 60 61 62 |
|