https://yoongkang.com/blog/pdf-forms-with-python/
https://github.com/t-houssian/fillpdf
https://github.com/ccnmtl/fdfgen/
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
https://github.com/revolunet/pypdftk
https://answers.acrobatusers.com/export-fdf-Acrobat-DC-q274790.aspx
For my recent python + pdf form filling experience, I did an install of pdftk, and then used the pypdftk library.
To get the list of fillable fields out of the form use:
from ppretty import ppretty
import pypdftk
os.environ['PDFTK_PATH'] = "C:/Program Files (x86)/PDFtk/bin"
template_form = 'path/to/template.pdf'
data_fields = pypdftk.dump_data_fields(template_form)
print(ppretty(data_fields, seq_length=100))
Then to actually fill it in, drop in an appropriate dictionary and put it in this:
filled_form = 'path/to/filled/form_' + timestamp_str + '.pdf'
generated_pdf = pypdftk.fill_form(template_form, datas, out_file=filled_form, flatten=True)