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.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

disallow_import_star-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file disallow_import_star-0.0.1.tar.gz.

File metadata

File hashes

Hashes for disallow_import_star-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1f14e2bc58de9fa960838777b1408b6c24e554f17cea31bbfde3fafc8c864ab7
MD5 c0bd05aded7c7b007e28cb397d403769
BLAKE2b-256 5c7c5ca8f7cabfac5bd5abd737dc9b97f5deefb81797a258da36ba318118d620

See more details on using hashes here.

File details

Details for the file disallow_import_star-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for disallow_import_star-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4260524d89c529dfaf5be1104930384ce79872b82986cdffb1947b9608a9559d
MD5 0f722275cff2030d7275ad3b2da45d2d
BLAKE2b-256 c47e7d0381d7872c7f5a915b6497754b73d07b39641079be09a0fff9fc38a689

See more details on using hashes here.

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