scholar_flux.exceptions package
Submodules
scholar_flux.exceptions.api_exceptions module
Implements exceptions involving the creation of requests and retrieval of responses from API Providers.
- exception scholar_flux.exceptions.api_exceptions.APIException[source]
Bases:
ExceptionBase exception for API-related errors.
- exception scholar_flux.exceptions.api_exceptions.APIParameterException[source]
Bases:
APIExceptionException raised for API Parameter-related errors.
- exception scholar_flux.exceptions.api_exceptions.InvalidResponseException(response: Response | ResponseProtocol | None = None, *args, **kwargs)[source]
Bases:
RequestFailedExceptionException raised for invalid responses from the API.
- __init__(response: Response | ResponseProtocol | None = None, *args, **kwargs)[source]
Initializes the InvalidResponseException class with a response or response-like parameter for logging.
- static extract_error_details(response: Response | ResponseProtocol) str[source]
Extracts detailed error message from response body.
- exception scholar_flux.exceptions.api_exceptions.InvalidResponseReconstructionException[source]
Bases:
InvalidResponseStructureExceptionException raised on the attempted creation of a ReconstructedResponse if an exception is encountered.
- exception scholar_flux.exceptions.api_exceptions.InvalidResponseStructureException[source]
Bases:
APIExceptionException raised on when encountering an non response/response-like object when a valid response was expected.
- exception scholar_flux.exceptions.api_exceptions.MissingAPIKeyException[source]
Bases:
ValueErrorException raised when a blank string is provided yet invalid.
- exception scholar_flux.exceptions.api_exceptions.MissingAPISpecificParameterException[source]
Bases:
ValueErrorException raised when an API specific parameter is required but not provided in the config.
- exception scholar_flux.exceptions.api_exceptions.MissingProviderException[source]
Bases:
ValueErrorException raised when an API specific parameter is required but not provided in the config.
- exception scholar_flux.exceptions.api_exceptions.MissingResponseException[source]
Bases:
ValueErrorException raised when a response or response-like objects is required but not provided.
- exception scholar_flux.exceptions.api_exceptions.NotFoundException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.api_exceptions.PermissionException[source]
Bases:
APIExceptionException raised for permission errors.
- exception scholar_flux.exceptions.api_exceptions.QueryValidationException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.api_exceptions.RateLimitExceededException[source]
Bases:
APIExceptionException raised when the API’s rate limit is exceeded.
- exception scholar_flux.exceptions.api_exceptions.RequestCacheException[source]
Bases:
APIExceptionException raised for API request-cache related errors.
- exception scholar_flux.exceptions.api_exceptions.RequestCreationException[source]
Bases:
APIExceptionException raised when the preparation of an API request fails.
- exception scholar_flux.exceptions.api_exceptions.RequestFailedException[source]
Bases:
APIExceptionException raised for failed API requests.
- exception scholar_flux.exceptions.api_exceptions.RetryLimitExceededException[source]
Bases:
APIExceptionException raised when the retry limit is exceeded.
- exception scholar_flux.exceptions.api_exceptions.SearchAPIException[source]
Bases:
APIExceptionException raised when the search api fails in retrying data from APIs .
- exception scholar_flux.exceptions.api_exceptions.SearchRequestException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.api_exceptions.TimeoutException[source]
Bases:
APIExceptionException raised for request timeouts.
scholar_flux.exceptions.coordinator_exceptions module
Implements exceptions involving the creation of coordinators, the coordination of requests, response processing, and caching.
- exception scholar_flux.exceptions.coordinator_exceptions.CoordinatorException[source]
Bases:
ExceptionBase exception for Coordinator-related errors.
- exception scholar_flux.exceptions.coordinator_exceptions.InvalidCoordinatorParameterException[source]
Bases:
CoordinatorExceptionCoordinator exception raised when attempting to set an unintended injectable class dependency as an attribute of a Coordinator or parameter to a method.
scholar_flux.exceptions.data_exceptions module
Implements exceptions for handling scenarios that could occur during the parsing, extraction, and processing of response data.
- exception scholar_flux.exceptions.data_exceptions.DataExtractionException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data extraction.
- exception scholar_flux.exceptions.data_exceptions.DataParsingException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data parsing.
- exception scholar_flux.exceptions.data_exceptions.DataProcessingException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data processing.
- exception scholar_flux.exceptions.data_exceptions.DataValidationException[source]
Bases:
DataProcessingExceptionException raised for data validation errors.
- exception scholar_flux.exceptions.data_exceptions.FieldNotFoundException[source]
Bases:
DataExtractionExceptionException raised when an expected field is not found in the data.
- exception scholar_flux.exceptions.data_exceptions.InvalidDataFormatException[source]
Bases:
DataParsingExceptionException raised for errors in the input data format.
scholar_flux.exceptions.import_exceptions module
The scholar_flux.exceptions.import_exceptions module implements exceptions for handling missing dependencies when using the scholar_flux package. Although several packages are optional, attempting to use functionality that directly depends on an uninstalled dependency should raise an error.
This package module produces the basic exceptions necessary to clearly identify when a dependency is missing.
- exception scholar_flux.exceptions.import_exceptions.CryptographyImportError[source]
Bases:
OptionalDependencyImportErrorException for cryptography Dependency Issues.
- exception scholar_flux.exceptions.import_exceptions.ItsDangerousImportError[source]
Bases:
OptionalDependencyImportErrorException for itsdangerous Dependency Issues.
- exception scholar_flux.exceptions.import_exceptions.MongoDBImportError[source]
Bases:
OptionalDependencyImportErrorException for Mongo Dependency Issues.
- exception scholar_flux.exceptions.import_exceptions.OptionalDependencyImportError(message='Optional Dependency not found')[source]
Bases:
ExceptionBase exception for Optional Dependency Issues.
- exception scholar_flux.exceptions.import_exceptions.RedisImportError[source]
Bases:
OptionalDependencyImportErrorException for missing redis backend.
- exception scholar_flux.exceptions.import_exceptions.SQLAlchemyImportError[source]
Bases:
OptionalDependencyImportErrorException for missing sql alchemy backend.
- exception scholar_flux.exceptions.import_exceptions.XMLToDictImportError[source]
Bases:
OptionalDependencyImportErrorException for xmltodict Dependency Issues.
- exception scholar_flux.exceptions.import_exceptions.YAMLImportError[source]
Bases:
OptionalDependencyImportErrorException for yaml Dependency Issues.
scholar_flux.exceptions.path_exceptions module
The scholar_flux.exceptions.path_exceptions module implements the fundamental exception types necessary to interact with various path processing utilities while accounting for any potential errors that are specific to path processing.
- exception scholar_flux.exceptions.path_exceptions.InvalidComponentTypeError[source]
Bases:
PathUtilsErrorException class raised for invalid inputs to ProcessingPath component types.
- exception scholar_flux.exceptions.path_exceptions.InvalidPathDelimiterError[source]
Bases:
InvalidProcessingPathErrorException raised for invalid delimiters used in ProcessingPath.
- exception scholar_flux.exceptions.path_exceptions.InvalidPathNodeError[source]
Bases:
PathUtilsErrorException raised for invalid operations resulting from the handling of PathNodes.
- exception scholar_flux.exceptions.path_exceptions.InvalidProcessingPathError[source]
Bases:
PathUtilsErrorException class raised for invalid operations on ProcessingPaths.
- exception scholar_flux.exceptions.path_exceptions.PathCacheError[source]
Bases:
PathUtilsErrorException raised when attempting to perform an invalid operation on path cache.
- exception scholar_flux.exceptions.path_exceptions.PathCombinationError[source]
Bases:
PathUtilsErrorException raised when performing an invalid operation during the combination of athNodes within a PathNodeIndex.
- exception scholar_flux.exceptions.path_exceptions.PathDiscoveryError[source]
Bases:
PathUtilsErrorException raised for invalid operations resulting from the handling of PathNodes.
- exception scholar_flux.exceptions.path_exceptions.PathIndexingError[source]
Bases:
InvalidProcessingPathErrorException raised when attempting to retrieve the first element of attempting ProcessingPath as a record/page index.
- exception scholar_flux.exceptions.path_exceptions.PathNodeIndexError[source]
Bases:
PathUtilsErrorException raised when performing an invalid operation on a PathNodeIndex.
- exception scholar_flux.exceptions.path_exceptions.PathNodeMapError[source]
Bases:
PathUtilsErrorException raised when attempting to perform an invalid operation a PathNodeMap.
- exception scholar_flux.exceptions.path_exceptions.PathSimplificationError[source]
Bases:
PathUtilsErrorException raised for when encountering invalid values during simplification.
- exception scholar_flux.exceptions.path_exceptions.PathUtilsError[source]
Bases:
ExceptionException class raised for invalid operations in Path Utilities.
- exception scholar_flux.exceptions.path_exceptions.RecordPathChainMapError[source]
Bases:
PathUtilsErrorException raised for invalid operations on a RecordPathChainMap.
- exception scholar_flux.exceptions.path_exceptions.RecordPathNodeMapError[source]
Bases:
PathNodeMapErrorException raised when attempting to perform an invalid operation a RecordPathNodeMap.
scholar_flux.exceptions.storage_exceptions module
Implements exceptions involving both potential edge-cases and common issues involving data and cache storage.
- exception scholar_flux.exceptions.storage_exceptions.CacheDeletionException[source]
Bases:
StorageCacheExceptionException raised when record deletion from a storage device fails.
- exception scholar_flux.exceptions.storage_exceptions.CacheRetrievalException[source]
Bases:
StorageCacheExceptionException raised when retrieval from a storage device fails.
- exception scholar_flux.exceptions.storage_exceptions.CacheUpdateException[source]
Bases:
StorageCacheExceptionException raised when updating a cache storage device fails.
- exception scholar_flux.exceptions.storage_exceptions.CacheVerificationException[source]
Bases:
StorageCacheExceptionException raised when the cache validation from a storage device fails.
- exception scholar_flux.exceptions.storage_exceptions.ConnectionFailed[source]
Bases:
StorageCacheExceptionException arising from storage connection errors.
scholar_flux.exceptions.util_exceptions module
Implements exceptions for handling edge-cases when processing JSON files using custom path processing utilities.
- exception scholar_flux.exceptions.util_exceptions.LogDirectoryError[source]
Bases:
ExceptionException class raised for errors related to the creation of the package logging directory.
- exception scholar_flux.exceptions.util_exceptions.PackageInitializationError[source]
Bases:
ExceptionException raised when the ScholarFlux package cannot be initialized due to an unexpected error.
- exception scholar_flux.exceptions.util_exceptions.SecretKeyError[source]
Bases:
ValueErrorRaised when the provided Fernet secret key is invalid.
- exception scholar_flux.exceptions.util_exceptions.SessionCacheDirectoryError[source]
Bases:
SessionCreationErrorException class raised for errors related to the creation of the package cache directory used by SessionCache.
- exception scholar_flux.exceptions.util_exceptions.SessionConfigurationError[source]
Bases:
SessionCreationErrorException class raised for invalid operations in configuration of session objects.
- exception scholar_flux.exceptions.util_exceptions.SessionCreationError[source]
Bases:
ExceptionException class raised for invalid operations in the creation of session objects.
- exception scholar_flux.exceptions.util_exceptions.SessionInitializationError[source]
Bases:
SessionCreationErrorException class raised for invalid operations in the initialization of session objects.
Module contents
The scholar_flux.exceptions module implements different types of exceptions used within the scholar_flux package with customized exceptions with applications to client setup, API retrieval, API processing, and caching.
- Modules:
api_exceptions: Exceptions crafted for unforeseen issues in API client creation and errors in response retrieval data_exceptions: Exceptions that could occur during the parsing, extraction, and processing of response data util_exceptions: Exceptions used in the creation of utilities used throughout the module coordinator_exceptions: Exceptions revolving around the coordination of requests, response processing and caching storage_exceptions: Exceptions involving potential and common issues involving storage path_exceptions: Exceptions for edge-cases when processing JSON files using custom path processing utilities import_exceptions: Exceptions for handling missing dependencies
- exception scholar_flux.exceptions.APIException[source]
Bases:
ExceptionBase exception for API-related errors.
- exception scholar_flux.exceptions.APIParameterException[source]
Bases:
APIExceptionException raised for API Parameter-related errors.
- exception scholar_flux.exceptions.CacheDeletionException[source]
Bases:
StorageCacheExceptionException raised when record deletion from a storage device fails.
- exception scholar_flux.exceptions.CacheRetrievalException[source]
Bases:
StorageCacheExceptionException raised when retrieval from a storage device fails.
- exception scholar_flux.exceptions.CacheUpdateException[source]
Bases:
StorageCacheExceptionException raised when updating a cache storage device fails.
- exception scholar_flux.exceptions.CacheVerificationException[source]
Bases:
StorageCacheExceptionException raised when the cache validation from a storage device fails.
- exception scholar_flux.exceptions.CoordinatorException[source]
Bases:
ExceptionBase exception for Coordinator-related errors.
- exception scholar_flux.exceptions.CryptographyImportError[source]
Bases:
OptionalDependencyImportErrorException for cryptography Dependency Issues.
- exception scholar_flux.exceptions.DataExtractionException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data extraction.
- exception scholar_flux.exceptions.DataParsingException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data parsing.
- exception scholar_flux.exceptions.DataProcessingException[source]
Bases:
ResponseProcessingExceptionBase exception for errors that occur during data processing.
- exception scholar_flux.exceptions.DataValidationException[source]
Bases:
DataProcessingExceptionException raised for data validation errors.
- exception scholar_flux.exceptions.FieldNotFoundException[source]
Bases:
DataExtractionExceptionException raised when an expected field is not found in the data.
- exception scholar_flux.exceptions.InvalidComponentTypeError[source]
Bases:
PathUtilsErrorException class raised for invalid inputs to ProcessingPath component types.
- exception scholar_flux.exceptions.InvalidCoordinatorParameterException[source]
Bases:
CoordinatorExceptionCoordinator exception raised when attempting to set an unintended injectable class dependency as an attribute of a Coordinator or parameter to a method.
- exception scholar_flux.exceptions.InvalidDataFormatException[source]
Bases:
DataParsingExceptionException raised for errors in the input data format.
- exception scholar_flux.exceptions.InvalidPathDelimiterError[source]
Bases:
InvalidProcessingPathErrorException raised for invalid delimiters used in ProcessingPath.
- exception scholar_flux.exceptions.InvalidPathNodeError[source]
Bases:
PathUtilsErrorException raised for invalid operations resulting from the handling of PathNodes.
- exception scholar_flux.exceptions.InvalidProcessingPathError[source]
Bases:
PathUtilsErrorException class raised for invalid operations on ProcessingPaths.
- exception scholar_flux.exceptions.InvalidResponseException(response: Response | ResponseProtocol | None = None, *args, **kwargs)[source]
Bases:
RequestFailedExceptionException raised for invalid responses from the API.
- __init__(response: Response | ResponseProtocol | None = None, *args, **kwargs)[source]
Initializes the InvalidResponseException class with a response or response-like parameter for logging.
- static extract_error_details(response: Response | ResponseProtocol) str[source]
Extracts detailed error message from response body.
- exception scholar_flux.exceptions.InvalidResponseReconstructionException[source]
Bases:
InvalidResponseStructureExceptionException raised on the attempted creation of a ReconstructedResponse if an exception is encountered.
- exception scholar_flux.exceptions.InvalidResponseStructureException[source]
Bases:
APIExceptionException raised on when encountering an non response/response-like object when a valid response was expected.
- exception scholar_flux.exceptions.ItsDangerousImportError[source]
Bases:
OptionalDependencyImportErrorException for itsdangerous Dependency Issues.
- exception scholar_flux.exceptions.KeyNotFound[source]
Bases:
KeyErrorException resulting from a missing or empty key being provided.
- exception scholar_flux.exceptions.LogDirectoryError[source]
Bases:
ExceptionException class raised for errors related to the creation of the package logging directory.
- exception scholar_flux.exceptions.MissingAPIKeyException[source]
Bases:
ValueErrorException raised when a blank string is provided yet invalid.
- exception scholar_flux.exceptions.MissingAPISpecificParameterException[source]
Bases:
ValueErrorException raised when an API specific parameter is required but not provided in the config.
- exception scholar_flux.exceptions.MissingProviderException[source]
Bases:
ValueErrorException raised when an API specific parameter is required but not provided in the config.
- exception scholar_flux.exceptions.MissingResponseException[source]
Bases:
ValueErrorException raised when a response or response-like objects is required but not provided.
- exception scholar_flux.exceptions.MongoDBImportError[source]
Bases:
OptionalDependencyImportErrorException for Mongo Dependency Issues.
- exception scholar_flux.exceptions.NotFoundException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.OptionalDependencyImportError(message='Optional Dependency not found')[source]
Bases:
ExceptionBase exception for Optional Dependency Issues.
- exception scholar_flux.exceptions.PackageInitializationError[source]
Bases:
ExceptionException raised when the ScholarFlux package cannot be initialized due to an unexpected error.
- exception scholar_flux.exceptions.PathCacheError[source]
Bases:
PathUtilsErrorException raised when attempting to perform an invalid operation on path cache.
- exception scholar_flux.exceptions.PathCombinationError[source]
Bases:
PathUtilsErrorException raised when performing an invalid operation during the combination of athNodes within a PathNodeIndex.
- exception scholar_flux.exceptions.PathDiscoveryError[source]
Bases:
PathUtilsErrorException raised for invalid operations resulting from the handling of PathNodes.
- exception scholar_flux.exceptions.PathIndexingError[source]
Bases:
InvalidProcessingPathErrorException raised when attempting to retrieve the first element of attempting ProcessingPath as a record/page index.
- exception scholar_flux.exceptions.PathNodeIndexError[source]
Bases:
PathUtilsErrorException raised when performing an invalid operation on a PathNodeIndex.
- exception scholar_flux.exceptions.PathNodeMapError[source]
Bases:
PathUtilsErrorException raised when attempting to perform an invalid operation a PathNodeMap.
- exception scholar_flux.exceptions.PathSimplificationError[source]
Bases:
PathUtilsErrorException raised for when encountering invalid values during simplification.
- exception scholar_flux.exceptions.PathUtilsError[source]
Bases:
ExceptionException class raised for invalid operations in Path Utilities.
- exception scholar_flux.exceptions.PermissionException[source]
Bases:
APIExceptionException raised for permission errors.
- exception scholar_flux.exceptions.QueryValidationException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.RateLimitExceededException[source]
Bases:
APIExceptionException raised when the API’s rate limit is exceeded.
- exception scholar_flux.exceptions.RecordPathChainMapError[source]
Bases:
PathUtilsErrorException raised for invalid operations on a RecordPathChainMap.
- exception scholar_flux.exceptions.RecordPathNodeMapError[source]
Bases:
PathNodeMapErrorException raised when attempting to perform an invalid operation a RecordPathNodeMap.
- exception scholar_flux.exceptions.RedisImportError[source]
Bases:
OptionalDependencyImportErrorException for missing redis backend.
- exception scholar_flux.exceptions.RequestCacheException[source]
Bases:
APIExceptionException raised for API request-cache related errors.
- exception scholar_flux.exceptions.RequestCreationException[source]
Bases:
APIExceptionException raised when the preparation of an API request fails.
- exception scholar_flux.exceptions.RequestFailedException[source]
Bases:
APIExceptionException raised for failed API requests.
- exception scholar_flux.exceptions.ResponseProcessingException[source]
Bases:
ExceptionBase Exception for handling errors in response parsing and processing.
- exception scholar_flux.exceptions.RetryLimitExceededException[source]
Bases:
APIExceptionException raised when the retry limit is exceeded.
- exception scholar_flux.exceptions.SQLAlchemyImportError[source]
Bases:
OptionalDependencyImportErrorException for missing sql alchemy backend.
- exception scholar_flux.exceptions.SearchAPIException[source]
Bases:
APIExceptionException raised when the search api fails in retrying data from APIs .
- exception scholar_flux.exceptions.SearchRequestException[source]
Bases:
APIExceptionException raised when a requested resource is not found.
- exception scholar_flux.exceptions.SecretKeyError[source]
Bases:
ValueErrorRaised when the provided Fernet secret key is invalid.
- exception scholar_flux.exceptions.SessionCacheDirectoryError[source]
Bases:
SessionCreationErrorException class raised for errors related to the creation of the package cache directory used by SessionCache.
- exception scholar_flux.exceptions.SessionConfigurationError[source]
Bases:
SessionCreationErrorException class raised for invalid operations in configuration of session objects.
- exception scholar_flux.exceptions.SessionCreationError[source]
Bases:
ExceptionException class raised for invalid operations in the creation of session objects.
- exception scholar_flux.exceptions.SessionInitializationError[source]
Bases:
SessionCreationErrorException class raised for invalid operations in the initialization of session objects.
- exception scholar_flux.exceptions.StorageCacheException[source]
Bases:
ExceptionBase exception for Storage Issues.
- exception scholar_flux.exceptions.TimeoutException[source]
Bases:
APIExceptionException raised for request timeouts.
- exception scholar_flux.exceptions.XMLToDictImportError[source]
Bases:
OptionalDependencyImportErrorException for xmltodict Dependency Issues.
- exception scholar_flux.exceptions.YAMLImportError[source]
Bases:
OptionalDependencyImportErrorException for yaml Dependency Issues.