Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A python package making it easy to drop a multi-module package from sys.modules

Project description


You can either download or clone this repo, or alternatively you can install this module using pip:

pip install blackout


Blackout is a small micro-module which makes it easier to completely forget packages. This is particularly useful when working with packages made up of multiple sub-modules.

And example might be:


If has a function called foo() within it, and we change that function then it is not enough to reload foo, we must specifically reload foo as well as

When working with packages with any modules this can be time consuming and problematic - particularly when developing within a host which is persistent.

Blackout helps, because we can unload the package in its entirety in a single line using:


This will remove any hold to foo as well as any submodules of foo. In this case we can simply call import foo again, knowing that everything within that package is being loaded fresh.


This has been tested under Python 2.7.13 and Python 3.6.6 under both Windows and Ubuntu.

Project details

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
blackout-1.0.4.tar.gz (2.9 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