Skip to main content

Turn-Key solution to manage paths relative to the current file

Project description

The ezpath module allows managing paths relative to the file calling the module's functions, as opposed to being relative to the current working directory. This can be helpful to manage dependencies in a large local codebase.

Example:

from ezpath import *

# adding ../src (relative to the current file) to PYTHONPATH
add_rel_path('../src', follow_links=False)

# adding an absolute path to PYTHONPATH
add_abs_path('/path/to/my/folder')

# getting the absolute path of a file/folder relative to the current file, with
# the option to go up "up" levels
get_abs_path('../src/my_file.py', up=0, follow_links=False)

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

ezpath-1.6.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

ezpath-1.6-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file ezpath-1.6.tar.gz.

File metadata

  • Download URL: ezpath-1.6.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ezpath-1.6.tar.gz
Algorithm Hash digest
SHA256 6542b7dec2d2f040c5544c0424a4b678f62e01d9338b1e43654328119c2c0966
MD5 177b37e3618df2b5f53dd948d69d1380
BLAKE2b-256 dc8ada82dce66e0ea766b0d63b757f3f318b26b7a622b57ef9e94b836f92eaac

See more details on using hashes here.

File details

Details for the file ezpath-1.6-py3-none-any.whl.

File metadata

  • Download URL: ezpath-1.6-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ezpath-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4c9a9729c3df14c55d5fa8a7411f678d43f17127a5455200e04fe21b7cdb44ee
MD5 3a5769c173878aca83fcc6347cf2f77f
BLAKE2b-256 14d1d6b7e01d4ada4557352abbaacecd62d10c9dd801c7341fd4dfd1fff329c3

See more details on using hashes here.

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