Skip to content

nogsantos/poc-python-pdf

Repository files navigation

poc-python-pdf

Poc to work with pdf in python

Setup

  1. Create virtual env with virtualenv
  2. Enable virtual env
  3. Install dev dependencies
  4. Create .env file
  5. Migrate the database
  6. Run the server
virtualenv .poc_python_pdf -p python3
source .poc_python_pdf/bin/activate
pip install -r requirements-dev.txt
cp ./contrib/.env.sample ./.env
./manage.py migrate
./manage.py runserver

Access

View docs

http://127.0.0.1:8000/docs

Generate pdf

http://127.0.0.1:8000/api/v1/

Tools

Lint

flake8 .

tests-coverage

coverage run manage.py test -v 2 --noinput --failfast --parallel
coverage report -m
coverage html

Publish

To publis on heroku The Heroku CLI

  1. Create an instance
  2. Send configurations to Heroku
  3. Defines a secret key to instance
  4. Set DEBUG=False
  5. Configure email send service
  6. Send the code
heroku create my-new-instance
heroku config:push
heroku config:set SECRET_KEY='python contrib/secret_gen.py'
heroku config:set DEBU=False
# email configurations
git push heroku master --force

About

Poc Python Django Weasyprint pdf gen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published