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

Making modules callable, for not very good reasons.

Project description

No more from <module> import <Module>!

Wouldn’t be nice if…

>>> import pprint
>>> pprint("hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

Was possible? Well:

  1. Add special sauce:

    >>> import calldules
    
  2. Import module(s), call:

    >>> import pprint
    >>> pprint("hello")
    
  3. ????

    'hello'
    
  4. PROFIT!!!

Also works with such modules as flask, codecs, array, datetime, decimal, random, and many more!

No responsibility is taken for any grievous harm caused either by irresponsible or responsible use of calldules.

Inspired by Richard Jones’ talk Don’t Do This.

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
calldules-1.0.1.tar.gz (3.0 kB) Copy SHA256 hash SHA256 Source None
calldules-1.0.1.zip (5.6 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