Skip to main content

s3workers

https://img.shields.io/pypi/v/s3workers.svg https://img.shields.io/travis/bradrf/s3workers.svg Documentation Status Updates

Helper to simplify concurrent access to object scanning in AWS S3 buckets.

Features

S3workers provides faster list and delete operations on S3 buckets by opening up simultaneous connections to issue distinct sets of shared prefix queries. Effectively, this splits up the query space into 36 independent queries (26 alpha and 10 numeric prefixes). For example, a request to list all objects in the myfancy/ bucket would result in concurrent list queries to S3 for everything from myfancy/a... through myfancy/b... and everything from myfancy/0... through myfancy/9..., all at the same time, reporting and collating the results locally.

Selection

The default output of s3workers is to simply list (or delete) all objects found at the prefix requested. However, often it is advantageous to restrict the output to only those matching certain criteria. The --select option provides the ability for evaluating matches using any normal Python operators or builtins against one or more of the following variables provided to the selector for each object found:

  • name: The full S3 key name, everything except the bucket name (string)

  • size: The number of bytes as used by the S3 object (integer).

  • md5: The MD5 hash of the S3 object (string).

  • last_modified: The timestamp indicating the last time the S3 object was changed (string).

Reduction

In cases where aggregation of some kind is desired, s3workers provides the ability to execute reduction logic against an accumulator value. For example, to produce a sum of the size of all selected S3 objects or to even group the size according to MD5 values. See the usage output for examples. In all cases, the same variables provided by selection are also provided when reducing.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.3.0 (2017-01-01)

  • Refactor/reorg code for usability/readability; add docs; add tests.

0.2.0 (2016-12-30)

  • Minor fixes, adding docs, using common logging options.

0.1.0 (2016-12-28)

  • First release on PyPI.

Metadata

Release files for s3workers 0.3.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 s3workers 0.3.0
File Size Uploaded
s3workers-0.3.0.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for s3workers 0.3.0
File Interpreter ABI Platform
s3workers-0.3.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 29.9 kB

Release files / s3workers-0.3.0.tar.gz

Download URL s3workers-0.3.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7c53c0849986fdcc3893f01c64d4d07763ef54850e905853088915b8c3afaa5c
BLAKE2b-256 checksum
How to use checksums
e15070a7920c74c00782f6c68e62d56089015e833d8b836eae22fa58d0d99f0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / s3workers-0.3.0-py2.py3-none-any.whl

Download URL s3workers-0.3.0-py2.py3-none-any.whl
Size 12.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8714c5fc43139a6decbd1d1b0d6bb7e2052d300033a7bc7923c5d55a95d1d5ff
BLAKE2b-256 checksum
How to use checksums
c5cfed0927020592895ae9cfe26e0bed0b1d00ae01024b1f5f0ad83dd27bbec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

1 release file

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