No project description provided
Project description
Python interface for invoice generation
Simple utility for PDF invoice generation in Python
Setup
- Install the module
pip install pdf-invoice-util
- Copy
config/config.example.yaml
from the repository toconfig/config.yaml
and update parameter values as desired - Optionally configure terms by creating a
translations/terms.[language].yaml
file, check out the example fileconfig/terms.example.yaml
Usage
- Import the module
from pdf_invoice_util import Invoice, InvoicePDF
- 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)
- 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}])
- Generate an InvoicePDF object eg.
pdf = InvoicePDF(invoice <the invoice object>, invoice_language <the desired print language>)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f2d22130326ba624db3b2a1387255e8edef4496fe5dac2ca68a29efaddb819 |
|
MD5 | 3c7adfac1a04b1182a1bdc3b7e2c5786 |
|
BLAKE2b-256 | eacdf97b1eca2f4851cdc39e011daac0a29a24adc851e0b45d3f0a3b45cfd99b |
File details
Details for the file pdf_invoice_util-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pdf_invoice_util-0.0.3-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f91c6a989e871c5cc0f4b2ea043327b46cc7bd894e8f4f0439b76d5913a507a |
|
MD5 | 4f329c03ea1a04d66e1a274a3e2a4e08 |
|
BLAKE2b-256 | 3ea1a10c8634c6025410a871a7732e43cea0c92353b14cf19ac6cfa728c3a9d4 |