Skip to main content

A simple package to prevent the abusive use of 'import' statement in Python.

Project description

noimport v0.0.1

A simple package to prevent the abusive use of the import statement in Python.

Installation

To install, just run:

pip install noimport

Usage

After importing the noimport package, any attempts of importation would result in an error

>>> import noimport
>>> import time			# Built in modules won't work, ...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: import of time halted; None in sys.modules

>>> import foo			# ... nor local modules, ...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'foo'

>>> import PIL			# ... nor pip installed packages
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'

License

This project is licensed under the MIT license


Python without modules and packages, how bad can it be?

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

noimport-0.0.1.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

noimport-0.0.1-py3-none-any.whl (2.8 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