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.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sparklepop-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f8ccb88d44dd7756d7f85e41dd86d6ce0a870ad073ee0289c87bf1e5de1c0d34
MD5 6f9c63f45a8f1b0d2fea1f28a2b14368
BLAKE2b-256 6e1e8624a4fe658dc941994e2f7dfced973cf7fbea642493578c7001ba25b3f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sparklepop-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9648c12103163fd55f9c78bb7866d0997a7ccfe07247cc3242cac5d4f74d7d3
MD5 5c02f4647694ab5274c59fbf46b5ac0b
BLAKE2b-256 186601458cdc535b3a31d2bc2ffea8a08a436edcfec7c1e089c9d669e4ba432c

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