I've had success running python scripts and returning class properties to Delphi.
I'm struggling with where to start to return a python tuple (containing an OrderedDict and a string to a Delphi collections. The module is usaddress and I'm using as follows:
script
from collections import OrderedDict
import usaddress
od = OrderedDict()
od = usaddress.tag('5757 Woodway Ave APT 150 WEST PALM BEACH FL 37205 ')
print(od)
print(type(od))
first = od[0]
print(first)
print(type(first))
second = od[1]
print(second)
print(type(second))
and the output is this:
(OrderedDict({'AddressNumber': '5757', 'StreetName': 'Woodway', 'StreetNamePostType': 'Ave', 'OccupancyType': 'APT', 'OccupancyIdentifier': '150', 'PlaceName': 'WEST PALM BEACH', 'StateName': 'FL', 'ZipCode': '37205'}), 'Street Address')
<class 'tuple'>
OrderedDict({'AddressNumber': '5757', 'StreetName': 'Woodway', 'StreetNamePostType': 'Ave', 'OccupancyType': 'APT', 'OccupancyIdentifier': '150', 'PlaceName': 'WEST PALM BEACH', 'StateName': 'FL', 'ZipCode': '37205'})
<class 'collections.OrderedDict'>
Street Address
<class 'str'>
Guiding me to a starting point would be appreciated.