Skip to main content

Introduction

Import modules from anywhere on the file system.

Usage

import path_imports


# Import a certain file
foo_module = path_imports.import_from_path('somewhere/on your/file system/foo.py')

# Import a module from a certain directory
submodule = path_imports.import_from_directory('some/directory', 'root_module.submodule')

# Find the file path of a module
path = path_imports.find_module_location('my_module', directory='my project folder')
print(path)  # Output: "my project folder/my_module.py"

Installation

pip install path-imports

Documentation

There is no online documentation; however, the module has docstrings and type annotations. Your IDE should display all the relevant information to you.

Metadata

Release files for path-imports 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for path-imports 1.1.2
File Size Uploaded
path_imports-1.1.2.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for path-imports 1.1.2
File Interpreter ABI Platform
path_imports-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / path_imports-1.1.2.tar.gz

Download URL path_imports-1.1.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0383a2d001664d1be00bdc25c2e98e52b5eaa9cd448f781f9c20f67e9c9eea75
BLAKE2b-256 checksum
How to use checksums
6f917fd45762f11a03a19d110212b9aa8e23ed61312b4cbfeeccc7359e3aec13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release files / path_imports-1.1.2-py3-none-any.whl

Download URL path_imports-1.1.2-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2472f6f814d4992088950f525ab6ee4e28aedcfe2375f23a874aa077bfb7a0cc
BLAKE2b-256 checksum
How to use checksums
46859e7cd66665d7c536b24f191ce5361d277f7ee06620c8200c09d6a7358cd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page