Skip to main content

Simple S3 download tool.

Project description

S3Fetch

Easy to use, multi-threaded S3 download tool.

Source: https://github.com/rxvt/s3fetch

Features:

  • Simple to use.
  • Multi-threaded, allowing you to download multiple objects concurrently (defaults to amount of cores available).
  • Quickly download a subset of objects under a prefix without listing all objects.
  • Filter list of objects using regular expressions.
  • Uses standard Boto3 AWS SDK and standard AWS credential locations.
  • Dry run mode if you just want to see what would be downloaded.

Installation

Requirements

  • Python >= 3.7

S3Fetch is available on PyPi and be installed via one of the following methods Prior to running it ensure you have AWS credentials configured in one of the standard locations.

pipx (recommended)

Ensure you have pipx installed, then:

pipx install s3fetch

pip

pip3 install s3fetch

Usage:

Usage: s3fetch [OPTIONS] S3_URI

  Easily download objects from an S3 bucket.

  Example: s3fetch s3://my-test-bucket/birthday-photos/2020-01-01

  The above will download all S3 objects located under the `birthday-
  photos/2020-01-01` prefix.

  You can download all objects in a bucket by using `s3fetch s3://my-test-
  bucket/`

Options:
  --region TEXT        Bucket region. Defaults to 'us-east-1'.
  -d, --debug          Enable debug output.
  --download-dir TEXT  Download directory. Defaults to current directory.
  --regex TEXT         Filter list of available objects by regex.
  --threads INTEGER    Number of threads to use. Defaults to core count.
  --dry-run            Don't download objects.
  --delimiter TEXT     Specify the directory delimiter. Defaults to '/'
  -q, --quiet          Don't print to stdout.
  --help               Show this message and exit.

Examples:

Full example

Download using 4 threads, into ~/Downloads/tmp, only downloading objects that end in .dmg.

$ s3fetch s3://my-test-bucket --download-dir ~/Downloads/tmp/ --threads 4  --regex '\.dmg$'
test-1.dmg...done
test-2.dmg...done
test-3.dmg...done
test-4.dmg...done
test-5.dmg...done

Download all objects from a bucket

s3fetch s3://my-test-bucket/

Download objects with a specific prefix

Download all objects that strt with birthday-photos/2020-01-01.

s3fetch s3://my-test-bucket/birthday-photos/2020-01-01

Download objects to a specific directory

Download objects to the ~/Downloads directory.

s3fetch s3://my-test-bucket/ --download-dir ~/Downloads

Download multiple objects concurrently

Download 4 objects concurrently.

s3fetch s3://my-test-bucket/ --threads 4

Filter objects using regular expressions

Download objects ending in .dmg.

s3fetch s3://my-test-bucket/ --regex '\.dmg$'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

s3fetch-1.0.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

s3fetch-1.0.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file s3fetch-1.0.2.tar.gz.

File metadata

  • Download URL: s3fetch-1.0.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for s3fetch-1.0.2.tar.gz
Algorithm Hash digest
SHA256 269d882781032f051936b0660496c02d8c9bee36de4b46ce1571ee47ec4f53f0
MD5 3743012565c79c234d693d6336bad3d7
BLAKE2b-256 5e8c34f4a94e8877a9a6cf6ed2da44c8d42423ef5e5dac4bb14e8069ef71d639

See more details on using hashes here.

File details

Details for the file s3fetch-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: s3fetch-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1032-azure

File hashes

Hashes for s3fetch-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cad0e3d4c41861e2d6b988d9f02ce3f75cf26f1af7ef348c29cb146e9f04e595
MD5 d552921ce369cd4b9322186cd7b5a383
BLAKE2b-256 48075bfd45ca8774a52ea334ecc82623c4f8214e488ea19eb0d2d48d334c1583

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page