A package to add metadata tags to objects saved in s3
Project description
AWS S3 Metadata Tagger
The S3 Metadata tagger adds information in the form of metadata to files saved in S3.
To do this, the central handler takes a file location and a metadata extracting function.
It first checks whether the file already contains the requested information via a HEAD
request.
If it does not, it downloads the file, invokes extracting function, and adds the metadata to
the s3 object with a inplace COPY, MetadataDirective="REPLACE"
operation.
This package comes with two optional variants for metadata extraction:
- PDF: for determining the number of pages in a pdf
- PICTURE: for determining the dimension of an image
Structure
object_tagger
contains the higher-level orchestration:
object_tagger.py
contains all the logic for checking whether the file has already been tagged, downloading it, invoking the metadata script, creating the tag object, and adding it to the s3 resource.
The metadata scripts are stored in their respective folders
pdf_tagger
The pdf tagger uses PyPDF2 to determine the amount of pages in a pdf
picture_tagger
Using Pillow, the script gets the width
and height
of the passed image
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
Built Distribution
Hashes for s3_metadata_tagger-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ffa43d5e6f13d5fcaf0a4c8b28a788ace5786ffdd569de1e19aeb56217d3e66 |
|
MD5 | 1619d13b573ad00a0882917b4689a108 |
|
BLAKE2b-256 | 921aaf40b5f9d25709ecdd2f2b12a2a6affd2550bd3cd5eb2a7dc7aeb8e69c0d |