🚀 supermagicmporter
This module dynamically adds your project's root directory to sys.path. It allows you to perform clean imports from neighboring folders or subdirectories without struggling with relative import errors.
🛠 Installation
pip install supermagicmporter
📖 How to Use To use this module, you need to call set_root_folder at the very beginning of your main script.
from supermagicmporter import set_root_folder
# Initialize the root path
# Pass __file__ to automatically detect the current script's location
set_root_folder(__file__, 'yourRootFolder')
# Now you can import from your project folders easily
from my_subfolder import my_module
Arguments
| Args | Description |
|---|---|
| file | Provides the current script's path. By passing the __file__ magic variable, the location is automatically resolved. |
| root_folder_name | The exact name of your project's root directory as a string. |
⚠️ Important Notes
Memory Storage: The set_root_folder function stores the absolute path of the target folder in Python's memory for the duration of the session.
Import Order: From the line set_root_folder onwards, your project structure is prioritized. If you need to import standard Python libraries or other installed packages that might have name conflicts, perform those imports before calling this function.
Path Resolution: Ensure the root_folder_name matches your directory casing exactly.
Metadata
Release files for superMagIcmporter 0.0.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 |
|---|---|---|---|---|
| supermagicmporter-0.0.3.tar.gz | 3.1 kB | Without provenance | Details for supermagicmporter-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| supermagicmporter-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for supermagicmporter-0.0.3-py3-none-any.whl |
Total release size: 6.6 kB
Release files / supermagicmporter-0.0.3.tar.gz
| Download URL | supermagicmporter-0.0.3.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5034bebe4f0182c7a02447058bfca8f150ed622465c2a26db97d38a365ecae9a
|
|
BLAKE2b-256 checksum How to use checksums |
0e012c903be3acdcf9a9c7573ff997082bf3f42457ecde187bc5d14d82f217b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / supermagicmporter-0.0.3-py3-none-any.whl
| Download URL | supermagicmporter-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78ca2a1325115b8e669cc35dc9921933175a0765f13b695b62183d9cb55f88e7
|
|
BLAKE2b-256 checksum How to use checksums |
fecfed882b644f4a8421c5e60da28f6141181291ebb5d0d9c0a632a7c6c3fedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for superMagIcmporter 0.0.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.