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.29.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.29-cp314-cp314-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

object_storage_client-0.0.29-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.29-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.29-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.29.tar.gz.

File metadata

  • Download URL: object_storage_client-0.0.29.tar.gz
  • Upload date:
  • Size: 42.3 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.29.tar.gz
Algorithm Hash digest
SHA256 1bc6ad85d0dd1fe6ccd654a8eccb7780db3e3a0767e6068d844986182dbda0cf
MD5 cbfa7a929dd7f5f3db827b6e4ee3ad7c
BLAKE2b-256 8928cba1bd9df42eb16900d000dfd581dcf2e3d2505e5cd814ad90de91006b25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 d126149f728aa7937bd0e7b47d1929bacfa60317fdda6eca2204f1b599cb4b5c
MD5 2388dfabbeedec30677b1fe14eeb07ea
BLAKE2b-256 96bf0d0354cfe6a160d39d85b1afbe459aeb0b82538352c6594c3fdc5e141f20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.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.29-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6b18fa4eb9b5356d2e1ff562f5e6addf32286549cbd1564a47192750b848b0ec
MD5 35a8c2a219a911cf65775ab150b402a8
BLAKE2b-256 b6688536a0b4308bb9dba95ed77d7a5978ccce8afa803056e1776ca81e3d1fb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fcfc44c039f2456da67f19d4fb5ad233aacf6c8823f524988b97c7da0432d2de
MD5 c27c5cc368bf5f33a50155a626027323
BLAKE2b-256 c49822bd8627e28a3fb7d1b783ded42d880ae1d2ac477b9efc9bf30bd5f73162

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5abdf9259831f803eb38c25d2caba882ad7a5286e809a53f512c47941eac1a87
MD5 0bcc5ac637020c75c5a835a553c6e653
BLAKE2b-256 84046c423dafd66b7ef07a50f866d7b7541f6297d86ea0bec85812458d382027

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 daee742568157f1129fae311b695152cf8ede6bc02db388ec791d53109caed8a
MD5 b92a6691e49034c6aa7c3da9a69daff1
BLAKE2b-256 99d12ae3cf9b41889a613439e3c3f36fb4efd9cb17999833894a7aff0d4b82d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.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.29-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8ec526bf1cb581b750c068d6cd2358bcce98ade206751a899800d999a82b1eeb
MD5 6699a85157f0fd0358b84a5f5a0f9bf8
BLAKE2b-256 6922f2b7337758740d7f0ef8548f8a3c523aa07756181f3e9da712787ca655da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9744d5946fb0844b73070004b390d2f1ee455e1dd2b797550f2b300cd3a61091
MD5 e7faf70aa0e5666fbbe2822268c561a2
BLAKE2b-256 b2c112225fbe2b2b3e45c85257927cb3a637c587dc731500328bab0e6c50d937

See more details on using hashes here.

File details

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

File metadata

  • Download URL: object_storage_client-0.0.29-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.29-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 525bae91f0b1c3b0565c9b5c28e65bde3e27f1891e21bba186b458d7d1a50b4b
MD5 c490305bfc9bf345178adef0f54ec44e
BLAKE2b-256 016bdb65788af1b0b6961843697b5a6ac68023937e73a541b335cd1dfa053f16

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