> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Network volume storage tool

> A command-line tool for managing Runpod network storage volumes and files

GitHub repository: [github.com/justinwlin/Runpod-Network-Volume-Storage-Tool](https://github.com/justinwlin/Runpod-Network-Volume-Storage-Tool)

Runpod provides an [S3-compatible layer](/serverless/storage/s3-api) 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](https://console.runpod.io/user/settings).
* S3 API keys (access key and secret key) for file operations.

## Installation

Clone the repository and install dependencies:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 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:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
uv run runpod-storage-server --host 0.0.0.0 --port 8000
```
