LogoLogo
AI HubCommunityWebsite
  • Start Here
  • AI Hub
    • Overview
    • Quickstart
    • Workspaces
    • Device Farm
    • Browser Inference
    • Model Zoo
      • Hailo
      • Intel
      • MemryX
      • BrainChip
      • Google
      • DeGirum
      • Rockchip
    • View and Create Model Zoos
    • Cloud Compiler
    • PySDK Integration
  • PySDK
    • Overview
    • Quickstart
    • Installation
    • Runtimes and Drivers
      • Hailo
      • OpenVINO
      • MemryX
      • BrainChip
      • Rockchip
      • ONNX
    • PySDK User Guide
      • Core Concepts
      • Organizing Models
      • Setting Up an AI Server
      • Loading an AI Model
      • Running AI Model Inference
      • Model JSON Structure
      • Command Line Interface
      • API Reference Guide
        • PySDK Package
        • Model Module
        • Zoo Manager Module
        • Postprocessor Module
        • AI Server Module
        • Miscellaneous Modules
      • Older PySDK User Guides
        • PySDK 0.16.2
        • PySDK 0.16.1
        • PySDK 0.16.0
        • PySDK 0.15.2
        • PySDK 0.15.1
        • PySDK 0.15.0
        • PySDK 0.14.3
        • PySDK 0.14.2
        • PySDK 0.14.1
        • PySDK 0.14.0
        • PySDK 0.13.4
        • PySDK 0.13.3
        • PySDK 0.13.2
        • PySDK 0.13.1
        • PySDK 0.13.0
    • Release Notes
      • Retired Versions
    • EULA
  • DeGirum Tools
    • Overview
      • Streams
        • Streams Base
        • Streams Gizmos
      • Compound Models
      • Tile Compound Models
      • Analyzers
        • Clip Saver
        • Event Detector
        • Line Count
        • Notifier
        • Object Selector
        • Object Tracker
        • Zone Count
      • Inference Support
      • Support Modules
        • Audio Support
        • Model Evaluation Support
        • Math Support
        • Object Storage Support
        • UI Support
        • Video Support
      • Environment Variables
  • DeGirumJS
    • Overview
    • Get Started
    • Understanding Results
    • Release Notes
    • API Reference Guides
      • DeGirumJS 0.1.3
      • DeGirumJS 0.1.2
      • DeGirumJS 0.1.1
      • DeGirumJS 0.1.0
      • DeGirumJS 0.0.9
      • DeGirumJS 0.0.8
      • DeGirumJS 0.0.7
      • DeGirumJS 0.0.6
      • DeGirumJS 0.0.5
      • DeGirumJS 0.0.4
      • DeGirumJS 0.0.3
      • DeGirumJS 0.0.2
      • DeGirumJS 0.0.1
  • Orca
    • Overview
    • Benchmarks
    • Unboxing and Installation
    • M.2 Setup
    • USB Setup
    • Thermal Management
    • Tools
  • Resources
    • External Links
Powered by GitBook

Get Started

  • AI Hub Quickstart
  • PySDK Quickstart
  • PySDK in Colab

Resources

  • AI Hub
  • Community
  • DeGirum Website

Social

  • LinkedIn
  • YouTube

Legal

  • PySDK EULA
  • Terms of Service
  • Privacy Policy

© 2025 DeGirum Corp.

On this page
  • Object Storage Support Module Overview
  • Classes
  • ObjectStorageConfig
  • Functions
  • construct_direct_url(object_name)
  • ObjectStorage
  • Functions
  • __init__(config)
  • check_bucket_exits(retries=1)
  • check_file_exists_in_object_storage(object_name)
  • delete_bucket
  • delete_bucket_contents
  • delete_file_from_object_storage(object_name)
  • download_file_from_object_storage(object_name, ...)
  • ensure_bucket_exists
  • generate_presigned_url(object_name)
  • list_bucket_contents
  • upload_file_to_object_storage(file_path, ...)

Was this helpful?

  1. DeGirum Tools
  2. Overview
  3. Support Modules

Object Storage Support

DeGirum Tools API Reference Guide. MinIO/local object‑storage wrappers for file and bucket ops.

This API Reference is based on DeGirum Tools version 0.18.0.

Object Storage Support Module Overview

Helper utilities for interacting with cloud object storage services such as MinIO. The module also provides a lightweight local file-system backend for testing without a remote service.

Key Classes

  • ObjectStorageConfig: Configuration parameters for object storage.

  • ObjectStorage: Convenience wrapper around common bucket operations.

Typical Usage

  1. Create an ObjectStorageConfig with connection parameters.

  2. Instantiate ObjectStorage using the configuration.

  3. Upload, download, or delete files using the instance methods.

Classes

ObjectStorageConfig

ObjectStorageConfig

dataclass

Configuration for object storage connections.

Attributes:

Name
Type
Description

endpoint

str

Object storage endpoint URL or local path.

access_key

str

Access key for the storage account.

secret_key

str

Secret key for the storage account.

bucket

str

Bucket name or local directory name.

url_expiration_s

int

Expiration time for presigned URLs.

Functions

construct_direct_url(object_name)

construct_direct_url(object_name)

Construct a direct URL to an object.

Parameters:

Name
Type
Description
Default

object_name

str

Name of the object inside the bucket.

required

ObjectStorage

ObjectStorage

Convenience wrapper around common object storage operations.

This helper abstracts interaction with either a real MinIO server or a local directory acting as an object store. It exposes simple methods for bucket management and file uploads/downloads.

Functions

__init__(config)

__init__(config)

Initialize the storage helper.

Depending on config.endpoint this helper connects either to a real MinIO server or to a local directory used as a mock object store.

Parameters:

Name
Type
Description
Default

config

ObjectStorageConfig

Storage configuration.

required

check_bucket_exits(retries=1)

check_bucket_exits(retries=1)

Check whether the configured bucket exists.

Parameters:

Name
Type
Description
Default

retries

int

Number of retry attempts.

1

Returns:

Name
Type
Description

bool

bool

True if the bucket exists.

check_file_exists_in_object_storage(object_name)

check_file_exists_in_object_storage(object_name)

Check whether a file exists in the configured bucket.

Parameters:

Name
Type
Description
Default

object_name

str

Name of the object within the bucket.

required

delete_bucket

delete_bucket()

Delete the bucket and all of its objects.

Raises:

Type
Description

RuntimeError

If the bucket cannot be removed.

delete_bucket_contents

delete_bucket_contents()

Remove all objects from the bucket.

delete_file_from_object_storage(object_name)

delete_file_from_object_storage(object_name)

Delete a file from the configured bucket.

Parameters:

Name
Type
Description
Default

object_name

str

Name of the object within the bucket.

required

Raises:

Type
Description

RuntimeError

If the deletion fails.

download_file_from_object_storage(object_name, ...)

download_file_from_object_storage(object_name, file_path)

Download a file from the configured bucket.

Parameters:

Name
Type
Description
Default

object_name

str

Name of the object within the bucket.

required

file_path

str

Local path where the file will be saved.

required

Raises:

Type
Description

RuntimeError

If the download fails.

ensure_bucket_exists

ensure_bucket_exists()

Create the bucket if it does not exist.

Raises:

Type
Description

RuntimeError

If bucket creation fails.

generate_presigned_url(object_name)

generate_presigned_url(object_name)

Return a presigned download URL for an object.

Parameters:

Name
Type
Description
Default

object_name

str

Name of the object within the bucket.

required

Returns:

Type
Description

str

Temporary download URL for the object.

list_bucket_contents

list_bucket_contents()

List objects in the bucket.

Returns:

Type
Description

Iterable or None

Iterator over objects, or None if the bucket does not exist.

Raises:

Type
Description

RuntimeError

If listing fails.

upload_file_to_object_storage(file_path, ...)

upload_file_to_object_storage(file_path, object_name)

Upload a file to the configured bucket.

Parameters:

Name
Type
Description
Default

file_path

str

Path of the local file to upload.

required

object_name

str

Name of the object within the bucket.

required

Raises:

Type
Description

RuntimeError

If the upload fails.

PreviousMath SupportNextUI Support

Last updated 1 day ago

Was this helpful?