A utility library that contains useful functions, decorators and more
Project description
Utlib - Utility Library
utlib is a lightweight and customizable utility library designed to simplify everyday Python programming.
Created by Myroslav Repin, the project is in active development and will continue to grow with new features and improvements.
✨ Current Features
-
digit_sum(n)- Returns the sum of all digits in an integer.
- Example:
digit_sum(1234)→10
-
is_palindrome(text)- Checks if a given string is a palindrome (reads the same forwards and backwards).
- Example:
is_palindrome("level")→True
-
vowels(lang='eng', consonants=False)- Returns the list of vowels of supported languages including: English (eng), Russian (ru), Spanish (es), French (fr), German (de)
- Using secong parametr of the function you can select which list you want to return: vowels or consonants
-
average_value(values, decimal, get_nearest_value)-
Returns the average of a list of numbers, rounded to the given decimal places.
-
Can return nearest value from the list to average
-
Currently
average_value()is supporting floats -
Example:
average_value([1, 2, 3, 4, 5], 2) # → 3.00 average_value([1, 2, 3, 4, 5], 5) # → 3.00000
-
-
remove_vowels(text, lang, consonants)- Returns the string without vowels
- Using
consonants=Truefunction return string with vowels only - Function returning now lower case only
langby default is eng, supporting languages: eng, ru, fr, es, de
-
count_words(text, min_lenght, max_lenght)- Number of words in
textwith length greater than or equal tomin_lenght. - Now supporting
max_lenghtas an atribute. text— input string.min_lenght— minimum word length (integer).
- Number of words in
-
get_size(path)- Returns the size of a file or directory
🚧 Planned Features
- Advanced math helpers
- Filtering tools
- Custom data structures
- Useful decorators and wrappers
- Useful function
📦 Installation
To install the latest version from PyPI, use:
pip install utlib
📄 Documentation
Official documentation is coming soon. For now, explore the source code and README to understand available functionality.
If you have any ideas or requests for the documentation, feel free to share!
💌 Feedback & Contact
If you find a bug or want to request a feature:
📧 Email: myroslavrepin@gmail.com 📁 GitHub: github.com/MyroslavRepin/utlib
📌 License
This project is licensed under the MIT License.
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 utlib-0.3.3.tar.gz.
File metadata
- Download URL: utlib-0.3.3.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e93ee29cd8d46de648a275855dc9fbb1884e9d5a68a1c41ed3dc3727f35eb5c
|
|
| MD5 |
492435aed7c8d4fc2073ed34c1407b48
|
|
| BLAKE2b-256 |
324d5731e74b93d426715713c388af4bcc0d52f495f7aec1c8500d774f23122c
|
File details
Details for the file utlib-0.3.3-py3-none-any.whl.
File metadata
- Download URL: utlib-0.3.3-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e175ebf4eeba746b1d580b231908bcc3d07a6e6cecaad756fc2d1fe5aa28a869
|
|
| MD5 |
5a9c429f56e4462a317cbe649a296e59
|
|
| BLAKE2b-256 |
1df91fbd8c2b3c35795c7f0a0d2e2b39ff7043df57e2215498d07a6d8f522ae6
|