Skip to main content

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")

Metadata

Release files for zakatqr 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zakatqr 1.2.4
File Size Uploaded Provenance Actions
zakatqr-1.2.4.tar.gz 3.5 kB Without provenance Details for zakatqr-1.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zakatqr 1.2.4
File Interpreter ABI Platform Actions
zakatqr-1.2.4-py3-none-any.whl Python 3 none any Details for zakatqr-1.2.4-py3-none-any.whl

Total release size: 7.3 kB

Release files / zakatqr-1.2.4.tar.gz

Download URL zakatqr-1.2.4.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c1fea47d281073ce53c0f6c3554f7cc955c5c5d77da2158c370af1ba37d7e1c9
BLAKE2b-256 checksum
How to use checksums
32c915ecd9f57a0e339fd097b2b8968ace63c43f169f7f7b01f042fe7f1cf856
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / zakatqr-1.2.4-py3-none-any.whl

Download URL zakatqr-1.2.4-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e803239348535f256816a84e9c298f2e2d7b6465f3ec95e95cd51130eacf0898
BLAKE2b-256 checksum
How to use checksums
1b88b1f44a40c6903c7503108d52940bf6733e88e95933e64144aebfabb0005f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for zakatqr 1.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page