Python package that allows a user to easily import local functions from parent folders.
Project description
import-parent
A small utility for importing Python modules using paths relative to the calling script — without modifying your project structure.
Modifies sys.path, which is maybe kinda janky, but it works and will make life easier than having to run pip install -e . in every project.
Questions? Ask at https://github.com/michaelboerman/import_parent/issues
Installation
pip install import-parent
Usage
from import_parent import add_parent_to_path
add_parent_to_path("..")
Notes
- the name on PyPI is
import-parent(with a hyphen), but when you load it in python, you need to useimport_parent(with an underscore)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file import_parent-1.0.0.tar.gz.
File metadata
- Download URL: import_parent-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b592d410bfee136e76cc21879d680b90a7e61e19c8140327833b61730e43011e
|
|
| MD5 |
a2cbc2e423218896ab3d3b9d1ce8415a
|
|
| BLAKE2b-256 |
a25fe9a7a6a955599f474b9013ccc5c358fdd03e84bf174de0f2d8f0ce811fc6
|
Provenance
The following attestation bundles were made for import_parent-1.0.0.tar.gz:
Publisher:
pypi-publish.yml on michaelboerman/import_parent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
import_parent-1.0.0.tar.gz -
Subject digest:
b592d410bfee136e76cc21879d680b90a7e61e19c8140327833b61730e43011e - Sigstore transparency entry: 1115101589
- Sigstore integration time:
-
Permalink:
michaelboerman/import_parent@1e985bfb5f932bf6205eb657448e894f08ecd706 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/michaelboerman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@1e985bfb5f932bf6205eb657448e894f08ecd706 -
Trigger Event:
release
-
Statement type:
File details
Details for the file import_parent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: import_parent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b0a26e1f128a67a647efa08c1a104fd0232019fe1d8caa4eb6de79f4e123dfc
|
|
| MD5 |
b25296f92b1f4bb591b4ec65c8ca0c63
|
|
| BLAKE2b-256 |
316c6cdd491050c33af26a7bad9412873600427b34d0905791df57f3a5690178
|
Provenance
The following attestation bundles were made for import_parent-1.0.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on michaelboerman/import_parent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
import_parent-1.0.0-py3-none-any.whl -
Subject digest:
5b0a26e1f128a67a647efa08c1a104fd0232019fe1d8caa4eb6de79f4e123dfc - Sigstore transparency entry: 1115101593
- Sigstore integration time:
-
Permalink:
michaelboerman/import_parent@1e985bfb5f932bf6205eb657448e894f08ecd706 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/michaelboerman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@1e985bfb5f932bf6205eb657448e894f08ecd706 -
Trigger Event:
release
-
Statement type: