Skip to main content

BunnyCDN Storage Python Client

A Python client for interacting with BunnyCDN Storage API. This package provides a simple interface to upload, download, and manage files on BunnyCDN Storage.

Installation

pip install bunnycdn-storage-handler

Configuration

Before using the client, you need to set up your API key, storage zone, and pull zone. You can do this in one of the following ways:

Method 1: Environment Variables

Set the following environment variables in your system:

  • BUNNYCDN_API_KEY: Your BunnyCDN API key.
  • BUNNYCDN_STORAGE_ZONE: Your BunnyCDN storage zone name.
  • BUNNYCDN_PULL_ZONE: Your BunnyCDN pull zone name.

You can set environment variables in your terminal like this:

export BUNNYCDN_API_KEY='your_api_key'
export BUNNYCDN_STORAGE_ZONE='your_storage_zone'
export BUNNYCDN_PULL_ZONE='your_pull_zone'

Method 2: Direct Initialization

Alternatively, you can pass the API key and zone names directly when initializing the BunnyCDNStorage client:

from bunnycdn_storage import BunnyCDNStorage

# Initialize the client with your credentials
storage = BunnyCDNStorage(
    api_key='your_api_key',
    storage_zone='your_storage_zone',
    pull_zone='your_pull_zone'
)

Usage

from bunnycdn_storage import BunnyCDNStorage

# Initialize the client
storage = BunnyCDNStorage()

# Upload a file
cdn_url = storage.upload_file("path/in/storage/", file_content, "filename.txt")

# Download a file
status = storage.download_file("path/to/file.txt", "local/destination/path")

# Check if file exists
exists = storage.object_exists("path/to/file.txt")

# Delete a file
status = storage.delete_object("path/to/file.txt")

Features

  • Upload files to BunnyCDN Storage
  • Download files from BunnyCDN Storage
  • Check if files exist
  • Delete files from storage
  • Automatic CDN URL generation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for bunnycdn-storage-handler 0.1.1

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

Source distribution (sdist)

Source distribution for bunnycdn-storage-handler 0.1.1
File Size Uploaded Provenance
bunnycdn_storage_handler-0.1.1.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bunnycdn-storage-handler 0.1.1
File Interpreter ABI Platform
bunnycdn_storage_handler-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / bunnycdn_storage_handler-0.1.1.tar.gz

Download URL bunnycdn_storage_handler-0.1.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1e9d930bedc0b7cadf2e7b83eda3084524524edcde152fc7095fe03459a814b9
BLAKE2b-256 checksum
How to use checksums
c493739f90b0adde64596a0c7926240622dedd8a4239daf5fcf077647e3f31cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / bunnycdn_storage_handler-0.1.1-py3-none-any.whl

Download URL bunnycdn_storage_handler-0.1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39403613c58016b688af7dc083b28937819c22395c5c48663fc8f8bbac0922ea
BLAKE2b-256 checksum
How to use checksums
ae781d873dcf457dd34ff9a5351c10a2ae4268780272cbbccc4976d751dcc343
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for bunnycdn-storage-handler 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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