claws / aioprometheus

A Prometheus Python client library for asyncio-based applications
175 stars 21 forks source link

Question: How does this lib differ from the official one? #32

Closed Jacobh2 closed 5 years ago

Jacobh2 commented 5 years ago

Is the official lib not working with async programs? Will that one block in an unwanted way that justifies this lib?

Thank you for any help in clearing up this question for me, and I'm sorry if this is not the correct place for these kind of questions!

claws commented 5 years ago

Is the official lib not working with async programs? I'm not sure.

Will that one block in an unwanted way that justifies this lib? It might.

At the time I created this package the applications I was developing were entirely based on asyncio. The official library used the more traditional blocking IO and threads which did not fit well with the pattern of my applications. I did not want to introduce threads into my applications and I did not want the risk that it would block my application from running concurrently.

The offical package may since have acquired abilities to work better with asyncio applications (I have not been monitoring it).

Hope that answers your question.

Jacobh2 commented 5 years ago

Thanks for the answer! 🎉