Skip to main content

No project description provided

Project description

Python interface for invoice generation

Simple utility for PDF invoice generation in Python

Setup

  1. Install the module pip install pdf-invoice-util
  2. Copy config/config.example.yaml from the repository to config/config.yaml and update parameter values as desired
  3. Optionally configure terms by creating a translations/terms.[language].yaml file, check out the example file config/terms.example.yaml

Usage

  1. Import the module from pdf_invoice_util import Invoice, InvoicePDF
  2. Generate an invoice object eg. invoice = Invoice(invoice_id, invoice_date <YY-mm-dd>, customer_id, customer_name, customer_address, customer_postal_code, customer_city, customer_country, customer_vat_registered_number, vat_percentage)
  3. Set article lines by using the set_articles() method on the invoice object, eg. invoice.set_articles([{'name': 'Pizza margherita', 'price': 9.99, 'amount': 1}, {'name': 'Pizza fungi', 'price': 11.99, 'amount': 1}])
  4. Generate an InvoicePDF object eg. pdf = InvoicePDF(invoice <the invoice object>, invoice_language <the desired print language>)
  5. Generate the PDF by running the generate_document() method on the InvoicePDF object

Translations

Translations can be overwritten by copying the translation file into /translations folder

Contribution

Feel free or make proposals for code contributions and the addition of translation files for additional language support in this repository

Credits

Big thanks to Pluralsight (https://www.pluralsight.com) and Chart Explorers (https://www.youtube.com/@ChartExplorers) for the detailed descriptions on working with the used techniques

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

pdf_invoice_util-0.0.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

pdf_invoice_util-0.0.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file pdf_invoice_util-0.0.3.tar.gz.

File metadata

  • Download URL: pdf_invoice_util-0.0.3.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pdf_invoice_util-0.0.3.tar.gz
Algorithm Hash digest
SHA256 22f2d22130326ba624db3b2a1387255e8edef4496fe5dac2ca68a29efaddb819
MD5 3c7adfac1a04b1182a1bdc3b7e2c5786
BLAKE2b-256 eacdf97b1eca2f4851cdc39e011daac0a29a24adc851e0b45d3f0a3b45cfd99b

See more details on using hashes here.

File details

Details for the file pdf_invoice_util-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_invoice_util-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f91c6a989e871c5cc0f4b2ea043327b46cc7bd894e8f4f0439b76d5913a507a
MD5 4f329c03ea1a04d66e1a274a3e2a4e08
BLAKE2b-256 3ea1a10c8634c6025410a871a7732e43cea0c92353b14cf19ac6cfa728c3a9d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page