cmem_client.models.resource¤
A file resource model
A resource is a file inside a DataIntegration project, such as the CSV a dataset reads
from. The files of all projects are the items of client.files, keyed by
{project_id}:{file_id}.
Classes:
- Resource – A file resource.
- ResourceMetadata – Resource metadata
- ResourceResponse – API response model for a file resource
- ResourceUsage – Resource usage
Resource¤
Bases: Model, ReadRepositoryItem
A file resource.
Attributes:
- file_id (
str) – ID of the file, unique within its project. - project_id (
str) – ID of the project holding the file. - name (
str | None) – Name of the file, orNoneif the deployment did not report it. - full_path (
str | None) – Path of the file inside the project. - modified (
str | None) – When the file was last modified. - size (
int | None) – Size of the file in bytes.
Functions:
- get_id – Get the resource ID in format ‘project_id:file_id’
file_id¤
full_path¤
get_id¤
Get the resource ID in format ‘project_id:file_id’
model_config¤
modified¤
name¤
project_id¤
size¤
ResourceMetadata¤
Bases: Model
Resource metadata
Attributes:
- name (
str) – Name of the file. - relative_path (
str) – Path of the file relative to the project. - absolute_path (
str) – Path of the file on the deployment. - size (
int) – Size of the file in bytes. - modified (
str) – When the file was last modified.
absolute_path¤
model_config¤
modified¤
name¤
relative_path¤
size¤
ResourceResponse¤
Bases: Model
API response model for a file resource
Attributes:
- name (
str) – Name of the file. - full_path (
str) – Path of the file inside the project. - modified (
str) – When the file was last modified. - size (
int) – Size of the file in bytes.
full_path¤
model_config¤
modified¤
name¤
size¤
ResourceUsage¤
Bases: Model
Resource usage
Attributes:
- id (
str) – ID of the task using the file. - label (
str) – Human readable name of that task. - task_type (
str) – Kind of task using the file, e.g.Dataset.