I'm new to Python. I would like to run Context.io 's Python script in KNIME to import IMAP email into a database. I have loaded the required dependencies according to the Github directions.
https://github.com/contextio/Python-ContextIO
The Github directions state that
"You first need to instantiate the main ContextIO object with your API credentials:
import contextio as c
CONSUMER_KEY = 'YOUR_API_KEY'
CONSUMER_SECRET = 'YOUR_API_SECRET'
context_io = c.ContextIO(
consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET
)
Do I accomplish this using node type Python Object Writer, Python Source, Python Script, or something else?
Thank you
import contextio as c
CONSUMER_KEY = 'YOUR_API_KEY'
CONSUMER_SECRET = 'YOUR_API_SECRET'
context_io = c.ContextIO(
consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET
)
import contextio as c
CONSUMER_KEY = 'YOUR_API_KEY'
CONSUMER_SECRET = 'YOUR_API_SECRET'
context_io = c.ContextIO(
consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET
)