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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdf_invoice_util-0.0.2.tar.gz
  • Upload date:
  • Size: 9.0 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.2.tar.gz
Algorithm Hash digest
SHA256 2694d2b170f5b77364f1ac4a3b0686b300db096fde272fe1cab0666dd7e844a5
MD5 6b6d37679a1cd1b832ca6639533af836
BLAKE2b-256 fdecc4a05d91b0b6b3dd24f62821a0e76ab7f0dcec893e8240f5a8a10f2dee61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdf_invoice_util-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17929aef6c78ad67873d6058059e81753d6576a4dd8c324d2476c615a1ac763b
MD5 d9ca0bd16f5e69f45ada9a2cd5455529
BLAKE2b-256 dba2a7c1bc2db8944898aca078ade3342eb9f4e22d3cd13a86b03833bcfa5a8c

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