Skip to main content

Christopher H. Todd's PROJECT_STRING_NAME

The PROJECT_GIT_NAME project is responsible for ...

The library ...

Table of Contents

Dependencies

Python Packages

  • N/A

Libraries

create_exceptions.py

Exception Helpers. This file shows exception types in Python and function calls for generating specific exceptions. This can be useful for unittesting, debugging, and other tasks that might call for purposefully breaking parts of your code.

Functions:

def create_and_throw_exception(exception_name=None):
    """
        Purpose:
            Create and Throw an exception from the exception
            types in the file. if exception_name is passed in,
            throw that specific exception if it has been
            coded in the library
        Args:
            exception_name (String ExceptionType): Type of exception
                to throw
        Returns:
            N/A: should never return, should always raise
    """
def create_zero_division_exception():
    """
        Purpose:
            Throw ZeroDivisionError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_overflow_exception():
    """
        Purpose:
            Throw OverflowError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_type_exception():
    """
        Purpose:
            Throw TypeError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_assertion_exception():
    """
        Purpose:
            Throw AssertionError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_attribute_exception():
    """
        Purpose:
            Throw AttributeError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_name_exception():
    """
        Purpose:
            Throw NameError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_index_exception():
    """
        Purpose:
            Throw IndexError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_key_exception():
    """
        Purpose:
            Throw KeyError Exception
        Args:
            N/A
        Returns:
            N/A
    """
def create_unbound_local_exception():
    """
        Purpose:
            Throw UnboundLocalError Exception
        Args:
            N/A
        Returns:
            N/A
    """

unsupported_exception.py

UnsupportedException Class. Currently Does Nothing, but allows for sepcific callouts of failures in create_exceptions

Classes:

class UnsupportedException(Exception):
    """
    Purpose:
        An Unsupported Exception is raised when the lib is asked to try
        and raise an exception that has yet to be programmed. this way,
        som exception is raised, but it can be handled in a way that
        knows the specified exception isn't raised
    """

Example Scripts

Example executable Python scripts/modules for testing and interacting with the library. These show example use-cases for the libraries and can be used as templates for developing with the libraries or to use as one-off development efforts.

N/A

Notes

  • Relies on f-string notation, which is limited to Python3.6. A refactor to remove these could allow for development with Python3.0.x through 3.5.x

TODO

  • Unittest framework in place, but lacking tests

Metadata

Release files for ctodd-python-lib-exceptions 1.0.0

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

Source distribution (sdist)

Source distribution for ctodd-python-lib-exceptions 1.0.0
File Size Uploaded
ctodd-python-lib-exceptions-1.0.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ctodd-python-lib-exceptions 1.0.0
File Interpreter ABI Platform
ctodd_python_lib_exceptions-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / ctodd-python-lib-exceptions-1.0.0.tar.gz

Download URL ctodd-python-lib-exceptions-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0fdf500f3499ed1d49740591f8e1337e0506f81356f5750c3d87c1def74cf853
BLAKE2b-256 checksum
How to use checksums
9eca53ba7de1763ac0527cef926cd7fec3982037448552ac82e6346e80b92f09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release files / ctodd_python_lib_exceptions-1.0.0-py3-none-any.whl

Download URL ctodd_python_lib_exceptions-1.0.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08e3f331b62a577acb3566cdaa4574fa25c9a0a1c826070c6ef55affea94f454
BLAKE2b-256 checksum
How to use checksums
575138adf14e77e52afc727c3e4d0c978131384c60097b198847abb352f831d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

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