This package createds a PDF file from selected s3 objects
Project description
CPP_AWS_S3_PDF
Overview
Cpp_aws_s3_pdf is a Python utility library designed to streamline the process of combining objects from Amazon S3 into a single PDF file. This tool is ideal for users who need to aggregate content stored in S3 buckets and generate consolidated PDF documents for reports, archives, or data presentation.
Features
- S3 Integration: Seamlessly connect to Amazon S3 buckets and access objects.
- PDF Generation: Efficiently combine multiple objects into a single PDF file.
- Security: Ensures secure access to S3 resources with AWS credentials, with expiration on combined files.
Installation
To install Your-Library-Name, simply use pip:
pip install cpp_aws_s3_pdf
Usage
Here's a quick start on how to use cpp_aws_s3_pdf
:
-
Set up AWS Credentials: Ensure your AWS credentials are configured properly. This can be done by following the guidelines outline on the Boto3 Configuration Page.
-
Import and Initialize:
from cpp_aws_s3_pdf.s3_pdf import S3Pdf
s3_pdf = S3Pdf(bucket_name='your-bucket-name')
- Combine S3 Objects into PDF:
objects_to_combine = ['object_key1', 'object_key2', ...]
download_url = s3_pdf.combine_objects(objects_to_combine, output_bucket_name='my_combine_bucket')
# object is over-written with watermarked object in bucket
s3_pdf.watermark_file(objects_to_combine[2], "This is a sample watermark.")
# convert_object_to_pdf
download_url = convert_image_to_pdf("object_image.jpg")
Configuration
- AWS Region: Set the AWS region where your S3 bucket is located.
Dependencies
- AWS
- boto3
- PyPDF
- Pillow
For local development
- Clone repository
https://github.com/noble-cc/cpp_aws_s3_pdf.git
-
Create
venv
environment and activate environment -
Build project
python -m build
To install project locally:
pip install <file_path>*-any.whl
License
This project is licensed under the MIT License.
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 cpp_aws_s3_pdf-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f1906c7c7f838a8e2ea99253f7c3bcfb70e513f7066aea365ac2d5a5e76c117 |
|
MD5 | 70c5b467cb8b83c86e103291093ea799 |
|
BLAKE2b-256 | b93369f1399674c082b1cd3fdf8b70685acdf631bb5ee412c4f94fb736b39548 |