Skip to main content

Easily add common paths to sys.path

Project description

SysPath

PyPI PyPI - Python Version PyPI - License

Build Status Dependency Status Code Climate Code Climate Test Coverage

SysPath is a package to easily set common paths into sys.path. Instead of having to do a lot of path manipulation to properly import files, a file can import from SysPath instead.

Installation

pip install syspath

Usage

To append the current file's directory to sys.path:

import syspath
syspath.append_current_path()
# or
from syspath import current_path

To append the current file's parent directory to sys.path:

import syspath
syspath.append_parent_path()
# or
from syspath import parent_path

To append the current file's git repository root to sys.path:

import syspath
syspath.append_git_root()
# or
from syspath import git_root

Each of the shortcut modules also provide a path variable that can be used to get the path added.

Development

pip install -r requirements-test.txt
mypy syspath --strict
coverage run setup.py test
coverage report
flake8

Publishing

pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*

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

syspath-2.0.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

syspath-2.0.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file syspath-2.0.5.tar.gz.

File metadata

  • Download URL: syspath-2.0.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for syspath-2.0.5.tar.gz
Algorithm Hash digest
SHA256 86bbd1dd96dda219384781369f5781423495b86020cf23e5b9c873723982fb1e
MD5 7cba0b1180960dcfc9ce09bd28b201db
BLAKE2b-256 aff749875229f61debc2a5cf6365d984838861532e2b6ab1c02db3fb35c63f82

See more details on using hashes here.

File details

Details for the file syspath-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: syspath-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for syspath-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f94911423d91fc709a29ca2bd2fdd8ee8cce20a6e08c2f0ce59cdb140d0e1126
MD5 74a273c6c753a2fc0db7c4d17e286f4d
BLAKE2b-256 0f35c2e0a3030e78318568742db56cb647a30ece12c7fadaeb43384cf4d83de5

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