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.2.tar.gz (6.1 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.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for syspath-2.0.2.tar.gz
Algorithm Hash digest
SHA256 e67668919261fb2f8fdafe64987fd6d45c423fd05bbaf8d774a80ec6ef8ea9e3
MD5 f412ae5a6304fb82566d36b6e5e6f575
BLAKE2b-256 4e24b4b545109181c55618642981b9f70b94b1fadbea0696bf649fbfd30ebac2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: syspath-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for syspath-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11a25519b945315338385b85bce2c66d6c2d58307bc23843cd3f8e65e99424aa
MD5 8cb2ec3b100de67f529b9c41f3449e40
BLAKE2b-256 953c69e399d58a5854ef2f93ddea89f1c4a0d199e7898d9797e478e2f04a9e7b

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