Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Utils 18

python-utils-18 is a collection of handy utility functions and classes designed to streamline Python development. Perfect for both newcomers and seasoned developers, this toolkit simplifies common programming tasks, enhancing productivity and code readability.

Features

  • File Manipulation: Quickly read, write, and parse files with robust error handling and logging.
  • Data Validation: Easily validate and sanitize input data types and structures, including dictionaries and lists.
  • Date and Time Handling: Simplify working with dates and times, including timezone conversions and formatting.
  • Performance Monitoring: Built-in decorators for measuring the execution time of functions, helping you optimize your code.

Installation

To install python-utils-18, you can clone the repository or install it directly from PyPI. Here are the commands:

git clone https://github.com/Developer/python-utils-18.git
cd python-utils-18
pip install .

Alternatively, you can use pip:

pip install python-utils-18

Basic Usage Example

Here is a quick example of how to utilize some of the features in python-utils-18:

from utils.file_manager import read_file
from utils.data_validator import validate_json
from utils.date_helper import format_date
from utils.performance import measure_time

# Read and validate a JSON file
file_path = 'data.json'
data = read_file(file_path)

if validate_json(data):
    print("Valid JSON data.")
else:
    print("Invalid JSON format.")

# Format and display the current date
current_date = format_date(date.today())
print(f"Today's date is: {current_date}")

# Measure execution time of a sample function
@measure_time
def sample_function():
    # some time-consuming operations
    pass

License

License: MIT


For support and contributions, please feel free to open issues or pull requests in the repository. Happy coding!

About

Performance and utility tools for general

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages