Pathlib-style classes for local files and named remote storage.
Project description
ppathlib
ppathlib provides a pathlib-style public path object for local paths and named remote storage.
The current library exposes one public path type:
PPath(path)uses local mode internallyPPath(path, profile=...)uses remote mode internallyPPath("s3://...")can also enter public remote mode without a profile for lightweight public S3 access
Current Status
The library currently supports:
- local mode with
pathlib-style composition - remote lexical behavior such as
/,joinpath,name,stem,suffix,parent,parts,relative_to, andwith_suffix - backend-backed remote runtime operations such as
open,read_*,write_*,exists, listing, globbing, copy, move, and unlink - project-scoped TOML configuration discovery
- profile-less public S3 access for lightweight public objects
Remote runtime behavior is still experimental.
Remote runtime methods emit ExperimentalRemoteRuntimeWarning so callers do not mistake the current behavior for a frozen contract.
The source of truth for project governance is the numbered documentation set in docs/.
Installation
pip install ppathlib
Minimum supported Python version: 3.11.
Quick Start
Local Mode
from ppathlib import PPath
path = PPath("data/local-report.parquet")
print(path.mode)
print(path.parent)
Profiled Remote Mode
version = 1
[profiles.analytics]
storage_type = "s3"
endpoint_url = "https://storage.example.com"
access_key_id = "xxx"
secret_access_key = "yyy"
root = "s3://analytics-bucket"
from ppathlib import PPath
path = PPath("daily/report.parquet", profile="analytics")
print(path)
print(path.name)
print(path.with_suffix(".csv"))
Public S3 Mode
from ppathlib import PPath
path = PPath("s3://wikisum/README.txt")
print(path.read_text(encoding="utf-8")[:120])
Current API Surface
PPath(path, profile=None)
Returns the public PPath object in either local or remote mode.
ExperimentalRemoteRuntimeWarning
Warning type emitted by experimental remote runtime operations.
InvalidConfigurationException
Exception type raised for invalid configuration or invalid remote path inputs.
Internal backend binding types are implementation details and are not part of the top-level API.
Documentation
License
MIT
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 ppathlib-0.2.1.tar.gz.
File metadata
- Download URL: ppathlib-0.2.1.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbb17ebfa375f4b0ecac37861e0c07990f979ecb609e9d3fef495d6a4424a8ac
|
|
| MD5 |
1a2c3327e028e12957e5c5e7577f7030
|
|
| BLAKE2b-256 |
fb9fccea483005b3eb7a989f14a9738b6f455034b0497df08080de06e65b7b26
|
Provenance
The following attestation bundles were made for ppathlib-0.2.1.tar.gz:
Publisher:
publish.yml on husgbb/ppathlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppathlib-0.2.1.tar.gz -
Subject digest:
fbb17ebfa375f4b0ecac37861e0c07990f979ecb609e9d3fef495d6a4424a8ac - Sigstore transparency entry: 1155007808
- Sigstore integration time:
-
Permalink:
husgbb/ppathlib@a020f94e3624bd5524699fd24b4794aa9a8734bd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/husgbb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a020f94e3624bd5524699fd24b4794aa9a8734bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file ppathlib-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ppathlib-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
366270376a82cdff19ea5857b362f9f2669614f02aa19ae8a3844cccbdbf93dd
|
|
| MD5 |
ad97d3be038330014ffd3bf0076a6a51
|
|
| BLAKE2b-256 |
fec340d0524ba6beb1963779b0e352afc59ec9cc8ffcda6a5ecae8d9f3eb9702
|
Provenance
The following attestation bundles were made for ppathlib-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on husgbb/ppathlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppathlib-0.2.1-py3-none-any.whl -
Subject digest:
366270376a82cdff19ea5857b362f9f2669614f02aa19ae8a3844cccbdbf93dd - Sigstore transparency entry: 1155007810
- Sigstore integration time:
-
Permalink:
husgbb/ppathlib@a020f94e3624bd5524699fd24b4794aa9a8734bd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/husgbb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a020f94e3624bd5524699fd24b4794aa9a8734bd -
Trigger Event:
push
-
Statement type: