Skip to content

Python package for logging output, timing processes and counting iterations

License

Notifications You must be signed in to change notification settings

sfneal/looptools

Repository files navigation

Loop Tools

Build Status PyPi version PyPi Python support PyPi downloads per month PyPi license StyleCI Scrutinizer Code Quality

looptools is a Python package with helper utility classes for logging output, timing processes and counting iterations.

Almost every Python project involves some form of logging, timing and counting. Loop Tools provides a lightweight package for handling these needs without rewriting similar snippets for multiple projects.

How it works

Loop Tools is built entirely with Python builtins so it has no external dependencies. The Counter class uses simply math as well as the option to add leading zeros to integers. The LogOut class created a '_logs' folder and saves a text file with the current date as its filename to capture console output or any other text. The Timer class records start time and returns the elapsed time in either seconds or minutes upon end method call.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Upgrade to the latest version of pip

pip install --upgrade pip

Installing

Install the latest version of looptools from PyPi or github

PyPi distribution

pip install looptools

GitHub distribution

pip install git+git://github.com/sfneal/looptools.git

or

pip install git+https://github.com/sfneal/looptools.git

Example Usage

Outlined below are basic uses of the four main classes of the Loop Tools python package.

  • Counter - Counts number of iterations in a process
  • LogOutput - Save logged output to a text file
  • Timer - Get time elapsed during a process

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Python package for logging output, timing processes and counting iterations

Resources

License

Stars

Watchers

Forks

Packages

No packages published