Skip to main content

Easily add common paths to sys.path

Project description

PyPI Python Versions

Codeship Status for albertyw/syspath Dependency Status 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
pip install -r requirements-test-python3.txt
mypy syspath/syspath.py
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.0.tar.gz (4.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.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syspath-2.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for syspath-2.0.0.tar.gz
Algorithm Hash digest
SHA256 275ebc41bf9c57901181ff75e9072a32a7bde07186f987a4d49975e5b5c98ca4
MD5 a6143c9fb597594e7a9904902d1dcc2b
BLAKE2b-256 800b359926b86d80bcb34ec9bf159713e872170d825206dfd5002a788055b9ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syspath-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for syspath-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf75e67b77189e014d22efa413a63e5cd917a3d23c79b110c85f610fcaf4700e
MD5 38e43a196d32c375cc25ad066633a5a8
BLAKE2b-256 72494aa9dff9fa0e48274c328f49f52d458958a7ef1bc653345c60c13c417cb2

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