Generic Path Protocol based pathlib
Project description
pathlib_next
Generic Path Protocol based pathlib implementation for URI paths with file access support for sftp, http, file schemes.
Features
- Unified URI Interface — Access resources on sftp, http, or local file schemes using python's familiar pathlib syntax.
- In-memory filesystem —
MemPathprovides a lightweight, virtual file system helper for mock files, testing, or transient storage. - Path synchronization —
PathSyncerallows syncing directory structures across different paths with customizable checksums. - Query & Source Parsing — Parse and serialize complex URL query strings and URI sources easily.
Installation
pip install pathlib_next
Optional features/extras:
| Extra/flag | Adds | Needed for |
|---|---|---|
uri |
uritools |
URI parsing capabilities |
http |
requests, bs4, htmllistparse |
Read and list files over HTTP/HTTPS |
sftp |
paramiko |
SFTP path operations and transfers |
Quick start
Unified Path Operations
from pathlib_next import Path
from pathlib_next.uri import UriPath
# Use the unified path interface
local_path = Path("./my_folder")
http_path = UriPath("http://example.com/data.txt")
# Read and print text if it exists
if http_path.exists():
print(http_path.read_text())
API overview
| Module/Package | Purpose |
|---|---|
pathlib_next.path |
Base Path implementation and protocols |
pathlib_next.uri |
URI/URL specific path support and Query utils |
pathlib_next.mempath |
In-memory transient path structure |
pathlib_next.utils.sync |
Synchronization functions and PathSyncer class |
Supported Python versions
Python >= 3.9
Development
For environment setup, dependency installation, and running tests, refer to virtual environment configurations and running pytest.
Releasing
This project follows Semantic Versioning and keeps a
CHANGELOG.md. Pushing a tag matching v* triggers the release
workflow: test gate → build → publish → docs deploy.
Documentation site
MkDocs builds the API reference from docs/, published on every
release. To preview locally: mkdocs serve.
License
MIT — see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pathlib_next-0.4.1.tar.gz.
File metadata
- Download URL: pathlib_next-0.4.1.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5d5999f2db50171d11a956a0dfbf8f5b7068334a278eb38aa145af3f5422445
|
|
| MD5 |
7e2277dffb5533bc476dea44e1525779
|
|
| BLAKE2b-256 |
26dd90cb3d03c916dd525ffcad70787a65422a463e9b383eaeab7d5e54010c7b
|
Provenance
The following attestation bundles were made for pathlib_next-0.4.1.tar.gz:
Publisher:
release.yml on jose-pr/pathlib_next
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pathlib_next-0.4.1.tar.gz -
Subject digest:
a5d5999f2db50171d11a956a0dfbf8f5b7068334a278eb38aa145af3f5422445 - Sigstore transparency entry: 2142019077
- Sigstore integration time:
-
Permalink:
jose-pr/pathlib_next@d9b35ce624459dc419eddc372c7b435931301999 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/jose-pr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9b35ce624459dc419eddc372c7b435931301999 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pathlib_next-0.4.1-py3-none-any.whl.
File metadata
- Download URL: pathlib_next-0.4.1-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72d427fe3451e03f8588b26e01755eb256cae9b483d10717ad870496bf8dd169
|
|
| MD5 |
a7be60e3ad13b6285ec9c99c0445e753
|
|
| BLAKE2b-256 |
0d7e5d6eff88c0ca09e433761f7c4a48ea2eb96b5ae2792d46ab45f62108c532
|
Provenance
The following attestation bundles were made for pathlib_next-0.4.1-py3-none-any.whl:
Publisher:
release.yml on jose-pr/pathlib_next
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pathlib_next-0.4.1-py3-none-any.whl -
Subject digest:
72d427fe3451e03f8588b26e01755eb256cae9b483d10717ad870496bf8dd169 - Sigstore transparency entry: 2142019355
- Sigstore integration time:
-
Permalink:
jose-pr/pathlib_next@d9b35ce624459dc419eddc372c7b435931301999 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/jose-pr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9b35ce624459dc419eddc372c7b435931301999 -
Trigger Event:
push
-
Statement type: