panzi / verify-ehc

Simple Python script to decode and verify an European Health Certificate QR-code
60 stars 17 forks source link

refactoring to use it as a module / package? #14

Closed wolfgang-reutz closed 3 years ago

wolfgang-reutz commented 3 years ago

Hi,

as I need to use health certificate verification in a Django web app I would propose to refactor the code to be used as a package.

I plan to do:

What do you think about that idea? If I refactor it, would it be possible to be merged (pull request)?

panzi commented 3 years ago

Yeah sorry but that is not the scope of this script. As you can see this script has a lot of print()s and stuff in it that wouldn't be needed at all in another context. If you reduce it to the core functionality of decoding and verifying of the QR-code it will be a fraction of the size. See e.g. (provided by the EU): https://github.com/ehn-dcc-development/ehn-sign-verify-python-trivial/blob/main/hc1_verify.py (Ignore the weird name mangling in lines 272 to 276.)

So you can extract whatever functionality you need from my script (under the terms of the MIT license) and make your own lib. :D