Skip to main content

Generic Path Protocol based pathlib

Project description

pathlib_next

Version Python versions License: MIT Docs CI

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 filesystemMemPath provides a lightweight, virtual file system helper for mock files, testing, or transient storage.
  • Path synchronizationPathSyncer allows 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pathlib_next-0.4.1.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

pathlib_next-0.4.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

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

Hashes for pathlib_next-0.4.1.tar.gz
Algorithm Hash digest
SHA256 a5d5999f2db50171d11a956a0dfbf8f5b7068334a278eb38aa145af3f5422445
MD5 7e2277dffb5533bc476dea44e1525779
BLAKE2b-256 26dd90cb3d03c916dd525ffcad70787a65422a463e9b383eaeab7d5e54010c7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathlib_next-0.4.1.tar.gz:

Publisher: release.yml on jose-pr/pathlib_next

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pathlib_next-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72d427fe3451e03f8588b26e01755eb256cae9b483d10717ad870496bf8dd169
MD5 a7be60e3ad13b6285ec9c99c0445e753
BLAKE2b-256 0d7e5d6eff88c0ca09e433761f7c4a48ea2eb96b5ae2792d46ab45f62108c532

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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