Skip to content

EdwardOwusuAdjei/PyPdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPDF

Create PDF files from using html templates stored on disk or s3 (more source to come) and have parts of the templates replaced using mustache

Installation

Use the package manager pip to install XXX.

pip install XXX-NOT-YET-THERE

Usage

from generator.main import set_aws_credentials, generate
from generator.targets import Targets


replacement_definition = {
        "name": "Hello World"
}

s3_key = "sample.html"

# set credential can be called once. These credentials are remembered.
set_aws_credentials(ACCESS_KEY, ACCESS_SECRET, BUCKET_NAME)
value = generate(replacement_definition, s3_key, Targets.Amazon)
# value contains pdf content in bytes,
# can be written to disk or returned as response 
# in which ever framework you are using

Contributing

For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Create PDF using template from multiple sources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages