IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

ArtifactFile

ArtifactFile​

class max.pipelines.lib.artifact.ArtifactFile(name, content)

source

Bases: object

A file stored inside the .m artifact directory.

When serializing, str content is written as UTF-8 text, bytes are written as-is, and a Path is copied. After deserialization, content is always the path of the file inside the artifact directory.

Parameters:

  • name (str) – Relative POSIX path of the file inside the artifact directory.
  • content (str | bytes | Path) – The file contents, or the path of a file to copy.

content​

content: str | bytes | Path

source

name​

name: str

source

sha256()​

sha256()

source

Returns the hex sha256 digest of the bytes this file writes.

Return type:

str