s3path
What it is and what it does
S3Path wraps boto3's S3 resource with a pathlib-compatible API, so you can treat S3 buckets and keys like a local filesystem. Instead of learning boto3's object-oriented methods (put_object, list_objects, etc.), you use familiar pathlib patterns: iterdir() to list contents, glob() to find matching keys, the / operator to navigate paths, and open() to read or write objects. It also supports versioned S3 objects through a VersionedS3Path subclass.
The package depends on boto3 for AWS communication and smart-open for file-like access to S3 objects. It supports modern Python versions (3.9–3.13) and is classified as Beta. The maintainer has kept it active, though releases are infrequent; no known security vulnerabilities are recorded.
Use it for:
- List and navigate S3 bucket contents using pathlib-style iteration and path operations instead of boto3 API calls.
- Batch process files in S3 using glob patterns to find matching keys across nested prefixes.
- Read or write S3 objects via context managers (with open()) as if they were local files.
- Work with versioned S3 buckets by tracking and accessing specific object versions.
- Migrate local filesystem code to S3 with minimal refactoring by swapping pathlib.Path for S3Path.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
S3Path provides a pathlib-like interface for working with AWS S3 buckets and objects, letting you navigate, query, and manipulate S3 storage using familiar filesystem operations.
Yes, if you work regularly with S3 and prefer pathlib's ergonomics over boto3's API. Install friction is low, dependencies are stable, and the license is permissive. The aging maintenance status and infrequent releases are a minor concern but not a blocker—the package is stable and actively maintained. No security vulnerabilities are known.
Install
s3path on PyPI
pip
pip install s3pathuv
uv add s3pathpoetry
poetry add s3pathInstalling s3path
Before you install
Low friction: pure Python wheel with only two runtime dependencies (boto3 and smart-open). Maintenance is aging—last release was 202 days ago—but the repo is active and not archived, with a recent commit on 2026-01-24.
License in practice
Apache 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from s3path import S3Path
bucket_path = S3Path('/my-bucket/')
for item in bucket_path.iterdir():
print(item)
Requires AWS credentials configured (via environment variables, IAM role, or AWS config file) so boto3 can authenticate to S3.
Verify before relying
- Performance characteristics when working with very large S3 buckets or deeply nested key hierarchies.
- Whether all pathlib methods are fully implemented or if some operations have S3-specific limitations.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — boto3, smart-open |
| Maintenance | aging — 202 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,949,485/month — #2,809 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: s3path-0.6.5-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cloudpathlibProvides pathlib-style classes for reading,…
permissive · top 1,000 on PyPI
s3pathlibs3pathlib provides a pathlib-like…
permissive · top 5,000 on PyPI
synapse-s3-storage-providerA Synapse media storage provider that…
permissive · top 15,000 on PyPI
s3fss3fs provides a Python filesystem interface to…
permissive · top 100 on PyPI
s3urlsParse and build Amazon S3 URLs in multiple…
permissive · top 15,000 on PyPI
universal-pathlibUniversal Pathlib provides a pathlib.Path-like…
permissive · top 1,000 on PyPI
fs-s3fsS3FS provides a PyFilesystem interface to…
permissive · top 15,000 on PyPI
tentaclioTentaclio opens and manages streams across…
permissive · top 5,000 on PyPI
pathyPathy provides a pathlib-compatible interface…
permissive · top 5,000 on PyPI
aws-s3-access-grants-boto3-pluginA boto3 plugin that integrates AWS S3 Access…
unclear · top 15,000 on PyPI