Name | pyxfs JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Universal filesystem interface with pluggable backends (local, S3, SFTP, ...). |
upload_time | 2025-08-26 10:51:09 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
filesystem
storage
s3
sftp
io
abstraction
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pyxfs Path Utilities
[](https://pypi.org/project/pyxfs/)
[](LICENSE)
`pyxfs` is a Python library that provides a **URI-aware path abstraction** similar to `pathlib`, but designed for distributed and cloud storage systems.
It supports **Hadoop-style** path components `(scheme, authority, path)` and provides concrete path classes for:
- **Local files** (`LocalPath`, scheme: `os://`)
- **S3 paths** (`S3Path`, scheme: `s3://` — in `pyxfs.s3.path`)
It normalizes paths to POSIX style (`/` separators), works with URIs, and provides high-level path manipulation utilities.
---
## Features
- Parse local and S3 URIs (`os:///tmp/file`, `s3://bucket/path/file`).
- Normalize paths (`/a/b/../c` → `/a/c`).
- Join, split, and modify paths without losing scheme/authority.
- Build paths from **absolute paths** or **URIs**.
- Generate safe URIs with percent-encoding for spaces and special characters.
---
## Installation
Install directly from PyPI:
```bash
pip install pyxfs
```
## Quickstart
```python
from pyxfs.path import Path, LocalPath
# Build from absolute local path
p = Path.from_uri("/tmp/data/file.txt")
print(p) # os:///tmp/data/file.txt
print(p.scheme) # os
print(p.parts) # ['tmp', 'data', 'file.txt']
print(p.name) # file.txt
print(p.suffix) # .txt
# Build from os:// URI
p2 = Path.from_uri("os:///var/log/syslog")
print(p2.as_uri()) # os:///var/log/syslog
# Path operations
p3 = p2 / "archive" / "old.log"
print(p3) # os:///var/log/archive/old.log
p4 = p3.with_name("latest.log")
print(p4) # os:///var/log/archive/latest.log
p5 = p4.with_suffix(".gz")
print(p5) # os:///var/log/archive/latest.gz
print(p5.parent) # os:///var/log/archive
```
### S3 Path Example
```python
from pyxfs.path import Path
p = Path.from_uri("s3://my-bucket/data/file.csv")
print(p.scheme) # s3
print(p.authority) # my-bucket
print(p.parts) # ['data', 'file.csv']
print(p.name) # file.csv
print(p.as_uri()) # s3://my-bucket/data/file.csv
print(p.with_suffix(".json")) # s3://my-bucket/data/file.json
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pyxfs",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "filesystem, storage, s3, sftp, io, abstraction",
"author": null,
"author_email": "Nicolas FILLOT <nfillot.pro@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d5/0b/4ff4c5f199f1ea63804361fca4114f259da3b00c25bdd0d0e395a8b9cd27/pyxfs-0.1.0.tar.gz",
"platform": null,
"description": "# pyxfs Path Utilities\r\n\r\n[](https://pypi.org/project/pyxfs/)\r\n[](LICENSE)\r\n\r\n`pyxfs` is a Python library that provides a **URI-aware path abstraction** similar to `pathlib`, but designed for distributed and cloud storage systems.\r\n\r\nIt supports **Hadoop-style** path components `(scheme, authority, path)` and provides concrete path classes for:\r\n- **Local files** (`LocalPath`, scheme: `os://`)\r\n- **S3 paths** (`S3Path`, scheme: `s3://` \u2014 in `pyxfs.s3.path`)\r\n\r\nIt normalizes paths to POSIX style (`/` separators), works with URIs, and provides high-level path manipulation utilities.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- Parse local and S3 URIs (`os:///tmp/file`, `s3://bucket/path/file`).\r\n- Normalize paths (`/a/b/../c` \u2192 `/a/c`).\r\n- Join, split, and modify paths without losing scheme/authority.\r\n- Build paths from **absolute paths** or **URIs**.\r\n- Generate safe URIs with percent-encoding for spaces and special characters.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nInstall directly from PyPI:\r\n\r\n```bash\r\npip install pyxfs\r\n```\r\n\r\n## Quickstart\r\n```python\r\nfrom pyxfs.path import Path, LocalPath\r\n\r\n# Build from absolute local path\r\np = Path.from_uri(\"/tmp/data/file.txt\")\r\nprint(p) # os:///tmp/data/file.txt\r\nprint(p.scheme) # os\r\nprint(p.parts) # ['tmp', 'data', 'file.txt']\r\nprint(p.name) # file.txt\r\nprint(p.suffix) # .txt\r\n\r\n# Build from os:// URI\r\np2 = Path.from_uri(\"os:///var/log/syslog\")\r\nprint(p2.as_uri()) # os:///var/log/syslog\r\n\r\n# Path operations\r\np3 = p2 / \"archive\" / \"old.log\"\r\nprint(p3) # os:///var/log/archive/old.log\r\n\r\np4 = p3.with_name(\"latest.log\")\r\nprint(p4) # os:///var/log/archive/latest.log\r\n\r\np5 = p4.with_suffix(\".gz\")\r\nprint(p5) # os:///var/log/archive/latest.gz\r\n\r\nprint(p5.parent) # os:///var/log/archive\r\n```\r\n\r\n### S3 Path Example\r\n```python\r\nfrom pyxfs.path import Path\r\n\r\np = Path.from_uri(\"s3://my-bucket/data/file.csv\")\r\nprint(p.scheme) # s3\r\nprint(p.authority) # my-bucket\r\nprint(p.parts) # ['data', 'file.csv']\r\nprint(p.name) # file.csv\r\nprint(p.as_uri()) # s3://my-bucket/data/file.csv\r\nprint(p.with_suffix(\".json\")) # s3://my-bucket/data/file.json\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Universal filesystem interface with pluggable backends (local, S3, SFTP, ...).",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/Platob/pyXFS",
"Issues": "https://github.com/Platob/pyXFS/issues",
"Repository": "https://github.com/Platob/pyXFS"
},
"split_keywords": [
"filesystem",
" storage",
" s3",
" sftp",
" io",
" abstraction"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a4f8b3cd99a996d6f9384220ad4c4f2917d4acb6a7deccbd615a7063a5a53d31",
"md5": "6167d8daf750f46eb4e0525588b569ca",
"sha256": "1edf7df367eba82ee0efb58fb4fe3c0a78104ad177d3bfc068d7548a326fce8f"
},
"downloads": -1,
"filename": "pyxfs-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6167d8daf750f46eb4e0525588b569ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7028,
"upload_time": "2025-08-26T10:51:08",
"upload_time_iso_8601": "2025-08-26T10:51:08.039352Z",
"url": "https://files.pythonhosted.org/packages/a4/f8/b3cd99a996d6f9384220ad4c4f2917d4acb6a7deccbd615a7063a5a53d31/pyxfs-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d50b4ff4c5f199f1ea63804361fca4114f259da3b00c25bdd0d0e395a8b9cd27",
"md5": "6fbb89eae76d0ce8a73808c9c9a245cc",
"sha256": "eccff2fbb5acdd2b9d447c94610afcc061c022419ddbc24fec5b28751f90e65e"
},
"downloads": -1,
"filename": "pyxfs-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "6fbb89eae76d0ce8a73808c9c9a245cc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7664,
"upload_time": "2025-08-26T10:51:09",
"upload_time_iso_8601": "2025-08-26T10:51:09.389209Z",
"url": "https://files.pythonhosted.org/packages/d5/0b/4ff4c5f199f1ea63804361fca4114f259da3b00c25bdd0d0e395a8b9cd27/pyxfs-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-26 10:51:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Platob",
"github_project": "pyXFS",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyxfs"
}