Skip to main content

SysPath

PyPI PyPI - Python Version PyPI - License

Build Status Maintainability Code 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 -e .[test]
ruff check .
mypy .
coverage run -m unittest
coverage report -m
ruff check .

Publishing

  1. Update CHANGELOG.md
  2. Update syspath/__version__.py
  3. Commit, tag with the version number, and push

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syspath-3.0.9.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

syspath-3.0.9-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syspath-3.0.9.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for syspath-3.0.9.tar.gz
Algorithm Hash digest
SHA256 2c19435ef17d5a6de68b405ea0673488c87d45d4119fe6370d9570b3a9bc0165
MD5 191ae80c13e17a8d9ac4315e85ac3409
BLAKE2b-256 ff9512c3598e5d8554f4b2cd7a07d2596a62b702b38b7d9c26e07d7df10b4b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for syspath-3.0.9.tar.gz:

Publisher: publish.yml on albertyw/syspath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: syspath-3.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for syspath-3.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fefbf9e9c3f5c800551b15b7ea996842e96810034a5b13a48df0cb4ee59f29c8
MD5 ff687e26a4a2f70c491520f4a689d04f
BLAKE2b-256 f98eaa1c5298a3ee49ca1b6eddab91ffd9bb1e55cc2fa801e89aff2b61e42615

See more details on using hashes here.

Provenance

The following attestation bundles were made for syspath-3.0.9-py3-none-any.whl:

Publisher: publish.yml on albertyw/syspath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page