Skip to main content

Pimp your Class/Property/Methods with useful functionality

Project description

Pimp My Class

This library provides base classes to enable useful behavior in Python Objects.

The central purpose of the library is to extend python properties to allow:

  • get/set logging.

  • get/set timing, success and failure stats.

  • async locking.

  • get/set coercion and conversion.

  • value cache

  • prevent unnecessary set.

  • read once properties

But most importantly, it allows owner specific configurations. Properties are class attributes, and therefore it is difficult to have a property which is, for exampled cached, in an object but not cached in another instance of the same class.

The library also provides DictProperties: that is properties that can be accessed by key; and also methods!

Each capability is isolated in individual classes allowing you to pick only what you need.

https://github.com/hgrecco/pimpmyclass

Authors

Hernan E. Grecco <hernan.grecco@gmail.com>

Lantz-drivers Changelog

0.2 (2018-11-27)

  • Added the possibility to use Python Enum as keys in DictFeat.

0.1.3 (2018-04-04)

  • Removed keyword argument from DictFeat signal for greater compatibility with Qt.

0.1.2 (2018-04-04)

  • Fixed repr in BoundedProperty.

0.1.1 (2018-03-28)

  • Fixed check_signature when params is empty.

0.1 (2018-03-23)

  • first public release.

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

pimpmyclass-0.2.tar.gz (16.3 kB view details)

Uploaded Source

File details

Details for the file pimpmyclass-0.2.tar.gz.

File metadata

  • Download URL: pimpmyclass-0.2.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for pimpmyclass-0.2.tar.gz
Algorithm Hash digest
SHA256 d43caebbee4351a3c27211ef5e10d8899cd6bf2e702671038d37d443ad9ad3eb
MD5 06d293e73fd7904ab03e4e6440ece746
BLAKE2b-256 613d90850598b06ee14bbf22dc1816530e7c1a173e7a8e3ae437d49c0a9d94f3

See more details on using hashes here.

Supported by

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