Skip to main content

No project description provided

Project description

Stop your users from doing whatever they want

PyPI - Version PyPI - Python Version

Are you a meanie? Do you feel your users shouldn't be allowed to to use from your_module import * whenever they want?

This is the package for you!

Just pip install disallow-import-star and add this magical lines to your module:

from disallow_import_star import __all__

Would you like to impose your will on other packages?

If you really want your users to stop using import * in other their packages, you can monkey patch your user's favorite packages, like this:

from disallow_import_star import __all__
import math
import numpy
import tkinter


# Why should our users be able to use import * ANYWHERE?
math.__all__ == __all__
numpy.__all__ == __all__
tkinter.__all__ == __all__

Want to control all the packages?

To really upset your import *-using users, run this:

from disallow_import_star

disallow_import_star.disallow_import_star_EVERYWHERE()

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

disallow_import_star-0.4.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

disallow_import_star-0.4.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded 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