Generate and send by email a PDF attestation required by french gov to go out during confinement. Example of generated attestation Can be used through:
- http call
- Raspberry pin (soon)
- Python3
- virtualenv (not mandatory but helpful)
This app was mainly tested with gmail address
- Create a gmail account (better to not use your usual one)
- Allow external systems to use this address: here
# create venv
virtualenv -p python3 .venv
# activate venv
source ./.venv/bin/activate
# install dependencies
pip install -r requirements.txt
Config is made through the file config.yaml
You can either modify it or copy paste it and put the name of the new one in the env var COVID_ATTEST_CONF_FILE
python3 ./main.py
In the attestation you can choose between 9 possible reasons of getting out see example.pdf
You can choose multiple reasons when calling the app
Reasons are identified by a number according to their position in the list.
Example:
-
Déplacements entre le domicile et le lieu d'exercice de l'activité professionnelle ou un établissement d'enseignement ou de formation...
-
Déplacements pour effectuer des achats de fournitures nécessaires à l'activité professionnelle, des achats de première nécessité(3) dans des établissements dont les activités demeurent autorisées...
-
...
Possible query params:
- firstname: used in the attestation
- lastname: used in the attestation
- birthdate: used in the attestation
- place_birth: used in the attestation
- sign_place: used in the attestation
- address: used in the attestation
- receiver_email: Recipient address of the attestation
- reasons: reasons to checked in the attestation (see reasons paragraph). Example: 1,2
For any unused param, the default config will be used
Example:
curl -X GET \
'http://localhost:5050/get-attestation?reasons=1,2&firstname=John&lastname=Die&birthdate=01/01/2000&place_birth=Bayonne&sign_place=Paris&address=1%20rue%20de%20l%27%C3%A9glise,%2075015,%20Paris&[email protected]'