magic-import
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
Test Passed On Python Versions
- 2.7
- 3.2
- 3.3
- 3.4
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- 3.10
- 3.11
Usage
from magic_import import import_from_string
listdir = import_from_string("os.listdir")
files = listdir(".")
Release
0.1.0
- First release
0.1.1
0.1.2
0.1.3
0.2.0
- Some updates.
0.2.2
- Test passed on all python versions.
0.2.3
- Doc update.
Metadata
Release files for magic-import 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| magic_import-0.2.3.tar.gz | 3.6 kB | Without provenance | Details for magic_import-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magic_import-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for magic_import-0.2.3-py3-none-any.whl |
Total release size: 6.9 kB
Release files / magic_import-0.2.3.tar.gz
| Download URL | magic_import-0.2.3.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46997fdc651cc3d513f456172097ba2dd5e6ec0a17c02b11d4ae6d886b7674ae
|
|
BLAKE2b-256 checksum How to use checksums |
6e331806a928a5a00a9a92b1c5df2ba9c1b3fbed6950c8f1d3140ad31db0bfd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / magic_import-0.2.3-py3-none-any.whl
| Download URL | magic_import-0.2.3-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13c83fdd2fbd2a9d4f7534fb42a858e85c90bba1c80188131e93d6053c057f30
|
|
BLAKE2b-256 checksum How to use checksums |
c6fcad38412f7380c201fed6a8cc7178d855f4b89b5d48f5be6a2bc191def3da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Security for magic-import 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.