Skip to main content

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 results
  • iterable: Enhanced iterable operations
  • timeit: Timing utilities for performance measurement
  • ndict: Enhanced dictionary operations
  • singleton: Singleton pattern implementation
  • safe_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enhancement-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enhancement-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

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

Hashes for enhancement-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff3eb351bb9b558a5d3683f8bcadfffd440c82d2baa87ac9c07f314ab5f49e4f
MD5 dbcdbd119c65d760e2a45112c791b0fd
BLAKE2b-256 573a3165ba96bd1362cdb55116ba21c8ef21dd31207817c7e08b250fcad612ae

See more details on using hashes here.

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

Hashes for enhancement-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 602e3c56565a532325fd56af4ed7eb0ce96044edcf344c8ff31ee79b6baa960a
MD5 08faa9622188f80c937270d18b98eefd
BLAKE2b-256 c6b6b298cd336679ca2c0ba2f006b0662f1236b28ddfa34dce18bf4aa23ed5ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page