Stop your users from doing whatever they want
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()
Metadata
Release files for disallow-import-star 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| disallow_import_star-0.4.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| disallow_import_star-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / disallow_import_star-0.4.1.tar.gz
| Download URL | disallow_import_star-0.4.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef7e690e70835664dbf80ee8d4aa16ecb515bd490d2f3b33beeb5cce214c2a93
|
|
BLAKE2b-256 checksum How to use checksums |
749ad2d73e6b4ea752f91665449eeacc95109fde78f36eaa5c6cefc76804a340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.0
|
Release files / disallow_import_star-0.4.1-py3-none-any.whl
| Download URL | disallow_import_star-0.4.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa7562e4b4d15f6af78c3380c0e866cb1d876d61c7fb084d7c73fe25052f1e29
|
|
BLAKE2b-256 checksum How to use checksums |
884b1272740dca84c0086894aca4b062b3768573c8386ae5db097f4c38304649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.0
|