Metadata-Version: 2.1
Name: cloud-storage
Version: 1.4.1
Summary: Cloud Storage
Home-page: https://github.com/Gatsby-Lee/cloud-storage
Author: Henley Kuang
License: GPL-3.0
Keywords: cloud storage gcs s3
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
Requires-Dist: google-cloud-storage
Requires-Dist: boto3

.. image:: https://badge.fury.io/py/cloud-storage.svg
    :target: https://badge.fury.io/py/cloud-storage

=============
Cloud Storage
=============

Installation
------------

.. code-block:: bash

    pip install cloud-storage


How to use
----------

.. code-block:: python

    >>> from cloud_storage import GoogleCloudStorage
    >>> storage = GoogleCloudStorage()


.. code-block:: python

    >>> from cloud_storage import create_storage_client
    >>> storage = create_storage_client()


Playground Download
-------------------

* gcs_storage_playground.py
* s3_storage_boto3_playground.py

.. code-block:: bash

    python playground/<play_ground_module> upload --bucket-name <your_bucket> \
        --object-key "test_sample.html" \
        --upload-str "<html>hello</html>" \
        --content-encoding="gzip" \
        --content-type="text/html"

    python playground/<play_ground_module> download-gzipped --bucket-name <your_bucket> \
        --object-key "test_sample.html"

    python playground/<play_ground_module> download-gzipped --bucket-name <your_bucket> \
        --object-key "test_sample.html" \
        --do-gunzip

    python playground/<play_ground_module> download-gzipped --bucket-name <your_bucket> \
        --object-key "test_sample.html" \
        --download-path='test_sample.html'

    python playground/<play_ground_module> download-gzipped --bucket-name <your_bucket> \
        --object-key "test_sample.html" \
        --do-gunzip \
        --download-path test_sample.html


Playground Rename
-----------------

* gcs_storage_playground.py
* s3_storage_boto3_playground.py

.. code-block:: bash

    python playground/<play_ground_module> rename --bucket-name <your_bucket> \
        --object-key "test_sample.html" --new-object-key "test_sample1.html"


Playground Exists
-----------------

* gcs_storage_playground.py
* s3_storage_boto3_playground.py

.. code-block:: bash

    python playground/<play_ground_module> exists --bucket-name <your_bucket> \
        --object-key "test_sample1.html"


Playground Delete
-----------------

* gcs_storage_playground.py
* s3_storage_boto3_playground.py

.. code-block:: bash

    python playground/<play_ground_module> delete --bucket-name <your_bucket> \
        --object-key "test_sample1.html"


