Skip to main content

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

cpp_aws_s3_pdf-1.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

cpp_aws_s3_pdf-1.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file cpp_aws_s3_pdf-1.1.1.tar.gz.

File metadata

  • Download URL: cpp_aws_s3_pdf-1.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for cpp_aws_s3_pdf-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9a162ecd2da847bd3daa732e9427db12316a697aa67fb919b4285a48761ca1a2
MD5 a94d437d0f29cb6a3e1968894160e112
BLAKE2b-256 669b3eeb86c80f96ad3a671069e182c1e8f0c4785a903931f361edc5cc782a6a

See more details on using hashes here.

File details

Details for the file cpp_aws_s3_pdf-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: cpp_aws_s3_pdf-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for cpp_aws_s3_pdf-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2faf3e5020e35b0d2a537ae629c9c9e8cf2dce5a79fc44bad3aa01d231825439
MD5 df5dcb115d5794971bf51475cede5205
BLAKE2b-256 b47acaf464e9965491f18ea6e3c9ff91d55e7f0ee7957c76b1b24afe4c738e0e

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