Skip to main content

An unified python client to communicate with various kinds of object-store providers.

Project description

OmniStore

Latest Release

An unified python client to communicate with various kinds of object-store providers.

How to use

Installation

pip install omnistore

Usage

from omnistore.objstore import StoreFactory

# Initialization
client = StoreFactory.new_client(
    provider=<provider>, endpoint=<endpoint>, bucket=<bucket>
)

# Create a directory
client.create_dir(dir_name)

# Delete a directory with all its files
client.delete_dir(dir_name)

# Upload
client.upload(src, dest)

# Upload a directory with all its files
client.upload_dir(src_dir, dest_dir)

# Download
client.download(src, dest)

# Download a directory with all its files
client.download_dir(src_dir, dest_dir)

# Exists
client.exists(filename)

# Delete
client.delete(filename)

Supported Providers

Alibaba Cloud OSS

Usage:

client = StoreFactory.new_client(
    provider="OSS", endpoint=<endpoint>, bucket=<bucket>
)

Required environment variables:

OSS_ACCESS_KEY_ID=
OSS_ACCESS_KEY_SECRET=

Development

Once you want to run the integration tests, you should have a .env file locally, similar to the .env.example.

Contributions

🚀 All kinds of contributions are welcomed ! Please follow Contributing. Thanks to all these contributors.

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

omnistore-0.0.3.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

omnistore-0.0.3-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

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