Skip to main content

Unified object storage client API

Project description

Object Storage Client

A unified object storage client for Rust and Python, supporting S3, GCS, Azure Blob Storage, HTTP/HTTPS, and Local Filesystem. It provides a simple, URL-based API for object operations, including cross-provider copy and move.

Features

  • Unified API: Single interface for various storage backends.
  • Cross-Provider: Copy or move objects between different storage providers (e.g., S3 to Local FS).
  • Multi-Language: Native Rust library with Python 3.14 bindings.
  • CLI: osc command-line tool for quick operations.

Supported Schemes

  • s3://bucket/path (AWS S3)
  • gs://bucket/path or gcs://bucket/path (Google Cloud Storage)
  • az://container/path (Azure Blob Storage)
  • http://host/path or https://host/path (HTTP/HTTPS)
  • file:///absolute/path or local_path (Local Filesystem)

CLI Usage (osc)

The osc tool allows you to interact with object storage directly from your terminal.

Installation

If you have the source code, you can install it using Cargo:

cargo install --path .

Examples

  • Upload a local file:

    osc put my_file.txt s3://my-bucket/remote_file.txt
    
  • Download an object:

    osc get gs://my-bucket/data.json ./local_data.json
    
  • Copy between providers:

    osc cp s3://source-bucket/image.png az://dest-container/image.png
    
  • List objects:

    osc ls s3://my-bucket/logs/
    
  • Delete an object:

    osc rm s3://my-bucket/temp_file.tmp
    

Rust Usage

Installation

Add object-storage-client to your Cargo.toml:

[dependencies]
object-storage-client = { git = "https://github.com/bixority/object-storage-client" }
tokio = { version = "1.0", features = ["full"] }

Example

use object_storage_client::ObjectStorageClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ObjectStorageClient::new();

    // Upload data
    let data = b"Hello from Rust!";
    client.put("s3://my-bucket/hello.txt", &data).await?;

    // Download data
    let retrieved = client.get("s3://my-bucket/hello.txt").await?;
    println!("Retrieved: {:?}", String::from_utf8(retrieved.to_vec())?);

    // Cross-provider copy (S3 to Local)
    client.copy("s3://my-bucket/hello.txt", "file:///tmp/hello_local.txt").await?;

    Ok(())
}

Python 3.14 Usage

Installation

You can install the package using pip. Note that it requires Python 3.14.

pip install git+https://github.com/bixority/object-storage-client

Or if you are developing locally, you can use maturin:

maturin develop

Example

import asyncio
from object_storage_client import ObjectStorageClient

async def main():
    client = ObjectStorageClient()

    # Upload data
    await client.put("s3://my-bucket/python_test.txt", b"Hello from Python 3.14!")

    # Download data
    data = await client.get("s3://my-bucket/python_test.txt")
    print(f"Retrieved: {data.decode()}")

    # List objects
    items = await client.list("s3://my-bucket/")
    print(f"Bucket items: {items}")

    # Cross-provider move (GCS to S3)
    await client.move_object("gs://my-gcs-bucket/data.csv", "s3://my-s3-bucket/data.csv")

if __name__ == "__main__":
    asyncio.run(main())

Developer Instructions

Prerequisites

  • Rust 1.85+ (or latest stable)
  • Python 3.14+
  • maturin (for Python bindings)

Building

  • Rust: cargo build --release
  • Python: maturin build --release
  • CLI: cargo build --bin osc

Testing

cargo test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

object_storage_client-0.0.26.tar.gz (41.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

object_storage_client-0.0.26-cp314-cp314-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.14Windows x86-64

object_storage_client-0.0.26-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

object_storage_client-0.0.26-cp314-cp314-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

object_storage_client-0.0.26-cp313-cp313-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.13Windows x86-64

object_storage_client-0.0.26-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

object_storage_client-0.0.26-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

File details

Details for the file object_storage_client-0.0.26.tar.gz.

File metadata

  • Download URL: object_storage_client-0.0.26.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26.tar.gz
Algorithm Hash digest
SHA256 0b1d2c14fcedc40b570d146099093876d2a4687397f1e10026aa78a625bf4731
MD5 33f5d2b058f16ede97527d67a0ecbad1
BLAKE2b-256 b329ffd4b0ac2edc22b6ff152c84d6b4dbf2cb9bfd63a56c0e754a05275eeec7

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7fa8d933668b619b60bee70cdeba270ac4d48653836b4323fc28b3d097c978f3
MD5 3dafc8001235e63b18f47e0230d95c06
BLAKE2b-256 ffb158e884f24cbfc23866a38ccd658a5c7438dae0ea68fbdcf4806419058a7c

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40cf561fa56555510c1f68f25ae3a1ff67599492218b523ec5b8ce97c42e57ad
MD5 6356a3fc0050a908d6d3f3fcade38a0e
BLAKE2b-256 d434c36d11465cfcdca40b8389267ceedce28c623e84d74d1d7a2b5cddf70622

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15946756649a79b7e1cce4d0bfcb0d8a0b0e61de23b8b0c760174848e3acd33f
MD5 5056445f2bcaac84884eb33cf5fbd236
BLAKE2b-256 02b668dd1289550615c2108ba6d0e3b8898a4b0b797db53d22bdf0af7cb974b8

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0ba690e98e59f6061462ddcd9cdc9bb9428a15e52f8812138d6292c8cf79cc3f
MD5 28f600e37b22e072a3754c6373b97b17
BLAKE2b-256 258d063f327d542a83dce8cf21e7d82717c3d64ddac3f3b2583d3f999ccfbadc

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7ba2c32584281f5f4b1a85a353bd040f07b5e9d55f82f1685ca7da61cc59c098
MD5 1c9ea6c8c7a60cda291bcfa4068f8f61
BLAKE2b-256 a8d3f616bd3bf9cda8fffd10bedb78b6b7207fc1203d3b179e9969fd223d92ef

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.26-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: object_storage_client-0.0.26-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for object_storage_client-0.0.26-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 541e91b8a47f357623d7a7747396853b1d99a396abb24e031a70ce5568dee5e6
MD5 1f604970a03b1d5ea8066ba10c335264
BLAKE2b-256 27ffaeef4fcb049047269be1e120289fe6845f483d7ba55ced5f5f7e7798b7e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page