A collection of utility functions for Python
Project description
pyutils
A collection of utility functions for Python.
Installation
pip install pyutils-demo
Usage
String Utilities
from pyutils import reverse_string, to_camel_case, count_words
reverse_string('hello') # 'olleh'
to_camel_case('hello_world') # 'helloWorld'
count_words('Hello World') # 2
Date Utilities
from pyutils import format_datetime, days_ago, is_weekend
format_datetime() # '2024-01-01 12:00:00'
days_ago(7) # datetime object 7 days ago
is_weekend() # True/False
File Utilities
from pyutils import read_file, write_file, read_json
write_file('test.txt', 'Hello')
read_file('test.txt') # 'Hello'
read_json('data.json') # {'key': 'value'}
Math Utilities
from pyutils import add, multiply, average, is_prime
add(2, 3) # 5
average([1, 2, 3]) # 2.0
is_prime(17) # True
License
MIT
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
pyutils_demo-1.0.0.tar.gz
(4.3 kB
view details)
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 pyutils_demo-1.0.0.tar.gz.
File metadata
- Download URL: pyutils_demo-1.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c84102f0a01627eb32a0c843ddc077b6db7a88c03292cadde1175a0567e122c
|
|
| MD5 |
b3a5bab4d0ce1133a7948ae3fb584a80
|
|
| BLAKE2b-256 |
7d9299565441fe081fd8b1d951b23c1a5375b517f483ffa88c9f68a96948386e
|
File details
Details for the file pyutils_demo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyutils_demo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ebedf8f5657792f5ce0c5c4f2eac1d2ccb88e34a6af09171fba24807aadada
|
|
| MD5 |
93692597b3ef6cebf4e87ee29029f49f
|
|
| BLAKE2b-256 |
d486ee5ae3ec7fd551449bb44bf0593dd784eb56d2d8e1feac570bd9bbcc5ead
|