mxProxy™ is an extension package that provides a new type that is suitable to implement sandbox-like features without the need to use restricted execution environments.
Given that current Python versions no longer support Bastion or rexec as secure sand-box execution models, mxProxy fills an important gap. It also gives the programmer more control over how and to what extent access should be controlled or not.
The type's main features are secure data encapsulation (the hidden objects are not accessible from Python since they are stored in internal C structures), customizable attribute lookup methods and a cleanup protocol that helps in breaking circular references prior to object deletion.
mxProxy also offers another interesting new feature: universal weak references which help you work with circular references in a way that doesn't cause memory leakage in a Python system.
Unlike Python's own weak reference system, mxProxy does not require any support on the container or referenced objects for weak references to work.
Part of the usefulness of weak references is the ability to avoid circular references. mxProxy provides a special cleanup protocol to further enhance this benefit by allowing the objects in circular reference structures to cleanup and break the circular references by themselves - even if the used container types do not implement the Python garbage collection traversal mechanisms.
mxProxy is written in a very portable way and works on pretty much all platforms where you can compile Python.
We provide precompiled versions for all standard platforms, so all you need is a working Python installation. The package supports all Python versions since Python 2.1.
The only requirement for compiling the package from source is an ANSI C compiler. There are no third-party libraries needed.
mxProxy is provided as part of the eGenix.com mx Base Distribution. Please see the mx Base Distribution page for details regarding the license.
The following documentation is available for mxProxy:
mxProxy User Manual and Reference Guide - HTML and PDF
The manual includes a discussion of the design principles behind mxProxy, its implementation, as well as a reference of the available programming interfaces.
The PDF file is also available as part of the installation and can be found in the mx/Proxy/Doc/
folder.
mxProxy is provided as part of the eGenix.com mx Base Distribution. Please see the mx Base Distribution page for downloads and installation instructions.
mxProxy was used and written for the eGenix.com Application Server to protect access from user written objects/content to the base system.
Please see the change log for details regarding changes to the package between releases.