PurpleAirAPIError module

Custom exception classes for error handling within the PurpleAir API wrapper.

Overview

This module defines specialized exception classes used to handle various error conditions when interacting with the PurpleAir API, including authentication failures, invalid requests, and network issues.

API Reference

Copyright 2024 carlkidcrypto, All rights reserved. A python3 class designed to fetch data from Purple Air’s new API. https://api.purpleair.com/#api-welcome

exception PurpleAirAPIError.PurpleAirAPIError(message_string)

Bases: Exception

Custom Exception for our PurpleAirAPI class.

exception PurpleAirAPIError.PurpleAirDeviceError(message_string)

Bases: PurpleAirAPIError

Custom Exception for PurpleAir device errors.

exception PurpleAirAPIError.PurpleAirDeviceOfflineError(message_string)

Bases: PurpleAirDeviceError

Custom Exception raised when a PurpleAir device/sensor is offline or unreachable on the network.