git+https://github.com/asfadmin/Discovery-WKTUtils.git@prod#egg=WKTUtils
(The package name will be 'WKTUtils'. You can change 'prod' to desired branch).
python3 -m pip install -r requirements.ext --upgrade
You must open shapefiles in read binary mode, before passing them into the function.
from WKTUtils.FilesToWKT import filesToWKT
f = open("path/to/file.shp", "rb")
# NOTE: f can be a list of files too. filesToWKT([f1, f2, ...]).getWKT()
wkt = filesToWKT(f).getWKT()