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 and Docs 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.
Metadata
Release files for utlib 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| utlib-0.3.4.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| utlib-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.8 kB
Release files / utlib-0.3.4.tar.gz
| Download URL | utlib-0.3.4.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1bbdb3fb4679bb13321a68f6a90c7366539de2d0bb92e93fbf38176ad673c04
|
|
BLAKE2b-256 checksum How to use checksums |
4575de3250cf52fd42182dbad79a47eb8daf6f2c7a421687ac2433e1ec7a571b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.17
|
Release files / utlib-0.3.4-py3-none-any.whl
| Download URL | utlib-0.3.4-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c626ff1317b4d1bb287962b1144c25863a0fded8e41b9de4af7f9accbf3a494d
|
|
BLAKE2b-256 checksum How to use checksums |
4dcf72b4aa194d7e8051c358b7f1ca844dd3a39e4fde5b65890f796ef8694007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.17
|