Skip to main content

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 use import_parent (with an underscore)

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

import_parent-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

import_parent-1.0.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

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

Hashes for import_parent-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b592d410bfee136e76cc21879d680b90a7e61e19c8140327833b61730e43011e
MD5 a2cbc2e423218896ab3d3b9d1ce8415a
BLAKE2b-256 a25fe9a7a6a955599f474b9013ccc5c358fdd03e84bf174de0f2d8f0ce811fc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for import_parent-1.0.0.tar.gz:

Publisher: pypi-publish.yml on michaelboerman/import_parent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for import_parent-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b0a26e1f128a67a647efa08c1a104fd0232019fe1d8caa4eb6de79f4e123dfc
MD5 b25296f92b1f4bb591b4ec65c8ca0c63
BLAKE2b-256 316c6cdd491050c33af26a7bad9412873600427b34d0905791df57f3a5690178

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page