Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Contributors
* Sibo Wang `@sibowsb <https://github.com/sibowsb>`_
* Rangel Reale `@RangelReale <https://github.com/RangelReale>`_
* Alexander Verbitsky `@habibutsu <https://github.com/habibutsu>`_
* Tim Weber `@scy <https://github.com/scy>`_
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Cloud Storage

`Cloud Storage`_ is a Python +3.5 package which creates a unified API for the
cloud storage services: Amazon Simple Storage Service (S3),
Microsoft Azure Storage, Minio Cloud Storage, Rackspace Cloud Files,
Microsoft Azure Storage, Minio Cloud Storage, Nextcloud, ownCloud, Rackspace Cloud Files,
Google Cloud Storage, and the Local File System.

Cloud Storage is inspired by `Apache Libcloud <https://libcloud.apache.org/>`_.
Expand Down Expand Up @@ -78,6 +78,7 @@ Supported Services
* `Google Cloud Storage`_
* `Microsoft Azure Storage`_
* `Minio Cloud Storage`_
* `ownCloud`_ (driver also supports `Nextcloud`_)
* `Rackspace CloudFiles`_
* Local File System

Expand All @@ -100,12 +101,15 @@ Also install the storage driver(s) you will be using:
pip install cloudstorage[local]
pip install cloudstorage[microsoft]
pip install cloudstorage[minio]
pip install cloudstorage[owncloud]
pip install cloudstorage[rackspace]

.. _`Amazon S3`: https://aws.amazon.com/s3/
.. _`Blackblaze B2 Cloud Storage`: https://www.backblaze.com/b2/Cloud-Storage.html
.. _`Google Cloud Storage`: https://cloud.google.com/storage/
.. _`Microsoft Azure Storage`: https://azure.microsoft.com/services/storage/
.. _`Minio Cloud Storage`: https://www.minio.io/
.. _`Nextcloud`: https://nextcloud.com/
.. _`ownCloud`: https://owncloud.com/
.. _`Rackspace CloudFiles`: https://www.rackspace.com/cloud/files
.. _`Cloud Storage`: https://github.com/scottwernervt/cloudstorage/
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extras =
local
microsoft
minio
owncloud
rackspace
passenv = *
commands = pytest {posargs}
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"python-magic>=0.4.15",
]
EXTRAS_REQUIRE = {
"amazon": ["boto3>=1.8.00", "boto3-stubs[s3]>==1.12.41.0"],
"digitalocean": ["boto3>=1.8.00", "boto3-stubs[s3]>==1.12.41.0"],
"amazon": ["boto3>=1.8.00", "boto3-stubs[s3]>=1.12.41.0"],
"digitalocean": ["boto3>=1.8.00", "boto3-stubs[s3]>=1.12.41.0"],
"google": ["google-cloud-storage>=1.18.0", "requests>=2.19.1"],
"local": [
"filelock>=3.0.0",
Expand All @@ -21,6 +21,7 @@
],
"microsoft": ["azure==4.0.0"],
"minio": ["minio==4.0.0"],
"owncloud": ["pyocclient>=0.6"],
"rackspace": ["openstacksdk<=0.17.2", "rackspacesdk==0.7.5", "requests>=2.19.1"],
"tests": ["flake8==3.8.4", "prettyconf", "pytest==6.2.1", "requests>=2.19.1"],
"lint": [
Expand Down Expand Up @@ -121,6 +122,7 @@ def find_version(fname):
"cloudstorage",
"gcs",
"minio",
"owncloud",
]
),
install_requires=INSTALL_REQUIRES,
Expand Down
9 changes: 7 additions & 2 deletions src/cloudstorage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class DriverName(Enum):
GOOGLESTORAGE = "GOOGLESTORAGE"
LOCAL = "LOCAL"
MINIO = "MINIO"
OWNCLOUD = "OWNCLOUD"
S3 = "S3"
DIGITALOCEANSPACES = "DIGITALOCEANSPACES"

Expand All @@ -45,6 +46,7 @@ class DriverName(Enum):
DriverName.GOOGLESTORAGE: ("cloudstorage.drivers.google", "GoogleStorageDriver"),
DriverName.LOCAL: ("cloudstorage.drivers.local", "LocalDriver"),
DriverName.MINIO: ("cloudstorage.drivers.minio", "MinioDriver"),
DriverName.OWNCLOUD: ("cloudstorage.drivers.owncloud", "OwnCloudDriver"),
DriverName.S3: ("cloudstorage.drivers.amazon", "S3Driver"),
DriverName.DIGITALOCEANSPACES: (
"cloudstorage.drivers.digitalocean",
Expand All @@ -68,7 +70,8 @@ def get_driver(driver: DriverName) -> Drivers:
:return: DriverName driver class.
:rtype: :class:`.AzureStorageDriver`, :class:`.CloudFilesDriver`,
:class:`.GoogleStorageDriver`, :class:`.S3Driver`, :class:`.LocalDriver`,
:class:`.MinioDriver`, :class:`.DigitalOceanSpacesDriver`
:class:`.MinioDriver`, :class:`.OwnCloudDriver`,
:class:`.DigitalOceanSpacesDriver`
"""
if driver in _DRIVER_IMPORTS:
mod_name, driver_name = _DRIVER_IMPORTS[driver]
Expand All @@ -95,13 +98,15 @@ def get_driver_by_name(driver_name: str) -> Drivers:
* `S3`
* `LOCAL`
* `MINIO`
* `OWNCLOUD`
* `DIGITALOCEANSPACES`
:type driver_name: str

:return: DriverName driver class.
:rtype: :class:`.AzureStorageDriver`, :class:`.CloudFilesDriver`,
:class:`.GoogleStorageDriver`, :class:`.S3Driver`, :class:`.LocalDriver`,
:class:`.MinioDriver`, :class:`.DigitalOceanSpacesDriver`
:class:`.MinioDriver`, :class:`.OwnCloudDriver`,
:class:`.DigitalOceanSpacesDriver`
"""
driver = DriverName[driver_name]
return get_driver(driver)
Expand Down
Loading