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

Development

pip install -r requirements-test.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-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

syspath-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syspath-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for syspath-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c758244e11dff5eafea8a68f1eea7c8c21365badf65f4ef784d8547020035b74
MD5 763f3bce44d2691dca5997ccb6fd9267
BLAKE2b-256 d394b30565437dfb194ee13721138e04d4497667d95b55a2685063c921e8cb5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syspath-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca481eb927d7c41bbe0993bc3518865ae8dd4a54fbc47a7b319216f93097263
MD5 468c4c0aff932babb3140ab63f1bc88f
BLAKE2b-256 31e8cc87a14e1392cd0f12e98578967c999344404a87c612c4ae9869d93a8600

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