Skip to main content

s3async

Helper functions for interacting with s3. Provides synchronous and asynchronous functions and CLI-entrypoints.

Public asynchronous functions are differentiated from synchronous ones with the suffix _async. Typically one can find a non-suffixed version of the same function which wraps the async call in a sync function (e.g. for CLI usage).

Batch operations such as sync, listing keys, and recursive copy/delete operations will always do the bulk of their work asynchronously.

Command line interface

Commands:
  cp    Copy S3 object
  hash  Computes a MD5 digest of a file
  ls    List s3 object paths
  meta  Get object metadata information
  rm    Delete S3 object
  sync  Sync objects between local and S3 path or two S3 paths
  tag   Set and get object tags

Notes on syncing

Default sync is non-recursive, i.e. it only copies the current folder to the provided prefix or vice-versa. For recursive behaviour one needs to use option --recursive which will then compare paths relative to working directory/prefix and sync to matching relative path.

There are three options for comparing whether a file should be synced or not:

  • etag - Automatically computed ETag which is "usually" a MD5 hash of the content will be compared against local file content MD5 hash
  • hash - Comparison will be made against a custom tag called hash, which should contain the MD5 hash of the content. Use this if you can't trust ETag to be correct for your files. If selected, the tag will be set automatically by sync.
  • timestamp - Last modified timestamp; will sync if target_timestamp < source_timestamp with the resolution of one second. Local timestamps will be set to match the S3 timestamps but the opposite is not possible.

Testing

Tests are ran against minio which implements the S3 specification.

Minio is automatically ran in a docker container by pytest-docker. The docker-compose file that sets up the minio is located in ./tests/docker-compose.yml.

Metadata

Release files for s3async 1.0.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 s3async 1.0.0
File Size Uploaded Provenance Actions
s3async-1.0.0.tar.gz 17.7 kB Without provenance Details for s3async-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 39.9 kB

Release files / s3async-1.0.0.tar.gz

Download URL s3async-1.0.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
384ac5226370d6857c542a1c428dbbee8a51b0680c18ca273b68cd6254e5be89
BLAKE2b-256 checksum
How to use checksums
7672218c5fcc023163ece49d8ead6b7b5ee2e74fa2cda93f42f11371b64c0b1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / s3async-1.0.0-py3-none-any.whl

Download URL s3async-1.0.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09c42edf2f2cc110e160ed93a29a36fffb1279b994a25cc5dd077b138b4ee597
BLAKE2b-256 checksum
How to use checksums
8137746ca51cd0cdb280a229f100d28e0052532344878d4d8e11d5579ec40907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Security for s3async 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0.0 This release

2 release files No 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