Passing args, kwargs, to run_in_executor
Use functools.partial; it’s a standard way to do such things, and it’s specifically recommended in the docs for loop.run_in_executor, as well as more generally in the Event Loop docs. Here’s how it might look for you: import functools # at the top with the other imports loop.run_in_executor(None, functools.partial(update_contacts, data={ ’email’: email, ‘access_token’: g.tokens[‘access_token’] })) You … Read more