Skip to main content
Version: 8 - Apfelstrudel

Third-Party Python Modules

Engine flows are written in Python 3.8. In addition to all standard Python modules several third-party modules are available.

Use Cases

The third-party Python modules serve different purposes. Please refer to their individual documentation pages which are linked below.

Available Third-Party Python Modules

The following third-party Python modules are available to be used in your flow scripts:

Module nameDescriptionLinks
arrowBetter dates & times for Python
chevronA Python implementation of mustache
gensonGenSON is a powerful, user-friendly JSON Schema generator built in Python
holidaysGenerate and work with holidays in Python
html5libStandards-compliant library for parsing and serializing HTML documents and fragments in Python
iso3166Standalone ISO 3166-1 country definitions
jsonschemaAn implementation of the JSON Schema specification for Python
lxmlThe lxml XML toolkit for Python
markdownA Python implementation of John Gruber’s Markdown with Extension support.
mathplotlibplotting with Python
numpyThe fundamental package for scientific computing with Python
pandasFlexible and powerful data analysis / manipulation library for Python
passlibThe Passlib Python Library
pdf2imageA python module that wraps the pdftoppm utility to convert PDF to PIL Image object
pdftotextSimple PDF text extraction
phonenumbersPython port of Google's libphonenumber
PillowPython Imaging Library
pycryptodomexA self-contained cryptographic library for Python
pyjwtJSON Web Token implementation in Python
pyotpPython One-Time Password Library
pyqueryA jquery-like library for python
python-dateutilUseful extensions to the standard Python datetime features
pytzWorld Timezone Definitions for Python
pyyamlPyYAML-based module to produce pretty and readable YAML-serialized data
tiktokentiktoken is a fast BPE tokeniser for use with OpenAI's models
ujsonUltra fast JSON decoder and encoder written in C with Python bindings
yarlYet another URL library

Contact us at to request additional Python modules.


Parse a PDF File

You can access the content of PDF files directly in your flow script.


Access a date written in a PDF file

import re
import base64
import io
import pdftotext
import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
pdf_name = 'example.pdf'
# Open the Engine file object
pdf_file = system.file(pdf_name)
# Files contain binary content which is returned base64 encoded
file_base64 = pdf_file.get('content')
file_bytes = base64.b64decode(file_base64)
# Construct a `PDF` object from the bytes
pdf = pdftotext.PDF(io.BytesIO(file_bytes))
# Access the text of the first page of the PDF file
pdf_text = pdf[0]
# Clear the PDF object, so that the file object is closed
pdf = None
# Use a Regex to find the date
the_date ='Date:\s*(\d{4}-[01]\d-[0-3]\d)', pdf_text).group(1)
return this.success('all done')

Work with CSV Files

You can use the csv module to read CSV files into Python objects or write Python objects into CSV files.


Create a CSV file and send it by email.

import base64
import csv
import io
import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
fake_data_list = [
{'name': 'spam', 'number': 1},
{'name': 'eggs', 'number': 2},
{'name': 'foo', 'number': 3},
{'name': 'bar', 'number': 4},
result_file = io.StringIO()
csv_writer = csv.DictWriter(
fieldnames=['name', 'number'],
for data in fake_data_list:
csv_content = result_file.getvalue()
result_file = None
csv_writer = None


subject= 'Result',
text='See the attached file',
password= '****',
smtp_host= '',
smtp_port= 587,
use_tls= True,
attachments= [

return this.success('all done')