Normal python class tasks like sorting, closet/furthest value, dublicates, ...
Project description
easy_taks
To not get annoyed by simple recurring tasks I created this small library.
Content
-
Installation
-
Usage
Installation
-
pip install easy-tasks -
You will need to install to_precision from github to use all the percentage stuff. For this visit https://github.com/BebeSparkelSparkel/to-precision, go to the latest release, which might be https://github.com/BebeSparkelSparkel/to-precision/releases/tag/0.0.1, and download the .tar.gz. With
pip install <path to .tar.gz>you can finish your installation.
Usage
-
furthest_value_in_listFunction returning the closest number of a list to a given value
-
closest_value_in_listFunction returning the closest number of a list to a given value
-
furthest_value_in_dictFunction returning the closest number of a dicts values to a given value
-
closest_value_in_dictFunction returning the closest number of a dicts values to a given value
-
find_dublicatesFunction returning a list of Dubs objects which have the properties: value, number_of_dublicates and indices
-
remove_dublicatesFunction returning a copy of the given list in which only the first occurrence of every value remains
-
get_percentage_as_fitted_stringFunction returning the calculated percentage from the inout count and total fittet to the string lenght of 100.00 %
args:
-
count: current counting value
-
total: total value
-
round_to: rounding digits, default: 2
-
with_percentage_symbol: boolean, adds ' %' if True
-
-
progress_printerBetter use ProgressBar instead
Call this funciton in a loop with index+1 as count to monitor your progress.
Will automatically switch to a new line when 100 % is reached.
Remember to call print once if you break since the cursor will not move to the next line till 100 % are reached.
-
main_and_sub_progress_printerBasically the progress_printer with one susbprocess.
-
upper_case_first_letter_of_wordFunction returning a string in which the word begins with an upper case letter.
-
upper_case_first_letter_of_wordsFunction returning a string in which every word begins with an upper case letter.
-
unpack_listDissolve inner lists and tuples of nested list and tuples.
-
ProgressBarCreate progress bar with poossible subprogresses, exception handling, early termination handling, early completion handling and many options for customization.
Simply use as
with ProgressBar(total) as prg:and look at the class parameters and methods.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_tasks-0.0.57.tar.gz.
File metadata
- Download URL: easy_tasks-0.0.57.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edd7fe17ec0323a03cb01915483b10a1a5abde7ce77f190e26d767aad8423e07
|
|
| MD5 |
b046623fe88d3608e5d49f04982efc70
|
|
| BLAKE2b-256 |
97bc900ed07993731fbed8ece5ad3f7bb67d0e5103bfaebc088420070846252b
|
File details
Details for the file easy_tasks-0.0.57-py3-none-any.whl.
File metadata
- Download URL: easy_tasks-0.0.57-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8114bd47844896119092b17ff0fd6c9f7727f1969dcbf5452dd670a1450244e5
|
|
| MD5 |
7338a331d4324893a13c8874e85100aa
|
|
| BLAKE2b-256 |
bc54e2d8c39acd84a1f843feb848cf4ff64dbbc63ee333902dad75a9626d414d
|