Embedded Module (EM)¶
Python API reference for the tlm_cli.embedded package.
Use this package to interact with the Embedded Manager programmatically. EMClient gives you typed access to projects,
builds, GitLab connections, and storage buckets, and EMApiClient reads refs and em-configs and starts builds — the same
interfaces that power the tlm-cli em commands.
EMClient¶
tlm_cli.embedded.client.EMClient
¶
Client interface for accessing Embedded Manager API interfaces.
This class exposes a property-based interface for accessing the Embedded Manager API model interfaces. Each property returns an interface responsible for interacting with a specific Embedded Manager model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_api
|
JsonApiProtocol | None
|
Optional resources API provider. When omitted, the models keep their
lazily built |
None
|
Examples:
Source code in tlm_cli/embedded/client.py
EMInterfaceFactory¶
tlm_cli.embedded.client.EMInterfaceFactory
¶
Bases: BaseInterfaceFactory
Factory class for retrieving Embedded Manager API interface instances.
This class provides access to interface classes responsible for interacting with the Embedded Manager API models (projects, builds, GitLab connections and storage buckets).
Attributes:
| Name | Type | Description |
|---|---|---|
_model_map |
dict
|
A mapping of model names to their interface classes. |
Examples:
Source code in tlm_cli/embedded/client.py
EMApiClient¶
tlm_cli.embedded.rest.EMApiClient
¶
Bases: _SelfInitializingClient
Ready-to-use authenticated client for the ToloMEO embedded-manager REST endpoints.
Source code in tlm_cli/embedded/rest.py
config(project_id, ref)
¶
Fetch the project's em-config document at ref.
create_build(project_id, request)
¶
Start a build: the backend triggers the GitLab pipeline and returns the new build.
Source code in tlm_cli/embedded/rest.py
live_build(build_id)
¶
Return the build merged with a live GitLab read while it is not finished.
refs(project_id)
¶
List the branches and tags a build of the project can run on.