Skip to main content

None

Project description

cleanroom

Install:

pip install cleanroom

Create instance in a new process and proxy all operations:

import os
from cleanroom import create_instance


class Cal:

    def __init__(self, base):
        self.base = base

    def inc(self):
        self.base += 1
        return self.base

    def pid(self):
        return os.getpid()


cal = create_instance(Cal, 0)

print('Parent PID: ', os.getpid())
print('Cal PID: ', cal.pid())

print('inc: ', cal.inc())
print('inc: ', cal.inc())

Output:

Parent PID:  22239
Cal PID:  22272
inc:  1
inc:  2

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2019-05-10)

  • First release on PyPI.

Project details


Download files

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

Source Distribution

cleanroom-0.2.6.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

cleanroom-0.2.6-py2.py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page