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.2.0.tar.gz (12.4 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.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file enhancement-0.2.0.tar.gz.

File metadata

  • Download URL: enhancement-0.2.0.tar.gz
  • Upload date:
  • Size: 12.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 688539f5d4fd541d9bf4384b0ffafb4ea3d76e34a6c773dfd06f9d40235ba7c2
MD5 86644804e9a31703fb2b8f74449387bb
BLAKE2b-256 2c9d058278c54482f360098a2b92546e2a7569825ead7cd9cb5452eb71f4b22a

See more details on using hashes here.

File details

Details for the file enhancement-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: enhancement-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d6e6ae3d4cfc4382ff73bad329069482c01d7b427319ecc2d3cbb86fd5c4d17
MD5 b4846a35f575533dd99959963d1918ed
BLAKE2b-256 7ae3919c20a730aea3ba798f73363f9ac8d7bfb918ec9ae40ff5c30e68a9569f

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