loveday2002 / urban-chainsaw

test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toolbox

Toolbox is a Python package that contains handy functions. It's main goal, however, is to demonstrate how to create a package

Installation and updating

Use the package manager pip to install Toolbox like below. Rerun this command to check for and install updates .

pip install git+https://github.com/loveday2002/urban-chainsaw

Usage

Features:

  • functions.listChunker --> generator that chunks and interable in evenly sized chunks
  • functions.weirdCase --> converts a string to a totally unreadable format
  • functions.report --> prints to the console with a timestamp
  • decorators.singleton --> used for decoratint your class to make it a singleton

Demo of some of the features:

import toolbox
from toolbox import report

message = toolbox.functions.weirdCase("The toolbox package is ready for use")
report(message)

list_of_numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
for chunk in toolbox.functions.listChunker(lst=list_of_numbers, dsize=3):
    print(chunk)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

test

License:MIT License


Languages

Language:Python 100.0%