Skip to main content

A class decorator for invoking static constructors.

Project description


The module [staticinit]( defines the decorator `@staticinit.init()` for classes, which executes a static
constructor after the annotated class has been created.
By default, the name of the according constructor method is assumed to be `__static_init__`, but an alternative name may
be specified via the keyword arg `init_meth`.
Notice further that the constructor has to be a class method.

The following example illustrates how to use this module:
import staticinit

class SomeClass(object):

def __static_init__(cls):
# do some initialization stuff here...

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
staticinit-v2017.1.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page