A collection of Python enhancements for better development experience
Project description
Enhancement
A collection of Python utilities and enhancements for better development experience.
Installation
pip install enhancement
Features
This package provides several utility modules to enhance your Python development experience:
cache_result: Caching utilities for function resultsiterable: Enhanced iterable operationstimeit: Timing utilities for performance measurementndict: Enhanced dictionary operationssingleton: Singleton pattern implementationsafe_get: Safe attribute and item access utilities
Usage
Cache Result
from enhancement.cache_result import cache_result
@cache_result
def expensive_computation(x):
# Result will be cached
return x ** 2
Timing Utilities
from enhancement.timeit import timeit
@timeit
def my_function():
# Function execution time will be measured
pass
Safe Get
from enhancement.safe_get import safe_get
data = {"a": {"b": {"c": 1}}}
value = safe_get(data, "a.b.c") # Returns 1
value = safe_get(data, "a.b.d") # Returns None
Requirements
- Python 3.11+
- exchange-calendars >= 4.10
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Harry Zhang (HarryZhang0415@gmail.com)
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 enhancement-0.1.0.tar.gz.
File metadata
- Download URL: enhancement-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3eb351bb9b558a5d3683f8bcadfffd440c82d2baa87ac9c07f314ab5f49e4f
|
|
| MD5 |
dbcdbd119c65d760e2a45112c791b0fd
|
|
| BLAKE2b-256 |
573a3165ba96bd1362cdb55116ba21c8ef21dd31207817c7e08b250fcad612ae
|
File details
Details for the file enhancement-0.1.0-py3-none-any.whl.
File metadata
- Download URL: enhancement-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
602e3c56565a532325fd56af4ed7eb0ce96044edcf344c8ff31ee79b6baa960a
|
|
| MD5 |
08faa9622188f80c937270d18b98eefd
|
|
| BLAKE2b-256 |
c6b6b298cd336679ca2c0ba2f006b0662f1236b28ddfa34dce18bf4aa23ed5ef
|