Is it possible to utilize pooled odbc connection in Microsoft Bot Framework's Python SDK?

Viewed 10

I am trying to build a conversational bot with Microsoft Bot Framework Core's Python sdk to retrieve precomputed metrics from Azure SQL Server. I really don't want to have to handle multiple simultaneous connections from the bot to the db - would prefer to have a single connection with multiple cursors, to cut down on overhead when the bot is in use.

Thus far, I've built the bot itself, and have the appropriate responses based on the inputs. I pass parameters based on the conversation, and can echo them back at the end of the step. Where I'm falling down is with managing connections. I'm using aioodbc for connections. When testing aioodbc on its own, it works just fine.

I found this blog post which details how to perform this function in .NET - hoping you fine folks can help me create similar functionality in Python. I do not know how to do this without the NuGet scaffolding step - is it possible to define a connection in one location, then propagate it to each individual member added to the chat?

0 Answers
Related