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
Release history Release notifications | RSS feed
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.1.2.tar.gz
(7.0 kB
view details)
File details
Details for the file pathliberty-0.1.2.tar.gz
.
File metadata
- Download URL: pathliberty-0.1.2.tar.gz
- Upload date:
- Size: 7.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4697439fab48afab3a293d39c6a49dc30607399ecbd314afa03b2edc8b57b05e |
|
MD5 | a5ae95eb2f5ff8a8d26e57c87519dd8d |
|
BLAKE2b-256 | 1759313e74b9c2b0e334734c7cc600a69c9d6e4b7e3c66fe877c4d42fe15c162 |