Skip to main content

UPathTools

PyPI License Package status Monthly downloads Distribution format Wheel availability Python version Implementation Releases Github Contributors Github Discussions Github Forks Github Issues Github Issues Github Watchers Github Stars Github Repository size Github last commit Github release date Github language count Github commits this month Package status PyUp

Async-first helpers, typed base classes and a large collection of filesystems for fsspec and universal-pathlib.

📖 Documentation: https://phil65.github.io/upathtools/

Installation

uv add upathtools
# optional backends are extras, e.g.
uv add "upathtools[httpx,sqlite,mcp]"

Requires Python 3.13+.

Quickstart

import asyncio

from upathtools import AsyncUPath, list_files, read_folder


async def main() -> None:
    path = AsyncUPath("notes/hello.txt")
    await path.parent.amkdir(parents=True, exist_ok=True)
    await path.awrite_text("Hello from upathtools!")
    print(await path.aread_text())

    # Read many files concurrently (works for any fsspec protocol: s3://, gcs://, ...)
    files = await read_folder("notes", pattern="**/*.txt")
    for name, content in files.items():
        print(name, len(content))

    print(await list_files("notes", pattern="**/*.txt"))


asyncio.run(main())

Filesystems can be used directly or combined:

from upathtools.filesystems import IsolatedMemoryFileSystem, PackageFileSystem, UnionFileSystem

pkg = PackageFileSystem("upathtools")  # browse an installed package's modules
print(pkg.get_upath("helpers").read_text()[:34])

docs = IsolatedMemoryFileSystem()
docs.pipe_file("/readme.md", b"# Hi")

union = UnionFileSystem({"pkg": pkg, "docs": docs})  # mount filesystems side by side
print(union.ls("/", detail=False))  # ['pkg', 'docs']
print(union.cat_file("docs/readme.md"))

Features

  • AsyncUPath: async versions of the UPath API (aread_text, awrite_bytes, aiterdir, aglob, acopy, ...), falling back to threads for sync filesystems.
  • Batch operations: read_folder, list_files, read_folder_as_text, read_path, fsspec_grep with parallel loading.
  • Typed base classes: BaseAsyncFileSystem[TPath, TInfoDict], BaseUPath[TInfoDict], WrapperFileSystem, BaseAsyncFileFileSystem for building your own filesystems with typed info dicts, get_upath(), get_tree() and a shell-like cli("grep TODO . -r").
  • Filesystems (registered as fsspec / UPath protocols via entry points):
    • file contents: Markdown sections, SQLite tables, tree-sitter code, OpenAPI and JSON Schema specs
    • Python: installed packages (pkg://), distributions, Pydantic models and instances
    • remote: HTTP (httpx), GitHub Gists / Issues / Wiki, GitLab, Linear, Notion, Appwrite, MCP resources and tools
    • sandboxes: E2B, Modal, Daytona, Beam, Vercel, Cloudflare, Microsandbox, HopX, Sprites, Codex, SRT
    • combining: union (mount points), flat union (merged view), overlay (layered writes), delegating (file.md::Section access into files)
  • upathtools_config: lightweight pydantic models describing filesystems (FilesystemConfigType discriminated union) with create_fs().
  • Helpers: to_upath, upath_to_fs, copy, write_file, multi_glob, directory trees, pydantic UPath field types.

License

MIT

Metadata

Release files for upathtools 1.24.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upathtools 1.24.0
File Size Uploaded Provenance Actions
upathtools-1.24.0.tar.gz 225.4 kB With provenance Details for upathtools-1.24.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for upathtools 1.24.0
File Interpreter ABI Platform Actions
upathtools-1.24.0-py3-none-any.whl Python 3 none any Details for upathtools-1.24.0-py3-none-any.whl

Total release size: 508.7 kB

Release files / upathtools-1.24.0.tar.gz

Download URL upathtools-1.24.0.tar.gz
Size 225.4 kB
Tags Source
SHA-256 checksum
How to use checksums
126daa2a6bf067366fb05821736dc9bf06f3729127e09a3d4729f58c8a4e010f
BLAKE2b-256 checksum
How to use checksums
f53694ece295ba68cbd178cdb9dea6ef0254b1574830d53dd0e9ffb39db03b2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / upathtools-1.24.0-py3-none-any.whl

Download URL upathtools-1.24.0-py3-none-any.whl
Size 283.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2db4e067404e72066e421bdc6e33f871f656517d1d9821fa62091714938cc458
BLAKE2b-256 checksum
How to use checksums
1bfcf4af235f45b0a739cb2c61a74370c6f9aec56a7f6ab63ecb7a2943d3cd48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for upathtools 1.24.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for upathtools-1.24.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.24.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page