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.13+ bindings.
  • Streaming: Async streaming support for both Rust and Python.
  • 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://, wasb://, wasbs://, abfs://, or abfss:// (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
    
  • Move an object:

    osc mv s3://my-bucket/old_name.txt s3://my-bucket/new_name.txt
    
  • List objects:

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

    osc rm s3://my-bucket/temp_file.tmp
    
  • Stream an object:

    osc get-stream gs://my-bucket/large_file.bin
    

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.13+ Usage

Installation

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

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_object("s3://my-bucket/python_test.txt", b"Hello from Python!")

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

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

    # Stream data
    stream = await client.get_object_stream("s3://my-bucket/python_test.txt")
    async for chunk in stream:
        print(f"Chunk size: {len(chunk)}")

    # 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.13+
  • 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.30.tar.gz (42.3 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.30-cp314-cp314-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.14Windows x86-64

object_storage_client-0.0.30-cp314-cp314-manylinux_2_28_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

object_storage_client-0.0.30-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.30-cp314-cp314-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

object_storage_client-0.0.30-cp313-cp313-manylinux_2_28_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

object_storage_client-0.0.30-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.30-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.30.tar.gz.

File metadata

  • Download URL: object_storage_client-0.0.30.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.30.tar.gz
Algorithm Hash digest
SHA256 48bb4afb4f5f4871167d2593ac77147deae09849b138c29b51fb1ab32e0c6e4c
MD5 b4e6dde134f6027ffad2080ab10212f5
BLAKE2b-256 4dde2a1604fd29b4d5c5934c0f12acb6fadb644c44d3bb91ee89021fc73627de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7a5cb07aa7928a5495b41c46901f9de11ead197f5e0c7b23d1e02688c7e35456
MD5 f7a1ac9679ddc783d65f0a87f0191953
BLAKE2b-256 80010909fd906c4c63c791394831a4ef49e007bf3256173941f9acf7bf4d623a

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.30-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: object_storage_client-0.0.30-cp314-cp314-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.14, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce2ae89142c997b69a5aff954d0a3e810d10586fad67c69e6f6083dae25b839e
MD5 68a12ae5de98bfcc26b6d466e9ce4e20
BLAKE2b-256 55b046cc1b484ba3850480b9c7142b69b909eacb6df2ae1ae3e93416fa6108db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d6308f860bf6495f9bfcf57e66343042e84160dfb067b0a1cb8fb5a268de806
MD5 dd57202429056af207d1430ff83df52f
BLAKE2b-256 30bc67a991c7544d13356804047225c1822546c58199544c9f2dee66f2073023

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ea41b5953aa2d9ce1f8947b55a1bf19fef194738ec90e97ccd802b4e18ec27c
MD5 a6b4276c71e1f44539b9759e098fa9dd
BLAKE2b-256 399ce1d01b382e1f7bcceb5b4dce1246349f4777a420c07ef8249e3da1d085d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d323691d76abbe5be9302088ace2ea55bd56beab33aee0e8b01b3b11ddce1122
MD5 a1a59e07d8a3c732bb69783824819d71
BLAKE2b-256 8669dae8a8b160df9ef0e1b4a9b28ba7a22d161f5def0f0c63ceec3c91e001c3

See more details on using hashes here.

File details

Details for the file object_storage_client-0.0.30-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: object_storage_client-0.0.30-cp313-cp313-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d3f899fd1687c35f4089be02f50f64493d722ffc80073e72d73e7add62c22496
MD5 d51dad785e03da29e820de533523ddd8
BLAKE2b-256 1b922fb5ae6203c809497a94ee8c6ae314d256ef15e3ba24d9ed66aa308414f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f09157382bc7160bbeac3aafc57a03f82540ba60674652b080045adf46ee196
MD5 bebe3d8bead9d1e6e1b2ac60be6399d2
BLAKE2b-256 502ba9748d36088f89821265d832a83a264fc45c22d34d9402a968d4a46eb316

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.30-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.15 {"installer":{"name":"uv","version":"0.11.15","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.30-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23e8eba480891127370e2c76fec82efd141dc1b2bb6cc34146273288cb320d16
MD5 c97a42b0c7cb0ba4166aab6ed86c4b83
BLAKE2b-256 5f4c84bc3093417369d88b1f7f6c5ee6d0f7f9d624413c1a9060c90e28b802af

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