Skip to main content

Pimp My Class

[![Coverage Status](https://coveralls.io/repos/github/hgrecco/pimpmyclass/badge.svg?branch=master)](https://coveralls.io/github/hgrecco/pimpmyclass?branch=master) [![Build Status](https://travis-ci.org/hgrecco/pimpmyclass.svg?branch=master)](https://travis-ci.org/hgrecco/pimpmyclass) ![Python Version](https://img.shields.io/pypi/pyversions/pimpmyclass.svg) [![Python Version](https://img.shields.io/pypi/v/pimpmyclass.svg)](https://pypi.org/project/pimpmyclass/) [![Documentation Status](https://readthedocs.org/projects/pimpmyclass/badge/?version=latest)](https://pimpmyclass.readthedocs.io/en/latest/?badge=latest)

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>

pimpmyclass changelog

0.4.3 (2019-04-30)

  • Changed signal is only emitted when the cache value actually changes.

0.4.2 (2019-01-21)

  • Created get/set _notifiy to be called after succesfull get/set.

0.4.1 (2019-01-19)

  • Document log_values.

  • Check for key being member of list/tuple/set in dictproperties.

  • Fixed bug that precluded composing properties/methods with config.

0.4 (2019-01-19)

  • Renamed Config to InstanceConfig and implemented Config for instance independent configuration.

  • Implemented automatic filling of Config and InstanceConfig with kwargs.

  • Implemented default, value and type checking for Config and InstanceConfig

  • More testing and docs.

0.3 (2019-01-16)

  • Implemented log_values to toggle how values are logged

  • Improved testing.

  • Split GetSetCacheProperty into GetCacheProperty and SetCacheProperty

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.

Metadata

Release files for pimpmyclass 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pimpmyclass 0.4.3
File Size Uploaded
pimpmyclass-0.4.3.tar.gz 23.1 kB Details

Release files / pimpmyclass-0.4.3.tar.gz

Download URL pimpmyclass-0.4.3.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
369f2d84270abc30d4cef5bd731221a87a1dcad995dc47d75e607072fbde1a28
BLAKE2b-256 checksum
How to use checksums
a48e0e0cb0e1c830924f5bb30c015cfa998773fa56c47a7c45ff6255db90783c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.4.3 This release

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page