If, like me, you were not aware that python generators (async and normal) has a close
function with a cleanup mechanism, I strongly suggest you to read this article.
You'll never forget to close your generators properly anymore.
Other articles
Testing Python code integration with an Azure Eventhub
On one of my project I needed to create a simple API allowing clients to publish some messages into an Azure EventHub. Because authentication is ensured by a JWT we could not rely on our clients to directly publish messages to the Eventhub (and by the way I prefer abstracting this away through a HTTP API).
read more