GithubHelp home page GithubHelp logo

christopherhaydentodd / ctodd-python-lib-execution Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 17 KB

Christopher Todd's Python Library For Dealing With Execution Helpers

License: MIT License

Shell 33.22% Python 66.78%

ctodd-python-lib-execution's Introduction

Christopher H. Todd's Python Library For Wrapping Callable Execution

The ctodd-python-lib-execution project is responsible for warpping callables in Python to wrap in function logging, execution time, and other quality of life improvements. Useful for wrapping functions with start and stop timers.

Table of Contents

Dependencies

Python Packages

  • wrapt>=1.11.1

Libraries

Library for Logging the Execution Details of any callable or the main() function of a script.

Functions:

def main_executor(wrapped, instance, args, kwargs):
    """
    Purpose:
        Decorator for running the main() function. Decorator will
        log the start and completion of the script, time the
        execution and performance of the script, and handle
        and exceptions (log the exception to the log file and raise)
    Args:
        wrapped (main function):
        instance: pass in self when wrapping class method.
            default is None when wrapping function.
        args (Tuple): List of arguments
        kwargs (Dict): Dictionary of named arguments
    """

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

ctodd-python-lib-execution's People

Contributors

christopherhaydentodd avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.