Skip to main content

Voldemort's Python import helper.

Project description

importmagician

Voldemort's Python import helper

pip install importmagician

Import from uninstalled Python directories

Say you have a directory (relative path ../../dir_a) like this:

    ├── ../../dir_a
        ├── utils
        │   ├── util_a.py
        │   └── ...
        └── ...

You want func_a from utils.util_a.py:

from importmagician import import_from
with import_from('../../'):
    from utils.util_a import func_a

func_a()  # use func_a

The advantage of importmagician is: outside of the with statement, your sys.path remains unchanged.

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

importmagician-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

importmagician-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file importmagician-0.1.0.tar.gz.

File metadata

  • Download URL: importmagician-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

File hashes

Hashes for importmagician-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d53d008232b17cbd964417cc998fe834fb9e4ef2806fb4208a3715f384ce7a4
MD5 594807b9aa03256abb87b08f3fe24421
BLAKE2b-256 6d841bc7051205d98a7833bab24656687c13429a94056b6d95eca548eddd8bdf

See more details on using hashes here.

File details

Details for the file importmagician-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: importmagician-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.12

File hashes

Hashes for importmagician-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e896947b69d0a5c334ed93b124ec181e285dca3b89b8501a9e58f350ebeb5629
MD5 0224adc75867f6f92ccd18dac4e53f74
BLAKE2b-256 bc836369295498a9d36a63ba9fb406b14fd7c42fffe92d2e4585d092bd1dc045

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page