Import python object from string and return the reference of the object. The object can be a class, instance, variable and anything else, and can be from class, instance, module, global/local environment.
Project description
Import python object from string and return the reference of the object. The object can be a class, instance, variable and anything else, and can be from class, instance, module, global/local environment.
Install
pip install magic-import
Usage
from magic_import import import_from_string listdir = import_from_string("os.listdir") files = listdir(".")
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
magic-import-0.2.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for magic_import-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc64a16885df996c9a4226071adf36d6b92dbacb4c937c0a43b7f67adf26405 |
|
MD5 | a8a7024972890db036495c139bc20824 |
|
BLAKE2b-256 | c1e44ee48512fc65196d7d7cbda780e3f4d5d73303d7b785808bace130eda633 |