Skip to main content

SparklePop

SparklePop is a simple Python package designed to check the free disk space of an AWS RDS instance. It leverages AWS CloudWatch to retrieve the necessary metrics. This package is intended for users who need a straightforward way to monitor disk space without setting up complex alerts.

Installation

To install SparklePop, you can use pip:

pip install sparklepop

Usage

Initialization

First, you need to create an instance of the SparklePop class. You need to provide the RDS instance identifier and optionally the AWS region (default is us-east-1). boto3 is in use, so authenticate to AWS as you normally would via environment variables etc.

from sparklepop import SparklePop

rds_instance = "your_rds_instance_identifier"
region = "us-east-1"

sparklepop = SparklePop(rds_instance, region)

Get Free Disk Space

To get the free disk space in gigabytes:

free_space = sparklepop.get_free_disk_space()
print(f"Free disk space: {free_space} GB")

Check Free Disk Space

To check if the free disk space is below a certain threshold and raise an error if it is: (the default threshold is 10GB, feel free to change it)

sparklepop.check_on_free_disk_space(minimum_gb=10)

Example

Here's a complete example:

from sparklepop import SparklePop

# Initialize the SparklePop object
rds_instance = "your_rds_instance_identifier"
region = "us-east-1"
sparklepop = SparklePop(rds_instance, region)

# Get free disk space
free_space = sparklepop.get_free_disk_space()
print(f"Free disk space: {free_space} GB")

# Check if free disk space is above the threshold
sparklepop.check_on_free_disk_space(minimum_gb=10)

License

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

Release files for sparklepop 0.1.3

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

Source distribution (sdist)

Source distribution for sparklepop 0.1.3
File Size Uploaded
sparklepop-0.1.3.tar.gz 2.2 kB Details

Built distribution (wheel)

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

Total release size: 4.8 kB

Release files / sparklepop-0.1.3.tar.gz

Download URL sparklepop-0.1.3.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
759faa63fbafbb3d8ba3d039c1309d54f8afb962f00debbf201037c7cd4ea752
BLAKE2b-256 checksum
How to use checksums
29383755f8880aebf5d4c803a7ad83d488d4323761c569f7c8f257bb5ad9eee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

Release files / sparklepop-0.1.3-py3-none-any.whl

Download URL sparklepop-0.1.3-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16cc4709c7493f96b5f2296ba8eadded53a66d7ce148f2f0e26acbc58dcb9bcd
BLAKE2b-256 checksum
How to use checksums
ac356710552ce2f004551e9e74f7823521ee98d5f956d8fa1ec23b8ce09bae5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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