Skip to main content

Client simplifying and abstracting common operations for digital ocean spaces.

Project description

Spado (Digital Ocean spaces client)

Spado is a simple client to interact with Digital Ocean's spaces. It's built on top of the AWS python 3 framwork boto3 and aims to simplify and streamline common storage operations.

Usage

Initialization

from spado import Spado

# Required params
params: dict = {
    space_name: "space_name",
    region_name: "region_name",
    endpoint: "endpoint",
    spaces_key: "spaces_key",
    spaces_secret: "space_token"
}

_client: Spado = Spado(**params)

Method usage

_client.upload(
    filepath="Samples/sample.jpg",  # Folder/filename.extension
    file=open('/tmp/sample.jpg', 'rb'),  # File as <bytes>
    acl="private"
)

_client.download(
    spaces_fpath='Samples/sample.jpg',
    local_fpath='/tmp/sample2.jpg'
)

CRUD methods:

  • upload: Adds a new file to spaces
  • download_url: Returns a download link for a file in spaces
  • download: Downloads the file directly to given filepath
  • replace: Replaces a file in spaces with a new one
  • delete: Deletes a file in spaces

Helper methods:

  • list_files: Returns a list of files in default space
  • list_spaces: Returns a list of available spaces

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

spado-0.1.3.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spado-0.1.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file spado-0.1.3.tar.gz.

File metadata

  • Download URL: spado-0.1.3.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-7626-generic

File hashes

Hashes for spado-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6521f7df2994031357efac314136005678566ec5d570ac76ea64b42bba91e61c
MD5 0e0e26170af69e96fc348ee5665f7cef
BLAKE2b-256 b50a934fce2faa341f416775b07fe3efced44b42a4152b50c47326b8b194eaa8

See more details on using hashes here.

File details

Details for the file spado-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: spado-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.4.0-7626-generic

File hashes

Hashes for spado-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7b435f0111fc5bb0e76422be02cd72c90392df012d4ebd3a8950f0b8bbf2f31
MD5 40a391a833db36749a4e039228733307
BLAKE2b-256 93f53d123d775ca2871c3ab589b7f3542f4900e72c6c0b02a54ec3c6b63b8c45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page