A comprehensive Python utility library for general-purpose and specialised tasks
Project description
pygenutils
pygenutils is a comprehensive Python utilities package designed to provide a wide range of general-purpose tools for data manipulation, string handling, time operations, and system interactions. It serves as a collection of commonly needed utilities for Python development.
Features
- String Operations:
- Advanced string manipulation
- Text formatting and parsing
- String pattern matching
- Text transformation utilities
- Time Handling:
- Date and time calculations
- Calendar operations
- Time formatting
- Program execution timing
- Countdown functionality
- Data Structures:
- Array and list manipulation
- Data pattern matching
- Mathematical operations
- Data conversion utilities
- System Operations:
- Operating system interactions
- Process management
- System information retrieval
- Audio and Video:
- Media file handling
- Format conversion utilities
- Number Systems:
- Base conversion utilities
- Number system operations
- Set Operations:
- Interval handling
- Set manipulation
- Dictionary Operations:
- Dictionary manipulation
- Key-value operations
Installation Guide
Dependency Notice
This package has minimal external dependencies and is designed to be lightweight. Most functionality works with Python's standard library.
Installation Instructions
Install the package using pip:
pip install pygenutils
Package Updates
To stay up-to-date with the latest version of this package, simply run:
pip install --upgrade pygenutils
Project Structure
The package is organised into several specialised modules:
-
strings/: String manipulation utilities
string_handler.py: Core string operationstext_formatters.py: Text formatting utilities
-
time_handling/: Time and date operations
date_and_time_utils.py: Date/time calculationstime_formatters.py: Time formattingcalendar_utils.py: Calendar operationsprogram_snippet_exec_timers.py: Execution timingcountdown.py: Countdown functionality
-
arrays_and_lists/: Data structure operations
data_manipulation.py: Data handlingpatterns.py: Pattern matchingconversions.py: Data conversionmaths.py: Mathematical operations
-
operative_systems/: System operations
- System interaction utilities
- Process management tools
-
audio_and_video/: Media handling
- Media file operations
- Format conversion
-
number_bases/: Number system operations
- Base conversion utilities
-
sets_and_intervals/: Set operations
- Interval handling
- Set manipulation
-
dictionaries/: Dictionary operations
- Dictionary manipulation tools
For detailed version history and changes, please refer to:
CHANGELOG.md: Comprehensive list of changes for each versionVERSIONING.md: Versioning policy and guidelines
Usage Examples
String Operations
from pygenutils.strings import string_handler, text_formatters
# String manipulation
modified_str = string_handler.modify_obj_specs("example.txt", "new")
formatted_text = text_formatters.print_format_string("Hello, {name}!", name="World")
Time Operations
from pygenutils.time_handling import date_and_time_utils, time_formatters
# Date calculations
next_week = date_and_time_utils.add_days_to_date("2024-03-20", 7)
formatted_time = time_formatters.format_time_string("14:30:00", "HH:MM")
Array Operations
from pygenutils.arrays_and_lists import data_manipulation, patterns
# Data manipulation
processed_data = data_manipulation.process_array([1, 2, 3, 4, 5])
matched_pattern = patterns.find_pattern([1, 2, 3, 1, 2, 3], [1, 2, 3])
Best Practices
-
Module Organisation:
- Use appropriate sub-packages for related functionality
- Keep utility functions focused and single-purpose
- Document all public functions and classes
-
Performance Considerations:
- Optimise frequently used operations
- Use appropriate data structures
- Consider memory usage for large operations
-
Error Handling:
- Implement proper error checking
- Provide meaningful error messages
- Handle edge cases appropriately
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 pygenutils-15.12.0.tar.gz.
File metadata
- Download URL: pygenutils-15.12.0.tar.gz
- Upload date:
- Size: 72.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0297f4e68949c7eb7c39498cf0aa86ca70d81bd4a9652ca86e28638928b7bc4
|
|
| MD5 |
e3ffabee53d396c35d907ef0f2ec181a
|
|
| BLAKE2b-256 |
095b80c438ee827b6644cfc05a1d6a1c2eeb21db20c83613fe33a3b32911aab7
|
File details
Details for the file pygenutils-15.12.0-py3-none-any.whl.
File metadata
- Download URL: pygenutils-15.12.0-py3-none-any.whl
- Upload date:
- Size: 86.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2efa78c33ef457baaae2514307815e74aea7d3a1ac20b0c9c2abeca2c18dd98
|
|
| MD5 |
b2a5c73c14d68cee5f5412517599912d
|
|
| BLAKE2b-256 |
fe0766307a44f5af635af42be0cac130356c87f472cf032ef0d3d1d747607ce7
|