Skip to main content

Python EET API

Simple to use and mostly secure (mainly pedantic) API for Czech EET Gate.

Instalation

pip install ...

Usage

Basic usage with single request

from eet import invoices, helpers

cert_text = b'''
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
'''

key_text = b'''
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
'''

# prepare certificate and private key
cert = helpers.parse_cert(cert_text)
pk   = helpers.parse_key(key_text)

# create config
config = invoices.Config(cert, pk, 141, "1patro-vpravo")

# create factory using config
factory = invoices.Factory(config)

# build new invoice & send
invoice = factory.new("141-18543-05", 236.00, zakl_dan1=100.0, dan1=21.0)
response = invoice.send()
# note: if resending, you should set `eet.invoice.Hlavicka["prvni_zaslani"] = eet.types.boolean(False)`
#       or use scheduler ;-)

# now validate response and get fik
codes = response.codes()
if response:
    print("BKP: {0}\nFIK: {1}".format(codes.bkp, codes.fik))
else:
    print("BKP: {0}\nPKP: {1}".format(codes.bkp, codes.pkp))

Example of scheduler

from eet import invoices, helpers, remote

... # prepare invoice as before

# create instance of scheduler
scheduler = remote.Scheduler()

# same as before but now you can resend invoices
response = scheduler.process(invoice)

# call dispatch is reasonable time interval from your mainloop

import time
while True:
    scheduler.dispatch()

    time.sleep(60)

Release files for czech-eet 1.0.1

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

Source distribution (sdist)

Source distribution for czech-eet 1.0.1
File Size Uploaded
czech-eet-1.0.1.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for czech-eet 1.0.1
File Interpreter ABI Platform
czech_eet-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / czech-eet-1.0.1.tar.gz

Download URL czech-eet-1.0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
78551f45a6b1b17dfb643be98546b92ba3ce5680abf20098b7f7de8a1bb9ee7c
BLAKE2b-256 checksum
How to use checksums
31f618c06cff205b361969eb66ce3290517421458e338f732a0398d68eff7ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.1

Release files / czech_eet-1.0.1-py3-none-any.whl

Download URL czech_eet-1.0.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fad0b87403b341c6228c399361624cb720303af2a086645692612dec821b686
BLAKE2b-256 checksum
How to use checksums
e6152bb2afa65f8ee25318536943b1c4582f52d43d6ddfe80043eea5f1434196
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.1

Release history Release notifications | RSS feed

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

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