Python client API

The Debusine class

class debusine.client.debusine.Debusine(base_api_url: str, api_token: str | None = None, scope: str | None = None, *, logger: Logger)[source]

Bases: object

Class to interact with debusine server.

API_VERSION = '1.0'
__init__(base_api_url: str, api_token: str | None = None, scope: str | None = None, *, logger: Logger)[source]

Initialize client.

Parameters:
  • base_api_url – URL for API endpoint (e.g. http://localhost/api)

  • api_token – optional token to be used for the calls.

artifact_create(artifact: LocalArtifact[Any], *, workspace: str | None, work_request: int | None = None, expire_at: datetime | None = None) ArtifactResponse[source]

Create artifact in the debusine server.

artifact_get(artifact_id: int, workspace: str | None = None) ArtifactResponse[source]

Get artifact information.

Use download_artifact() to download the artifact.

asset_create(category: AssetCategory, data: BaseAssetDataModel, *, workspace: str, work_request: int | None = None) AssetResponse[source]

Create asset in the debusine server.

asset_list(*, asset_id: int | None = None, work_request: int | None = None, workspace: str | None = None) AssetsResponse[source]

Create asset in the debusine server.

asset_permission_check(*, asset_category: str, asset_slug: str, permission_name: str, artifact_id: int, work_request_id: int, workspace: str) AssetPermissionCheckResponse[source]

Check work_request’s permission to use an asset on an artifact.

collection_create(workspace: str, data: CollectionDataNew) CollectionData[source]

Create a new collection.

collection_delete(workspace: str, data: CollectionData) None[source]

Delete a collection.

collection_get(workspace: str, category: str, name: str, with_stats: bool = False) CollectionData[source]

Fetch information about a collection.

collection_iter(workspace: str) Iterable[CollectionData][source]

List collections on a workspace.

collection_update(workspace: str, data: CollectionData) CollectionData[source]

Set information for a collection.

download_artifact(artifact_id: int, destination: Path, *, tarball: bool = False, workspace: str | None = None) ArtifactResponse[source]

Download artifact_id into destination directory.

Parameters:
  • artifact_id – artifact id to download

  • destination – destination directory to download/uncompress

  • tarball – True to only download the tarball (artifact-id.tar.gz), False to uncompress it

download_artifact_file(artifact_id: int | ArtifactResponse, path_in_artifact: str, destination: Path, workspace: str | None = None) ArtifactResponse[source]

Download a single file from artifact into destination directory.

Parameters:
  • artifact_id – artifact id to download, or an ArtifactResponse representing the artifact

  • path_in_artifact – download the file from the artifact with this name

  • destination – destination file to download to

emit_metric(*, metric_type: Literal['counter', 'gauge', 'summary', 'histogram'], name: str, labels: dict[str, str], value: float) None[source]

Ask the server to emit a metric on behalf of this client.

fetch_task_configuration_collection(*, workspace: str, name: str) RemoteTaskConfigurationRepository[source]

Fetch a task configuration collection.

get_workspace_inheritance(workspace: str) WorkspaceInheritanceChain[source]

Get a workspace inheritance chain.

lookup_multiple(lookup: LookupMultiple, work_request: int, expect_type: Literal[LookupChildType.ARTIFACT], default_category: CollectionCategory | None = None) LookupMultipleResponse[LookupSingleResponseArtifact][source]
lookup_multiple(lookup: LookupMultiple, work_request: int, expect_type: Literal[LookupChildType.COLLECTION], default_category: CollectionCategory | None = None) LookupMultipleResponse[LookupSingleResponseCollection]
lookup_multiple(lookup: LookupMultiple, work_request: int, expect_type: LookupChildType, default_category: CollectionCategory | None = None) LookupMultipleResponse[LookupSingleResponse]

Look up multiple collection items.

lookup_single(lookup: LookupSingle, work_request: int, expect_type: Literal[LookupChildType.ARTIFACT], default_category: CollectionCategory | None = None) LookupSingleResponseArtifact[source]
lookup_single(lookup: LookupSingle, work_request: int, expect_type: Literal[LookupChildType.COLLECTION], default_category: CollectionCategory | None = None) LookupSingleResponseCollection
lookup_single(lookup: LookupSingle, work_request: int, expect_type: LookupChildType, default_category: CollectionCategory | None = None) LookupSingleResponse

Look up a single collection item.

on_work_request_completed(*, workspaces: list[str] | None = None, last_completed_at: Path | None = None, command: list[str], working_directory: Path) None[source]

Execute command when a work request is completed.

async process_async_message(msg: WSMessage, msg_text_to_callable: dict[str, _MessageProcessor]) bool[source]

Process “msg”: logs possible error, raise errors.

If msg.type is aiohttp.WSMsgType.TEXT: decode msg.data (contains JSON), call callable msg_text_to_callable[msg.data[“text”]](msg_content: dict).

Return True a callable from msg_to_callable is called or False if not (invalid messages, etc.).

Raises:

TokenDisabledError – if reason_code is TOKEN_DISABLED.

push_task_configuration_collection(*, repo: LocalTaskConfigurationRepository, dry_run: bool) TaskConfigurationCollectionUpdateResults[source]

Replace the contents of a task configuration collection on server.

relation_create(artifact_id: int, target_id: int, relation_type: RelationType) RelationResponse[source]

Create a new relation between artifacts.

Parameters:
  • artifact_id – relation from

  • target_id – relation to

  • relation_type – type of relation such as extends, relates-to, built-using

Returns:

True if the relation already existed/has been created, False if it could not be created

relation_list(*, artifact_id: int | None = None, target_id: int | None = None) RelationsResponse[source]

List relations associated with an artifact.

Exactly one of artifact_id or target_id must be set.

Parameters:
  • artifact_id – search for relations from this artifact

  • target_id – search for relations to this artifact

Returns:

a list of relations

Raises:

ValueError – if exactly one of artifact_id or target_id is not set

set_workspace_inheritance(workspace: str, *, chain: WorkspaceInheritanceChain) WorkspaceInheritanceChain[source]

Set a workspace inheritance chain.

upload_artifact(local_artifact: LocalArtifact[Any], *, workspace: str | None, work_request: int | None = None, expire_at: datetime | None = None) RemoteArtifact[source]

Upload (create and upload files) the local_artifact to the server.

upload_files(artifact_id: int, upload_files: dict[str, Path], base_directory: Path | None = None) None[source]

Upload into artifact the files.

Parameters:
  • artifact_id – artifact_id to upload files to.

  • upload_files – list of files to upload.

  • base_directory – base directory for relative path’s files to upload.

webui_url(path: str) str[source]

Generate a URL to the web UI given a full path.

work_request_abort(work_request_id: int) WorkRequestResponse[source]

Abort a work request.

static work_request_completed_path(work_request_id: int) str[source]

Return path to update the completed result for work_request_id.

work_request_completed_update(work_request_id: int, result: WorkRequestResults, output_data: OutputData) None[source]

Update work_request_id as completed with result.

work_request_create(work_request: WorkRequestRequest) WorkRequestResponse[source]

Create a work request (via POST /work-request/).

Returns:

WorkRequest returned by the server.

Raises:

see _api_request method documentation.

work_request_external_debsign_complete(work_request_id: int, external_debsign_request: WorkRequestExternalDebsignRequest) WorkRequestResponse[source]

Provide external debsign data to a work request.

work_request_external_debsign_get(work_request_id: int) WorkRequestResponse[source]

Get data about work request waiting for an external debsign.

work_request_get(work_request_id: int) WorkRequestResponse[source]

Get WorkRequest for work_request_id.

Parameters:

work_request_id – id to fetch the status of.

Raises:

many – see _api_request method documentation.

work_request_iter() Iterable[WorkRequestResponse][source]

List all WorkRequests.

Raises:

many – see _api_request method documentation.

work_request_retry(work_request_id: int) WorkRequestResponse[source]

Retry a work request.

work_request_update(work_request_id: int, *, priority_adjustment: int) WorkRequestResponse[source]

Update properties of work_request_id.

workflow_create(create_workflow: CreateWorkflowRequest) WorkRequestResponse[source]

Create a workflow (via POST /workflow/).

Returns:

Workflow WorkRequest returned by the server.

Raises:

see _api_request method documentation.

workflow_template_create(workspace: str, workflow_template: WorkflowTemplateDataNew) WorkflowTemplateData[source]

Create a workflow template (via POST /workflow-template/{workspace}/).

Returns:

WorkflowTemplate returned by the server.

Raises:

see _api_request method documentation.

workflow_template_get(workspace: str, workflow_template: int | str) WorkflowTemplateData[source]

Fetch information about a workflow template.

workflow_template_iter(workspace: str) Iterable[WorkflowTemplateData][source]

List workflow templates on a workspace.

workflow_template_update(workspace: str, data: WorkflowTemplateData) WorkflowTemplateData[source]

Set information for a workflow template.

static write_last_completed_at(completed_at_file: Path | None, completed_at: datetime | None) None[source]

Write to completed_at_file the completed_at datetime.

Associated data models

The parameters of the HTTP requests and the responses of the server are represented by Pydantic models that are described below.

Models used by debusine client.

class debusine.client.models.ArtifactCreateRequest(*, category: str, workspace: str | None = None, files: FilesRequestType = {}, data: dict[str, Any] = {}, work_request: int | None = None, expire_at: datetime | None = None)[source]

Bases: StrictBaseModel

Declare an ArtifactCreateRequest: client sends it to the server.

category: str
data: dict[str, Any]
expire_at: datetime | None
files: FilesRequestType
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

work_request: int | None
workspace: str | None
class debusine.client.models.ArtifactResponse(*, links: dict[str, str | Link] = {}, id: int, url: str, scope: str, workspace: str, category: str, created_at: datetime, data: dict[str, Any], download_tar_gz_url: AnyUrl, files_to_upload: list[str], expire_at: datetime | None = None, files: FilesResponseType = {})[source]

Bases: ServerObject

Declare an ArtifactResponse: server sends it to the client.

category: str
created_at: datetime
data: dict[str, Any]
download_tar_gz_url: AnyUrl
expire_at: datetime | None
files: FilesResponseType
files_to_upload: list[str]
id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

scope: str
url: str
workspace: str
class debusine.client.models.AssetCreateRequest(*, category: AssetCategory, data: dict[str, Any], work_request: int | None = None, workspace: str)[source]

Bases: StrictBaseModel

Request for the Asset creation API.

category: AssetCategory
data: dict[str, Any]
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

work_request: int | None
workspace: str
class debusine.client.models.AssetPermissionCheckResponse(*, links: dict[str, str | Link] = {}, has_permission: bool, username: str | None, user_id: int | None, resource: dict[str, Any] | None)[source]

Bases: ServerObject

A response from the asset permission check endpoint.

has_permission: bool
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

resource: dict[str, Any] | None
user_id: int | None
username: str | None
class debusine.client.models.AssetResponse(*, links: dict[str, str | Link] = {}, id: int, category: AssetCategory, data: dict[str, Any], work_request: int | None = None, workspace: str)[source]

Bases: ServerObject

Response from an Asset creation / listing API.

category: AssetCategory
data: dict[str, Any]
id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

validate_data() Self[source]

Validate data using the correct data model.

work_request: int | None
workspace: str
class debusine.client.models.AssetsResponse(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel[Sequence[AssetResponse]], StrictBaseModel

A response from the server with multiple AssetResponse objects.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.CollectionData(*, links: dict[str, str | Link] = {}, id: int, name: str, category: str, full_history_retention_period: int | None = None, metadata_only_retention_period: int | None = None, data: dict[str, Any], stats: list[dict[str, Any]] | None = None)[source]

Bases: ServerObject

Data for a Collection.

category: str
data: dict[str, Any]
full_history_retention_period: int | None
id: int
metadata_only_retention_period: int | None
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
stats: list[dict[str, Any]] | None
class debusine.client.models.CollectionDataNew(*, name: str, category: str, full_history_retention_period: int | None = None, metadata_only_retention_period: int | None = None, data: dict[str, Any])[source]

Bases: StrictBaseModel

Data for a Collection to be created.

category: str
data: dict[str, Any]
full_history_retention_period: int | None
metadata_only_retention_period: int | None
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
class debusine.client.models.CreateWorkflowRequest(*, template_name: str, workspace: str | None = None, task_data: dict[str, Any])[source]

Bases: StrictBaseModel

Client sends a workflow creation request to the server.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

task_data: dict[str, Any]
template_name: str
workspace: str | None
class debusine.client.models.EmitMetricRequest(*, metric_type: Literal['counter', 'gauge', 'summary', 'histogram'], name: str, labels: dict[str, str], value: float)[source]

Bases: StrictBaseModel

A request for the server to emit a metric on behalf of the client.

labels: dict[str, str]
metric_type: Literal['counter', 'gauge', 'summary', 'histogram']
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
value: float
class debusine.client.models.EnrollConfirmPayload(*, outcome: EnrollOutcome, token: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^[A-Za-z0-9]{8,64}$'))])] | None = None)[source]

Bases: BaseModel

Enrollment response from the server.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

outcome: EnrollOutcome
token: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^[A-Za-z0-9]{8,64}$'))])] | None
class debusine.client.models.EnrollOutcome(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

User action in response to an enroll confirmation request.

CANCEL = 'cancel'
CONFIRM = 'confirm'
class debusine.client.models.EnrollPayload(*, nonce: Annotated[str, _PydanticGeneralMetadata(pattern=re.compile('^[A-Za-z0-9_-]{8,64}$'))], challenge: Annotated[str, _PydanticGeneralMetadata(pattern=re.compile('^\\w{4,10}(?: \\w{4,10}){2,7}$', re.ASCII))], scope: str, hostname: str)[source]

Bases: BaseModel

Client-provided enrollment payload.

challenge: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^\\w{4,10}(?: \\w{4,10}){2,7}$', re.ASCII))])]

Human-readable challenge to verify the client in the web UI

hostname: str

Hostname. Informational, shown in the confirmation page and in the generated token comment

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nonce: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^[A-Za-z0-9_-]{8,64}$'))])]

Nonce identifying the client enrollment

scope: str

Scope. Informational, the confirmation page will warn if invalid

class debusine.client.models.FileRequest(*, size: Annotated[int, Ge(ge=0)], checksums: dict[str, Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=255)])]], type: Literal['file'], content_type: str | None = None)[source]

Bases: StrictBaseModel

Declare a FileRequest: client sends it to the server.

checksums: dict[str, Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=255)])]]
content_type: str | None

A media type, suitable for an HTTP Content-Type header.

static create_from(path: Path, *, content_type: str | None = None) FileRequest[source]

Return a FileRequest for the file path.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

size: Annotated[int, Ge(ge=0)]
type: Literal['file']
class debusine.client.models.FileResponse(*, links: dict[str, str | Link] = {}, size: Annotated[int, Ge(ge=0)], checksums: dict[str, Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=255)])]], type: Literal['file'], url: AnyUrl, content_type: str | None = None)[source]

Bases: ServerObject

Declare a FileResponse: server sends it to the client.

checksums: dict[str, Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MaxLen(max_length=255)])]]
content_type: str | None
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

size: Annotated[int, Ge(ge=0)]
type: Literal['file']
url: AnyUrl

Bases: StrictBaseModel

Structured version of a resource link.

This is modeled as a subset of https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link

can_be_str() bool[source]

Check if the only field set is href.

href: str

Resource URL

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: str | None
class debusine.client.models.LookupChildType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Possible values for LookupDict.child_type and expect_type.

ANY = 'any'
ARTIFACT = 'artifact'
ARTIFACT_OR_PROMISE = 'artifact-or-promise'
BARE = 'bare'
COLLECTION = 'collection'
class debusine.client.models.LookupMultipleRequest(*, lookup: list[int | str | dict[str, Any]], work_request: int, expect_type: LookupChildType, default_category: str | None = None)[source]

Bases: StrictBaseModel

A request from the client to look up multiple collection items.

default_category: str | None
expect_type: LookupChildType
lookup: list[int | str | dict[str, Any]]
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

work_request: int
class debusine.client.models.LookupMultipleResponse(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel[Sequence[TypeVar]], StrictBaseModel

A response from the server with multiple lookup results.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.LookupResultType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

A collection item type returned by a lookup.

ARTIFACT = 'a'
BARE = 'b'
COLLECTION = 'c'
class debusine.client.models.LookupSingleRequest(*, lookup: int | str, work_request: int, expect_type: LookupChildType, default_category: str | None = None)[source]

Bases: StrictBaseModel

A request from the client to look up a single collection item.

default_category: str | None
expect_type: LookupChildType
lookup: int | str
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

work_request: int
class debusine.client.models.LookupSingleResponse(*, links: dict[str, str | Link] = {}, result_type: LookupResultType, collection_item: int | None = None, artifact: int | None = None, collection: int | None = None)[source]

Bases: ServerObject

A response from the server with a single lookup result.

artifact: int | None
collection: int | None
collection_item: int | None
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

result_type: LookupResultType
class debusine.client.models.LookupSingleResponseArtifact(*, links: dict[str, str | Link] = {}, result_type: Literal[LookupResultType.ARTIFACT], collection_item: int | None = None, artifact: int, collection: int | None = None)[source]

Bases: LookupSingleResponse

A response from the server with a single lookup result for an artifact.

Used to assist type annotations.

artifact: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

result_type: Literal[LookupResultType.ARTIFACT]
class debusine.client.models.LookupSingleResponseCollection(*, links: dict[str, str | Link] = {}, result_type: Literal[LookupResultType.COLLECTION], collection_item: int | None = None, artifact: int | None = None, collection: int)[source]

Bases: LookupSingleResponse

A response from the server with a single lookup result for a collection.

Used to assist type annotations.

collection: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

result_type: Literal[LookupResultType.COLLECTION]
class debusine.client.models.OnWorkRequestCompleted(*, links: dict[str, str | Link] = {}, work_request_id: int, completed_at: datetime, result: str)[source]

Bases: ServerObject

Server return an OnWorkRequestCompleted to the client.

Returned via websocket consumer endpoint.

completed_at: datetime
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

result: str
work_request_id: int
class debusine.client.models.PaginatedResponse(*, count: int | None = None, next: AnyUrl | None = None, previous: AnyUrl | None = None, results: list[dict[str, Any]])[source]

Bases: StrictBaseModel

Paginated response from the API.

count: int | None
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

next: AnyUrl | None
previous: AnyUrl | None
results: list[dict[str, Any]]
class debusine.client.models.RelationCreateRequest(*, artifact: int, target: int, type: RelationType)[source]

Bases: StrictBaseModel

Declare a RelationCreateRequest: client sends it to the server.

artifact: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

target: int
type: RelationType
class debusine.client.models.RelationResponse(*, links: dict[str, str | Link] = {}, id: int, artifact: int, target: int, type: RelationType)[source]

Bases: ServerObject

Declare a RelationResponse.

artifact: int
id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

target: int
type: RelationType
class debusine.client.models.RelationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Possible values for RelationCreateRequest.type.

BUILT_USING = 'built-using'
EXTENDS = 'extends'
RELATES_TO = 'relates-to'
class debusine.client.models.RelationsResponse(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel[Sequence[RelationResponse]], StrictBaseModel

A response from the server with multiple RelationResponse objects.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.RemoteArtifact(*, links: dict[str, str | Link] = {}, id: int, url: str, workspace: str)[source]

Bases: ServerObject

Declare RemoteArtifact.

id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

url: str
workspace: str
class debusine.client.models.RuntimeParameter(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

WorkflowTemplate runtime_parameter special values.

ANY = 'any'
class debusine.client.models.ServerObject(*, links: dict[str, str | Link] = {})[source]

Bases: StrictBaseModel

Model representing an object on the server.

Return the href URL for a link.

URLs to related resources

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.StrictBaseModel[source]

Bases: BaseModel

Stricter pydantic configuration.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.TaskConfigurationCollection(*, links: dict[str, str | Link] = {}, id: int, name: str, data: dict[str, Any])[source]

Bases: ServerObject

Response fragment identifying a TaskConfiguration collection.

data: dict[str, Any]
id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
class debusine.client.models.TaskConfigurationCollectionContents(*, links: dict[str, str | Link] = {}, collection: TaskConfigurationCollection, items: list[DebusineTaskConfiguration])[source]

Bases: ServerObject

Bundle together a TaskConfiguration collection and its items.

collection: TaskConfigurationCollection
items: list[DebusineTaskConfiguration]
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.TaskConfigurationCollectionUpdateResults(*, links: dict[str, str | Link] = {}, added: int, updated: int, removed: int, unchanged: int)[source]

Bases: ServerObject

Results of a task configuration collection update.

added: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

removed: int
unchanged: int
updated: int
class debusine.client.models.WorkRequestExternalDebsignRequest(*, signed_artifact: int)[source]

Bases: StrictBaseModel

Client sends data from an external debsign run to the server.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

signed_artifact: int
class debusine.client.models.WorkRequestRequest(*, task_name: str, workspace: str | None = None, task_data: dict[str, Any], event_reactions: dict[str, Any])[source]

Bases: StrictBaseModel

Client send a WorkRequest to the server.

event_reactions: dict[str, Any]
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

task_data: dict[str, Any]
task_name: str
workspace: str | None
class debusine.client.models.WorkRequestResponse(*, links: dict[str, str | Link] = {}, id: int, url: str, created_at: datetime, started_at: datetime | None = None, completed_at: datetime | None = None, duration: float | None = None, status: str, result: str, worker: int | None = None, task_type: str, task_name: str, task_data: dict[str, Any], dynamic_task_data: dict[str, Any] | None = None, priority_base: int, priority_adjustment: int, artifacts: list[int], scope: str | None = None, workspace: str)[source]

Bases: ServerObject

Server return a WorkRequest to the client.

artifacts: list[int]
completed_at: datetime | None
created_at: datetime
duration: float | None
dynamic_task_data: dict[str, Any] | None
id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

priority_adjustment: int
priority_base: int
result: str
scope: str | None
started_at: datetime | None
status: str
task_data: dict[str, Any]
task_name: str
task_type: str
url: str
worker: int | None
workspace: str
class debusine.client.models.WorkflowTemplateData(*, links: dict[str, str | Link] = {}, id: int, name: str, task_name: str, static_parameters: dict[str, Any], runtime_parameters: dict[str, list[str] | Literal[RuntimeParameter.ANY]] | Literal[RuntimeParameter.ANY], priority: int = 0)[source]

Bases: ServerObject

Data for a WorkflowTemplate.

id: int
model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
priority: int
runtime_parameters: dict[str, list[str] | Literal[RuntimeParameter.ANY]] | Literal[RuntimeParameter.ANY]
static_parameters: dict[str, Any]
task_name: str
class debusine.client.models.WorkflowTemplateDataNew(*, name: str, task_name: str, static_parameters: dict[str, Any], runtime_parameters: dict[str, list[str] | Literal[RuntimeParameter.ANY]] | Literal[RuntimeParameter.ANY] = {}, priority: int = 0)[source]

Bases: StrictBaseModel

Data for a WorkflowTemplate to be created.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
priority: int
runtime_parameters: dict[str, list[str] | Literal[RuntimeParameter.ANY]] | Literal[RuntimeParameter.ANY]
static_parameters: dict[str, Any]
task_name: str
class debusine.client.models.WorkspaceInheritanceChain(*, links: dict[str, str | Link] = {}, chain: list[WorkspaceInheritanceChainElement] = [])[source]

Bases: ServerObject

Ordered list of workspaces inherited by a workspace.

chain: list[WorkspaceInheritanceChainElement]
classmethod from_strings(values: Collection[str]) Self[source]

Build an inheritance chain from a list of user-provided strings.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class debusine.client.models.WorkspaceInheritanceChainElement(*, id: int | None = None, scope: str | None = None, workspace: str | None = None)[source]

Bases: StrictBaseModel

An element in an inheritance chain.

classmethod from_string(value: str) Self[source]

Resolve a command line argument to a WorkspaceInheritanceChain.

id: int | None
matches(element: WorkspaceInheritanceChainElement) bool[source]

Check if the components of element that are set match this one.

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

not_empty() Self[source]

Ensure at least one of id or workspace is set.

scope: str | None
workspace: str | None

Representation of artifacts

Artifacts to be uploaded are first created as a debusine.artifacts.local_artifact.LocalArtifact object. There are many descendants of that class available in debusine.artifacts, one for each category of artifact.

class debusine.artifacts.local_artifact.LocalArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: AD)[source]

Bases: BaseModel, ABC, Generic

Represent an artifact locally.

static artifact_categories() list[str][source]

Return list of artifact categories.

category: ArtifactCategory

Artifact type

static class_from_category(category: str) type[LocalArtifact[Any]][source]

Return class sub_local_artifact.

content_types: dict[str, str]
classmethod create_data(data_dict: dict[str, Any]) AD[source]

Instantiate a data model from a dict.

data: AD

Artifact data

files: dict[str, Path]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

remote_files: dict[str, FileRequest]

Debusine client.

class debusine.artifacts.AutopkgtestArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianAutopkgtest)[source]

Bases: LocalArtifact[DebianAutopkgtest]

Autopkgtest: encapsulate result of the Autopkgtest run.

classmethod create(artifact_directory: Path, data: DebianAutopkgtest) Self[source]

Return AutopkgtestArtifact with the files and data set.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.BinaryPackage(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianBinaryPackage)[source]

Bases: LocalArtifact[DebianBinaryPackage]

BinaryPackage: encapsulates a single *.deb / *.udeb.

classmethod create(*, file: Path) Self[source]

Return a BinaryPackage setting file and data.

classmethod files_exactly_one(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError if len(files) != 1.

classmethod files_must_end_in_deb_or_udeb(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError if a file does not end in .deb or .udeb.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.BinaryPackages(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianBinaryPackages)[source]

Bases: LocalArtifact[DebianBinaryPackages]

BinaryPackages: encapsulates a group of *.deb / *.udeb.

classmethod create(*, srcpkg_name: str, srcpkg_version: str, version: str, architecture: str, files: list[Path]) Self[source]

Return a BinaryPackages setting files and data.

classmethod files_more_than_zero(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError if len(files) == 0.

classmethod files_must_end_in_deb_or_udeb(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError if a file does not end in .deb or .udeb.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.BlhcArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianBlhc)[source]

Bases: LocalArtifact[DebianBlhc]

BlhcArtifact: encapsulate result of the blhc run.

classmethod create(blhc_output: Path, build_log: DebianPackageBuildLog | None) Self[source]

Return a BlhcArtifact with the files set.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.DebDiffArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebDiff)[source]

Bases: LocalArtifact[DebDiff]

DebDiffArtifact: encapsulate result of the debdiff run.

classmethod create(debdiff_output: Path, original: str, new: str) Self[source]

Return a DebDiffArtifact with the files set.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.DebianSystemTarballArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianSystemTarball)[source]

Bases: LocalArtifact[DebianSystemTarball]

Contain system.tar.xz file with a Debian.

Can be used by a chroot, container, etc.

classmethod create(tarball: Path, data: dict[str, Any]) Self[source]

Return a DebianSystemTarballArtifact with the tarball file.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.LintianArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianLintian)[source]

Bases: LocalArtifact[DebianLintian]

LintianArtifact: encapsulate result of the Lintian run.

classmethod create(analysis: Path, lintian_output: Path, architecture: str, summary: DebianLintianSummary) Self[source]

Return a LintianArtifact with the files set.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.LocalArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: AD)[source]

Bases: BaseModel, ABC, Generic

Represent an artifact locally.

static artifact_categories() list[str][source]

Return list of artifact categories.

category: ArtifactCategory

Artifact type

static class_from_category(category: str) type[LocalArtifact[Any]][source]

Return class sub_local_artifact.

content_types: dict[str, str]
classmethod create_data(data_dict: dict[str, Any]) AD[source]

Instantiate a data model from a dict.

data: AD

Artifact data

files: dict[str, Path]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

remote_files: dict[str, FileRequest]
class debusine.artifacts.PackageBuildLog(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianPackageBuildLog)[source]

Bases: LocalArtifact[DebianPackageBuildLog]

PackageBuildLog: represents a build log file.

classmethod create(*, file: Path, source: str, version: str, architecture: str | None = None, bd_uninstallable: DoseDistCheck | None = None) Self[source]

Return a PackageBuildLog.

classmethod file_must_end_in_build(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError if the file does not end in .build.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

classmethod validate_files_length_is_one(files: dict[str, Path]) dict[str, Path][source]

Validate that artifact has only one file.

class debusine.artifacts.PiupartsArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianPiuparts)[source]

Bases: LocalArtifact[DebianPiuparts]

Piuparts: encapsulate result of a piuparts run.

classmethod create(*, piuparts_output: Path, data: DebianPiuparts) Self[source]

Return a PiupartsArtifact with the files and data set.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.RepositoryIndex(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianRepositoryIndex)[source]

Bases: LocalArtifact[DebianRepositoryIndex]

An index file in a repository.

classmethod create(*, file: Path, path: str, content_type: str | None = None) Self[source]

Return a RepositoryIndex.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.SigningInputArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebusineSigningInput)[source]

Bases: LocalArtifact[DebusineSigningInput]

Input to a Sign task.

classmethod create(files: Iterable[Path], base_dir: Path, trusted_certs: list[str] | None = None, binary_package_name: str | None = None) Self[source]

Return a new SigningInputArtifact.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

classmethod validate_at_least_one_file(files: dict[str, Path]) dict[str, Path][source]

Validate that artifact has at least one file.

class debusine.artifacts.SigningOutputArtifact(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebusineSigningOutput)[source]

Bases: LocalArtifact[DebusineSigningOutput]

Output of a Sign task.

classmethod create(purpose: KeyPurpose, fingerprint: str, results: Iterable[SigningResult], files: Iterable[Path], base_dir: Path, binary_package_name: str | None = None) Self[source]

Return a new SigningOutputArtifact.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.SourcePackage(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianSourcePackage)[source]

Bases: LocalArtifact[DebianSourcePackage]

SourcePackage: contains source code to be built into BinaryPackages.

classmethod create(*, name: str, version: str, files: list[Path]) Self[source]

Return a SourcePackage setting files and data.

classmethod files_contain_one_dsc(files: dict[str, Path]) dict[str, Path][source]

Raise ValueError when files does not have exactly 1 .dsc file.

classmethod files_contains_files_in_dsc(files: dict[str, Path]) dict[str, Path][source]

Validate that set(files) == set(files_in_dsc_file).

Exception: The .dsc file must be in files but not in the .dsc file.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.Upload(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.DebianUpload)[source]

Bases: LocalArtifact[DebianUpload]

Upload: encapsulate a .changes and files listed in it.

classmethod create(*, changes_file: Path, allow_remote: bool = False) Self[source]

Return a Upload. Add the changes_files and files listed in it.

Parameters:
  • changes_file – a .changes file. Parsed by deb822.Changes.

  • allow_remote – if True, allow files referenced by the .changes file to be missing locally; uploading this artifact will require them to already exist on the server.

files_contain_changes() Self[source]

Raise ValueError when files does not have exactly 1 .changes file.

files_contains_files_in_changes() Self[source]

Validate that set(files) == set(files_in_changes_file).

Exception: The .changes file must be in files but not in the .changes file.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class debusine.artifacts.WorkRequestDebugLogs(*, category: ~debusine.artifacts.models.ArtifactCategory, files: dict[str, ~pathlib._local.Path] = <factory>, remote_files: dict[str, ~debusine.client.models.FileRequest] = <factory>, content_types: dict[str, str] = <factory>, data: ~debusine.artifacts.models.EmptyArtifactData = <factory>)[source]

Bases: LocalArtifact[EmptyArtifactData]

WorkRequestDebugLogs: help debugging issues executing the task.

Log files for debusine users in order to debug possible problems in their WorkRequests.

classmethod create(*, files: Iterable[Path]) Self[source]

Return a WorkRequestDebugLogs.

data: EmptyArtifactData

Artifact data

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.