This package simplifies importing relative and absolute module paths
Project description
specific_import
This package allows you to import resources by their relative or absolute file paths.
Features
- Is open source
- Is compatible with the latest version of Python3
- Is great at doing imports relative to the file doing the actual importing
- (as opposed to relative to the file doing the calling as other import libraries do.)
- Doesn't reload module if module already loaded
How to install
- Method 1: Use PIP
pip install specific_import
- Method 2:
Download from Github
Example
from specific_import import import_file
# import relatively
app_setup = import_file('../app_setup.py')
# import absolutely
app_setup = import_file('/home/projects/my_project/app_setup.py')
Why?
I love Python but sometimes the builtin import system can be a headache
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
specific_import-0.9.5.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for specific_import-0.9.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dbeaa138d8d86b4b3c202e57551592f76ce351aff9c4f1dfcc35fe4bb680c43 |
|
MD5 | 2dee84059707ef37b823a4efe10b1eb3 |
|
BLAKE2b-256 | 6c6c7eff48f0ef6476b155cfcb40343acd1a77121b966df9798c83c44a0a8c17 |