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.4.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdf_invoice_util-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f77df1b0aa6fa21e25a206ea7bd83eba65677c84da3e988d8af9ea1f5a5b1690
MD5 d8094bd48ae786b3dc09e568b1bffbb2
BLAKE2b-256 2a7aabe7f84117dc789139a4498c5211268b3bb593ab8e74e15e38abe4bc4928

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdf_invoice_util-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dffe496474147fdde66a9d94338d8d5520719823c3e188fa9bc8601c0370d7b2
MD5 6cbaf6bf59909a20c4ae0846a5c4c3ed
BLAKE2b-256 39c2f61b3015fcc1cefdc0c8003f83849b371f61262d1a1f22a2542e9cf5b463

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