Skip to content

Assets

nodekit.assets.Image pydantic-model

Fields:

locator pydantic-field

locator: AssetLocator

A location which is a claimed source of valid bytes for this Asset.

media_type pydantic-field

media_type: ImageMediaType

The IANA media (MIME) type of the image file.

sha256 pydantic-field

sha256: SHA256

The SHA-256 hash of the asset file, as a hex string.

from_path classmethod

from_path(path: Path | str) -> Self

A public convenience method to create an Asset from a file path on the user's local file system. This is I/O bound, as it computes the SHA-256 hash of the file.

nodekit.assets.Video pydantic-model

Fields:

locator pydantic-field

locator: AssetLocator

A location which is a claimed source of valid bytes for this Asset.

media_type pydantic-field

media_type: VideoMediaType

The IANA media (MIME) type of the video file.

sha256 pydantic-field

sha256: SHA256

The SHA-256 hash of the asset file, as a hex string.

from_path classmethod

from_path(path: Path | str) -> Self

A public convenience method to create an Asset from a file path on the user's local file system. This is I/O bound, as it computes the SHA-256 hash of the file.