Skip to main content

PyS3

Minimal wrapper for S3 functionality in boto3.

Installation

pip install pys3

Example

from pys3 import PyS3

# Local file
file = PyS3('/path/to/file.txt', 'w')
file.write('Hello World!')
file.close()

# File on S3
file = PyS3('s3://bucket_name/path/to/file.txt', 'w')
file.write('Hello World!')
file.close()

Prerequisites

pys3 uses boto3 as a back-end. Thus, credentials for AWS must be set up according to that framework. For example, place the acces key ID and secret key in the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

How it works

Upon creation of a PyS3 file object, it is checked whether the passed file URL refers to a location on S3. If so, a local copy of the file is downloaded (provided it exists). When the close() method is called, any modifications to the local file are uploaded.

Release files for pys3 0.0.5

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

Source distribution (sdist)

Source distribution for pys3 0.0.5
File Size Uploaded
pys3-0.0.5.tar.gz 2.4 kB Details

Release files / pys3-0.0.5.tar.gz

Download URL pys3-0.0.5.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
90d4e126805644854c3748e7c6f283dc7e522fbfc212b0857edd176c684efd00
BLAKE2b-256 checksum
How to use checksums
77126a45947c9697509913054f2a166463139fb68a34cd5207635ff5db3809a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

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