Skip to main content

FastCloud

Up & Download files to any cloud storage.

Simplistic unified interface for uploading and downloading files to the cloud.

Supports

  • Azure Blob Storage ✅
  • Socaity Upload API
  • Replicate Upload API

Installation

Install via pypi with:

# to support all cloud providers
pip install fastcloud
# support azure blob storage
pip install fastcloud[azure]

Or check-out the repository and work from there.

Usage

Init storage (Azure Blob)

To directly up and download files to the cloud storage provider, you can use the following code snippets.

from fastcloud import AzureBlobStorage
# Create storage client
cloud_store = AzureBlobStorage(connection_string="DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=...")

Recommendation: Use environment variables to store the cloud storage access tokens / credentials.

Upload and download files

Option 1: Just with plain bytes io

# upload. Will create a file in the cloud with the name my_file
file_url = cloud_store.upload(file="path/to/file", file_name="my_file", folder="my_upload_dir")
# download. Will download the file and save it to the save-path
cloud_store.download(file_id, save_path="path/to/save")

Option 2: with media-toolkit. Media-toolkit provides easy to use classes for images, videos, audio files.

from media_toolkit import ImageFile
# upload
my_img = ImageFile.from_np_array(my_cv2_img)
file_url = cloud_store.upload(file=my_img)
# download and parse as media_file
media_file = cloud_store.download(file_url)

Tutorials

How to setup Azure Blob Storage and get connection string?

  1. Go to portal.azure.com and login.
  2. Create a storage account of your choice (choose Blob Storage option)
  3. Navigate to storage account, click on containers and add container
  4. Go back to your storage account. Click on Access keys and copy the connection string.
  5. Add the connection string to your environment variables.

Contribute

Missing a cloud provider?

  • Just implement the missing class in core/providers with inheritance of the interface i_cloud_storage and make a pull request

Missing a feature?

  • Feel free to raise an issue. Better tough: just implement it and make a PR.

Also have a look at media-toolkit, APIPod for your personal cloud solution.

SUPPORT SOCAITY BY LEAVING A STAR

Metadata

Release files for fastcloud 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastcloud 0.0.14
File Size Uploaded Provenance Actions
fastcloud-0.0.14.tar.gz 19.7 kB Without provenance Details for fastcloud-0.0.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastcloud 0.0.14
File Interpreter ABI Platform Actions
fastcloud-0.0.14-py3-none-any.whl Python 3 none any Details for fastcloud-0.0.14-py3-none-any.whl

Total release size: 41.6 kB

Release files / fastcloud-0.0.14.tar.gz

Download URL fastcloud-0.0.14.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0ab3dd3e8b12fbc3993c81f73223f0eeeb82f79625b5a1d69ae5a4c2acd9eb12
BLAKE2b-256 checksum
How to use checksums
0e4b96d7f555196e0b340049e50974ab7ea65ef81351a5e79142bd86bd32074b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / fastcloud-0.0.14-py3-none-any.whl

Download URL fastcloud-0.0.14-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9551e57e750a3fe5aff8996aaa02d7e7108e9b5bfd27a3f0afcda869592ba70
BLAKE2b-256 checksum
How to use checksums
4eba93984d35c47b7a7b03fa955b083da91659fffa65225f07cdf1866e3a198c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Security for fastcloud 0.0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page