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
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.1.tar.gz (6.0 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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syspath-2.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for syspath-2.0.1.tar.gz
Algorithm Hash digest
SHA256 6417a87c841f01748bf2b2a5cec3dc360449b6b1b705c5adeec286c27c689910
MD5 39e5bf89153e06e3bb254d30b5b15c9c
BLAKE2b-256 09bb3cf6d0581e11bf878f4e0457178a7dcf687bc4e3a46bafd847be81e63bae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syspath-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for syspath-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a0f0f2095b2c7f974a2dcc288d33408d6403cc843d287d1ec7fbd5ed3ca77ac
MD5 c091bc8d41b49bbdebc8f1ca9da6f423
BLAKE2b-256 71f2587a1b15c3f1b8988b8201dfb48acaea781973fe8afe5fa64a82d70e73ee

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