Report

Simple Data Toolkit - Tutorial - ACM Events - Python

October 11, 2024 at 6:57 AM UTC
This post has no media.
Profile picture
Franklin Powers

Simple Data Toolkit provides an API for retrieving events from ACM (Association of Computing Machinery). (At the time of this writing, the release of this is pending for complete support, but it is coming soon)

To retrieve all events in Python, using Simple Data Toolkit, we can do the following:


from sdtk import com_sdtk_api_ACMAPI

def printer(data, reader):
print(reader.toArrayOfNativeMaps(None))

com_sdtk_api_ACMAPI.eventsAPI().retrieveData({}, printer)


We can also convert the transactions, to SDTK's internal event/calendar format with the ACMEventFormat class like so:


from sdtk import com_sdtk_api_ACMAPI,com_sdtk_calendar_ACMEventFormat

def printerEvents(data, reader):
acm = com_sdtk_calendar_ACMEventFormat.instance()
for event in reader.toArrayOfNativeMaps(None):
ci = acm.read(event)
print(ci)

com_sdtk_api_ACMAPI.eventsAPI().retrieveData({}, printerEvents)

Any thoughts on Franklin's post?

To comment or reply, you need an Ortingo account.

Sign in or sign up

Here's what Ortingoers think of Franklin's post.

There are no comments on this post.