Django App to Create Zakat Invoice QR Code Image
Project description
Django Zakat QR Code
Unofficial Python Package to create QR Code Image as Base64 or as PNG for e-invoice system by ZATCA
Installation
PyPi
$ pip install zakatqr
GitHub
$ git clone https://github.com/halmogbl/zakat_qr
$ cd zakat_qr
$ python3 setup.py install
Usage
Variables
Zakatqr class's variables and descriptions
| Variable Name | Description |
|---|---|
| seller_name | Seller’s name. |
| tax_number | Seller’ tax number, which is the VAT registration number. |
| timestamp | Invoice date, which is the timestamp of the electronic invoice. |
| total_with_vat | Invoice total amount, which is the electronic invoice total with VAT. |
| total_vat | Tax amount, which is the VAT total. |
Generate Base64
from zakatqr import Zakatqr
invoice = Zakatqr(
seller_name="Example",
tax_number="123456789",
timestamp="2021-06-25 07:58:56.550604",
total_with_vat="115",
total_vat="15",
)
print(invoice.tlv_to_base64())
# AQdNeSBuYW1lAgkxMjM0NTY3ODkDGjIwMjEtMDYtMjUgMDc6NTg6NTYuNTUwNjA0BAMxMTUFAjE1
Generate A QR Code Image as Base64
from zakatqr import Zakatqr
invoice = Zakatqr(
seller_name="Example",
tax_number="123456789",
timestamp="2021-06-25 07:58:56.550604",
total_with_vat="115",
total_vat="15",
)
print(invoice.qr_image_encoded_uri())
# data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...
Create A QR Code Image
from fatoora import Fatoora
invoice = Zakatqr(
seller_name="Example",
tax_number="123456789",
timestamp="2021-06-25 07:58:56.550604",
total_with_vat="115",
total_vat="15",
)
image = invoice.qr_code()
image.save("qr_code_img.png")
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
zakatqr-1.2.4.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zakatqr-1.2.4.tar.gz.
File metadata
- Download URL: zakatqr-1.2.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1fea47d281073ce53c0f6c3554f7cc955c5c5d77da2158c370af1ba37d7e1c9
|
|
| MD5 |
41cbda618204ba950fb9df53b3ce695a
|
|
| BLAKE2b-256 |
32c915ecd9f57a0e339fd097b2b8968ace63c43f169f7f7b01f042fe7f1cf856
|
File details
Details for the file zakatqr-1.2.4-py3-none-any.whl.
File metadata
- Download URL: zakatqr-1.2.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e803239348535f256816a84e9c298f2e2d7b6465f3ec95e95cd51130eacf0898
|
|
| MD5 |
e983ffda4d53e8cae82bd41d3c8fb74d
|
|
| BLAKE2b-256 |
1b88b1f44a40c6903c7503108d52940bf6733e88e95933e64144aebfabb0005f
|