Pulls (filtered) files from S3 and adds them to a tar archive.
Project description
s3tar
Pulls (filtered) files from S3 and adds them to a tar archive.
Creates the command line script star
.
$ star --help
Usage: star [OPTIONS] PATH
Generates a tar archive of S3 files.
Files are selected by a path made up of 'bucket/prefix' and optionaly by a
time-based filter.
'profile' is the AWS CLI profile to use for accessing S3. If you use
chaim or cca then this is the alias name for the account.
The time based filter relies on the files being named with ISO Formatted
dates and times embedded in the file names. i.e.
'file.2020-03-04T12:32:21.txt' The regular expression used is:
/.*[._-]{1}([0-9-]{10}T[0-9:]{8}).*/
The 'start' and 'end' parameters can either be ISO formatted date strings
or unix timestamps. If only the date portion of the date/time string is
given the time defaults to midnight of that day.
The length parameter is a string of the form '3h', '2d', '1w' for,
respectively 3 hours, 2 days or 1 week. Only hours, days or weeks are
supported. The 'length' and 'end' parameters are mutually exclusive, give
one or the other, not both.
If neither the 'end' nor the 'length' parameter is given, the end time
defaults to 'now'.
If the 'start' parameter is not given no filtering of the files is
performed, and all files found down the path are copied across to the tar
archive recursively.
Options:
-e, --end TEXT optional end time
-l, --length TEXT optional time length (i.e. 1d, 3h, 4w)
-p, --profile TEXT AWS CLI profile to use (chaim alias)
-s, --start TEXT optional start time
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
s3tar-1.0.0.tar.gz
(3.6 kB
view details)
Built Distribution
s3tar-1.0.0-py3-none-any.whl
(4.3 kB
view details)
File details
Details for the file s3tar-1.0.0.tar.gz
.
File metadata
- Download URL: s3tar-1.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.5.13-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2123ab75ea4faaef8dd810bf13290e2c44a0f9d249a8fe367bff4a870c897237 |
|
MD5 | 172514c102b5a4f008fe87f08b108db5 |
|
BLAKE2b-256 | 612207d51a2f9c57e383fcdc14981b790845db71cf43bce398cecc6a0228edcf |
Provenance
File details
Details for the file s3tar-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: s3tar-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.5.13-1-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23196eb64d626a616432fc66d68a7c52d86e7309203a558f31e3ce513fe6afff |
|
MD5 | e04a608eeb1e3dc44f1315bae3dac2a5 |
|
BLAKE2b-256 | 8d3ad7876433d0c8f990e7cb7bc87e6aa8401b5c080ae27b5f6de0f83e9bfdfc |