Metadata-Version: 2.1
Name: cloudtoolbox
Version: 0.5.0
Summary: Toolbox for the cloud.
Author-email: Dotz Developers <devs-dotz@dotz.com>
Project-URL: Repository, https://github.com/DotzInc/cloud-toolbox
Keywords: cloud,tools,utilities,google,gcp,amazon,aws
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: all
Requires-Dist: boto3 ; extra == 'all'
Requires-Dist: google-cloud-pubsub ; extra == 'all'
Requires-Dist: google-cloud-storage ; extra == 'all'
Provides-Extra: amazon
Requires-Dist: boto3 ; extra == 'amazon'
Provides-Extra: google
Requires-Dist: google-cloud-pubsub ; extra == 'google'
Requires-Dist: google-cloud-storage ; extra == 'google'

# Cloud Toolbox

![Tests](https://github.com/DotzInc/cloud-toolbox/actions/workflows/tests.yml/badge.svg?event=push)
![PyPI - Version](https://img.shields.io/pypi/v/cloudtoolbox)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cloudtoolbox)

Decouple your applications from cloud providers with carefully crafted service interfaces.

## Requirements

* Python 3.8+

## Installation

To install Cloud Toolbox, use pip:

```sh
pip install cloudtoolbox
```

### Extras

Cloud Toolbox offers the following optional dependencies for easy installation of provider SDKs:

* `cloudtoolbox[amazon]` - Installs the Amazon AWS SDK.
* `cloudtoolbox[google]` - Installs the Google Cloud SDK.
* `cloudtoolbox[all]` - Installs SDKs for both providers.

## Example

Uploading a file to Google Cloud Storage.

```python
from cloud import factory
from cloud.google.storage import Uploader

FileUploader = factory.storage_uploader(Uploader)

bucket = "my-bucket"
filename = "notes.txt"
filepath = f"/path/to/{filename}"

uploader = FileUploader()
uploader.upload(bucket, filename, filepath)
```

Switching from Cloud Storage to Amazon S3.

```python
# Replace this import
from cloud.google.storage import Uploader

# For this one
from cloud.amazon.s3 import Uploader
```
