Skip to main content

No project description provided

Project description

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.

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

sparklepop-0.1.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

sparklepop-0.1.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sparklepop-0.1.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for sparklepop-0.1.3.tar.gz
Algorithm Hash digest
SHA256 759faa63fbafbb3d8ba3d039c1309d54f8afb962f00debbf201037c7cd4ea752
MD5 ca30939909fddab219349e56c6e60ce4
BLAKE2b-256 29383755f8880aebf5d4c803a7ad83d488d4323761c569f7c8f257bb5ad9eee8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sparklepop-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for sparklepop-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 16cc4709c7493f96b5f2296ba8eadded53a66d7ce148f2f0e26acbc58dcb9bcd
MD5 7f29d8ba2185b352dfa6d952cb985d1c
BLAKE2b-256 ac356710552ce2f004551e9e74f7823521ee98d5f956d8fa1ec23b8ce09bae5c

See more details on using hashes here.

Supported by

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