GitHub repository: github.com/justinwlin/Runpod-Network-Volume-Storage-Tool Runpod provides an S3-compatible layer for network volumes, enabling object storage operations on your network storage. This community tool makes it easy to interact with that S3 layer through three interfaces: a command-line interface, a Python SDK for programmatic access, and a self-hosted REST API server for integration with other applications.

Requirements

  • Python 3.8 or higher.
  • Runpod API key from console settings.
  • S3 API keys (access key and secret key) for file operations.

Installation

Clone the repository and install dependencies:
git clone https://github.com/justinwlin/Runpod-Network-Volume-Storage-Tool.git
cd Runpod-Network-Volume-Storage-Tool

# Install dependencies with uv
uv sync

Configuration

Set your API credentials as environment variables:
export RUNPOD_API_KEY="your_runpod_api_key"
export RUNPOD_S3_ACCESS_KEY="your_s3_access_key"
export RUNPOD_S3_SECRET_KEY="your_s3_secret_key"

Interactive mode

The interactive mode provides a menu-driven interface:
uv run runpod-storage interactive
Features include volume management, file upload/download, and an interactive file browser with navigation and selection modes.

Command line usage

Manage volumes directly from the command line:
# List volumes
uv run runpod-storage list-volumes

# Create a volume
uv run runpod-storage create-volume --name "my-storage" --size 50 --datacenter EU-RO-1

# Upload files
uv run runpod-storage upload /path/to/file.txt volume-id
uv run runpod-storage upload /path/to/directory volume-id

# Download files
uv run runpod-storage download volume-id remote/file.txt

Python SDK

The SDK provides programmatic access to all features:
from runpod_storage import RunpodStorageAPI

api = RunpodStorageAPI()

# List volumes
volumes = api.list_volumes()

# Create volume
volume = api.create_volume(
    name="ml-datasets",
    size=100,
    datacenter="EU-RO-1"
)

# Upload with automatic chunk size optimization
api.upload_file("data.csv", volume_id, "datasets/data.csv")

# Upload directory with progress tracking
def progress_callback(current, total, filename):
    percent = (current / total) * 100
    print(f"[{current}/{total}] {percent:.1f}% - Uploading: {filename}")

api.upload_directory(
    "my_project/",
    volume_id,
    "projects/my_project/",
    progress_callback=progress_callback
)

API server

Run a REST API server that proxies to Runpod’s API:
uv run runpod-storage-server --host 0.0.0.0 --port 8000