Python: Apply a decorator to a class instance and static methods
· 3 min read
Use Python metaclass to automatically apply a decorator to a class instance and static methods.
Use Python metaclass to automatically apply a decorator to a class instance and static methods.
This blog post shows how to use a registry to manage services in a Python application.
Python enum
package allows to utilise very powerful functionality in terms of managing constants and configuration entities. These entities are very compact and in many cases are more convenient to use than dictionaries or configuration files in any format. In a set of examples below, we will demonstrate how to use enums in Python applications as well as the benefits of such usage.
In this post we will discuss in detail five different examples of how to use constants in Python applications: