Skip to main content

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.6.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

specific_import-0.9.6-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file specific_import-0.9.6.tar.gz.

File metadata

  • Download URL: specific_import-0.9.6.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for specific_import-0.9.6.tar.gz
Algorithm Hash digest
SHA256 ddca1cd79a0bf5df39447ee9c0976025dd3f92295ae42e0e4e4767fdfcc91dc3
MD5 b95dac05aef803faeb68cc0c96c04e6e
BLAKE2b-256 466a77ecc7159919f99985e0f1220df444c139848630df2cdca250d60decde3c

See more details on using hashes here.

File details

Details for the file specific_import-0.9.6-py3-none-any.whl.

File metadata

File hashes

Hashes for specific_import-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d612336fbd18965309aeb7049c9d7467d868a7d502fd5f995b66a1f00dbdcf42
MD5 bb767bf77fc20e6c0e6c8e59d4b31226
BLAKE2b-256 90e97f1f8bdf972b261a85686b338bdbec3be9b44dd4967c63f10b73cef759ee

See more details on using hashes here.

Supported by

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