The pylity
package is a set of utility and common functions for Python.
pylity means Python Utility
.
When we work on different projects, there are usually functions that are common between the projects. Functions that we generally call Utility or helpers or something like that. Functions that are independent and can be used in different places.
Well, instead of copying and pasting these functions in a new project every time, it is better to have a package that gathers all these together so that we can install and use them easily. This is the goal of this project. :)
Use pip to install package:
pip install pylity --upgrade
Please note that this package uses on_rails package for most functions. on_rails
is an easy and valuable package for better error management. If you are not familiar with this package, you should read its documentation.
A set of different functions are grouped into related classes. Import any class you want, then use the functions. For example:
from pylity import Function
Function.is_func_valid(lambda: None) # returns True
Function.get_num_of_params(lambda a, b, c: None) \
.on_success(lambda num_of_params: print(f"Number of parameters is: {num_of_params}")) \
.on_fail(lambda result: print(f"An error occurred:\n{result}"))
Please see the CHANGELOG file.
See the open issues for a list of proposed features (and known issues).
- Top Feature Requests ( Add your votes using the 👍 reaction)
- Top Bugs ( Add your votes using the 👍 reaction)
- Newest Bugs
Reach out to the maintainer at one of the following places:
If you want to say thank you or/and support active development of pylity:
- Add a GitHub Star to the project.
- Tweet about the pylity.
- Write interesting articles about the project on Dev.to, Medium or your personal blog.
Together, we can make pylity better!
First off, thanks for taking the time to contribute! Contributions are what make the free/open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.
Please read our contribution guidelines, and thank you for being involved!
The original setup of this repository is by Payadel.
For a full list of all authors and contributors, see the contributors page.
pylity
follows good practices of security, but 100% security cannot be assured. pylity
is provided "as
is" without any warranty.
For more information and to report security issues, please refer to our security documentation.
This project is licensed under the GPLv3.
See LICENSE for more information.