Lightweight developer utilities
Project description
DevUtils Lite
Lightweight and useful utilities for Python developers.
Installation
pip install devutils-lite
Features
- Timer decorator
- Retry decorator
- Email validation
- Slug generator
- List chunking utility
Usage
1. Timer Decorator
Measure function execution time.
Example:
from devutils_lite import timer
import time
@timer
def slow_function():
time.sleep(1)
slow_function()
2. Retry Decorator
Retry a function if it fails.
Example:
from devutils_lite import retry
counter = 0
@retry(attempts=3)
def unstable():
global counter
counter += 1
if counter < 3:
raise ValueError("Temporary error")
return "Success"
unstable()
3. Email Validation
from devutils_lite import validate_email
validate_email("user@example.com") # True
validate_email("invalid-email") # False
4. Slugify
from devutils_lite import slugify
slugify("Hello World!")
# Output: hello-world
5. Chunk List
from devutils_lite import chunk_list
chunk_list([1,2,3,4,5], 2)
# Output: [[1,2], [3,4], [5]]
Requirements
Python >= 3.8
License
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
devutils_lite-0.1.0.tar.gz
(3.8 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 devutils_lite-0.1.0.tar.gz.
File metadata
- Download URL: devutils_lite-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9c763f5e5487a3a561b4b25899351dc5028872e09d1ad1256b3f86424eae9d9
|
|
| MD5 |
e06a6ae11e772b8bb645f587a89ce5c2
|
|
| BLAKE2b-256 |
387dea271c75bfd451830dafdcfa745a2d2ff9ad14a6953c8fd073277b99b742
|
File details
Details for the file devutils_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: devutils_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aac57fa004168b6642b3b6c3bdc4995df8cae3213d639ed80092a320c83b473
|
|
| MD5 |
b35d624c2f1d4553b500d1f9e6605e21
|
|
| BLAKE2b-256 |
79a0c1c9ee5c13c05eb51e49e874c79444510826874367a6d286a6e406179dd3
|