MetaClass supporting fine grained control of object creationand initialization
Project description
metaframe
MetaClass infrastructure to intercept instance creation/initialization enabling modification of args/kwargs and instance.
Documentation
Read the full documentation at readthedocs.org:
Python 2/3 Support
Python 2.7
Python 3.2/3.3/3.4/3.5
It also works with pypy and pypy3
Installation
metaframe is self-contained with no external dependencies
From pypi:
pip install metaframe
From source:
Place the metaframe directory found in the sources inside your project
Features:
MetaFrame metaclass to apply to any object - With embedded staticmethod with_metaclass to enable inheritance
MetaFrameBase class from which classes can inherit
3 hooks (classmethods)
_new_pre: called before object creation
_init_pre: called after object creation / before object initialization
_init_post: called after object initialization
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.