Skip to main content

Pathing Library

Project description

getpath

Helps with pathing in python scripts. Inspired by pathlib.

IMPORTING

from getpaths import getpath

USING CURRENT FILE PATH

current_dir = getpath() # current file's path

USER-SPECIFIED PATH

custom_dir = getpath('a','b',custom=True)
print(custom_dir)
# /a/b

ADD FILES

custom_dir/'example.txt'
# /a/b/example.txt

custom_dir.add('/a/example.txt')
# /a/b/example.txt

GO UP THE DIRECTORY

custom_dir = getpath('a','b',custom=True)

custom_dir/'..'
# /a

custom_dir.add('..')
# /a

custom_dir.up(1)
# /a

LIST EXISTING FILES AND FOLDERS

custom_dir.ls()
# /a/b/example.txt
# throws error if path does not exist

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

getpaths-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

getpaths-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: getpaths-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for getpaths-1.0.0.tar.gz
Algorithm Hash digest
SHA256 785fd929d8b7393c84349731f2dcc942ca029d4f1c5ab1d49d771be0f090e736
MD5 8c5f6309e04b52bac0fbb15e0131968f
BLAKE2b-256 e9ffba4e7f306746ff8b6c12a83f64c22c96c2991c07362e0fc267534214a8fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: getpaths-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for getpaths-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2015dabeac9e6ab13555aa656c62255bbd3286ab5236a0012ffc72a981b79303
MD5 2f1de4b3e34c294f06a99b42a4ce574d
BLAKE2b-256 06e436d533889a4da19ddd694f2efc1b8649a0ec724dc1f3ae0923ec510b9052

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