Generate beautiful invoices using Python.
Project description
Invogen
InvoGen is a package to generate beautiful invoices using Python.
Getting Started
To install InvoGen, simply run
pip install invogen
Using InvoGen
InvoGen is easy to use! In the command prompt or in a file type:
from invogen import *
foobar_inc = Customer("test", name="Foobar Inc.")
invoice = Invoice(foobar_inc)
invoice.add_entry(InvoiceEntry(
id_code="Test01",
description="Some entry item",
rate=5,
quantity=1,
))
invoice.shipping = 3
You can get a printout of your invoice like this:
>>> print(invoice)
Invoice for Foobar Inc. (test)
| ID | Description | Rate | Quantity | Amount |
+--------+----------------------+----------+----------+----------+
| Test01 | Some entry item | 5.00 | 1 | 5.00 |
+--------+----------------------+----------+----------+----------+
Sub-total: 5.00
Shipping: 3.00
Discount: -0.00
+---------------------+
Total: 8.00
To generate a PDF invoice using the default LaTeX template, use
template = LatexTemplate("default.tex")
template.to_pdf(invoice)
N.B. To use LaTeX templates, you will have to have LaTeX installed. You can find out how to install LaTeX for your system here.
Documentation
Documentation can be found on Read the Docs
The docs are built with Sphinx and autodoc. To build the docs as html yourself, use
cd docs
make html
Testing
The tests are in /test
.
To run the tests with coverage, use
pytest
Contributing
Please feel free to fork and open a pull request if you would like to change something.
The dependencies can be installed using pip and requirements.txt
or Pipenv and the Pipfile
.
More templates would be especially welcome!
Authors
- Samuel Searles-Bryant - website
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 invogen-0.3.0.tar.gz
.
File metadata
- Download URL: invogen-0.3.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 990dacae83bb11cd294921af8525c346258d610a179a463dfc4832ca8b3d0448 |
|
MD5 | a7b99a26cfc78d987893cb0893360958 |
|
BLAKE2b-256 | f0e3c860c8711c190343b5ca6f203adf92ebcb0011894bede2e5caef4f6c7007 |
File details
Details for the file invogen-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: invogen-0.3.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c70981de0a4a5c8be976fa773549bcc472432ca0da460c3d9622bde307f440e |
|
MD5 | 9687c2270143788d2a6d8bb719035289 |
|
BLAKE2b-256 | f87873a8f4bd4200ae341fdc99e3371893f7457a53975a5f82260d5429f1e228 |