Skip to main content

pathlib extensions

Project description

pathliberty

Extended object-oriented filesystem paths library.
pathliberty is the Python package that allows you to subclass a pathlib.PosixPath in a proper way. To define your own custom path subclass, declare subclasses AbstractPathAccessor and AbstractPath.

Features

Support SSH remote path via Paramiko:

from pathliberty import SSHPath
from pathliberty.ssh import SSHSession
from getpass import getuser

host = 'localhost'
ssh_session = SSHSession(
    host,
    password=******,
)
ssh_path = SSHPath(f'/home/{getuser()}', ssh=ssh_session)
assert ssh_path.parent == SSHPath('/home', host=host)

Installation

pip install pathliberty

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

pathliberty-0.6.1.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file pathliberty-0.6.1.tar.gz.

File metadata

  • Download URL: pathliberty-0.6.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pathliberty-0.6.1.tar.gz
Algorithm Hash digest
SHA256 e016b406e67a7208e03a81c2382693f31163696ea17641430196e386a57d0e52
MD5 fa4c4750865e3be517f67c40eeb90a93
BLAKE2b-256 942c2e75867af5644b381e5c19d2e839cbf1a36aea3e7f890f057c8a09441107

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page