Remote Assets

Remote media assets for examples and tutorials. Thin catalog that exposes image/video samples from DeGirum's PySDK Examples as simple attributes and lists.

This API Reference is based on DeGirum Tools version 0.23.1.

Overview

degirum_tools.remote_assets is a tiny convenience module that discovers JPG images and MP4 videos published in the PySDK Examples repository and exposes them in two ways:

  • As dynamic attributes on the module: remote_assets.<filename_without_extension> returns a RemoteMedia object (a str subclass with helpers) that behaves like a URL string.

  • As enumerations: list_images() and list_videos() return dictionaries mapping attribute names to RemoteMedia objects; use their keys to list available images/videos.

Each RemoteMedia instance is a URL-like string; remote_assets does not download or cache assets by itself. Any caching is handled by your application, HTTP stack, or PySDK internals.

When to Use

  • Quickstarts, demos, tests, and tutorials that need a stable sample image or video.

  • Prototyping code where you want to avoid bundling media assets in your repo.

Basic Usage

List available image and video asset names.

from degirum_tools import remote_assets

print("Images (names):")
print(sorted(list(remote_assets.list_images().keys())))

print("Videos (names):")
print(sorted(list(remote_assets.list_videos().keys())))

Example output:

Fetch URLs for commonly used assets (a cat image and a walking‑people video).

Example output:

You can pass these URLs directly to PySDK models.

Functions

remote_assets.list_images() -> Dict[str, RemoteMedia]

  • Returns a mapping of attribute names (filename stems) to RemoteMedia objects for available JPG images.

remote_assets.list_videos() -> Dict[str, RemoteMedia]

  • Returns a mapping of attribute names (filename stems) to RemoteMedia objects for available MP4 videos.

Module Attributes

remote_assets.<name> -> RemoteMedia

  • Dynamic attribute corresponding to an asset filename without extension.

  • Returns a RemoteMedia (subclass of str) pointing to a stable HTTPS URL for the asset in PySDK Examples.

RemoteMedia

RemoteMedia is a lightweight str subclass that adds simple media-type helpers while remaining usable anywhere a URL string is expected.

Attributes:

  • kind: media kind as a string, one of "image", "video", or "other".

  • is_image: True if the asset is an image.

  • is_video: True if the asset is a video.

Example:

Example output:

Last updated

Was this helpful?