albertyw/syspath


Easily add common paths to sys.path

License: MIT

Language: Python


SysPath

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 Statistics

Sourcerank 5
Repository Size 30.3 KB
Stars 1
Forks 2
Watchers 1
Open issues 1
Dependencies 3
Contributors 2
Tags 7
Created
Last updated
Last pushed

Top Contributors See all

Albert Wang Chris Lewis

Packages Referencing this Repo

syspath
Easily add common paths to sys.path
Latest release 2.0.0 - Updated - 1 stars

Recent Tags See all

v1.1.1 March 30, 2019
v1.1.0 July 14, 2018
v1.0.1 July 09, 2018
v1.0.0 January 14, 2018
v0.1.1 December 20, 2017
v0.1.0 December 20, 2017
v0.0.1 December 19, 2017

Something wrong with this page? Make a suggestion

Last synced: 2020-01-04 23:49:54 UTC

Login to resync this repository