An unified python client to communicate with various kinds of object-store providers.
Project description
OmniStore
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.4.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file omnistore-0.0.4.tar.gz
.
File metadata
- Download URL: omnistore-0.0.4.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a15ea36cce3b6f962a617dee45932e5bc596b2a4a9a6b3914b704749964681de |
|
MD5 | 3d38529dc69d7128931f439f4342256f |
|
BLAKE2b-256 | 71f47c4e46ea7c5d77767a97fabf958624626a37e56d1206b6bfc2a7f6a5c36c |
File details
Details for the file omnistore-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: omnistore-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.13 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0730ebe5f1bf9345f6c0611aef08399c1ff445fddd6ca7d5bb4ea66111f3f58 |
|
MD5 | 7235fe0e50e7b5d02f1b344becfd5abd |
|
BLAKE2b-256 | 9cfc20940b0ef6043b083706bed53cafa456a55bdef56288d5c25422a5a5276f |