mastouille.fr est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Mastouille est une instance Mastodon durable, ouverte, et hébergée en France.

Administré par :

Statistiques du serveur :

588
comptes actifs

#asyncio

1 message1 participant0 message aujourd’hui

kitfucoda.medium.com/writing-a

I've just finished writing up a deep dive into building a Telegram bot with a FastAPI web application, and it was quite the journey into asynchronous Python! 🐍

The project started with a desire to run chatbots across multiple platforms, but quickly evolved into a focused exploration of asyncio. I found myself wrestling with event loops, queues, and the nuances of asyncio.create_task vs. asyncio.to_thread. It became very clear that understanding the difference between concurrency and parallelism is absolutely crucial in this space. Clever scheduling can mitigate blocking, but over-scheduling will inevitably lead to performance issues.

Architectural considerations became a major focus. I learned firsthand that cramming everything into a single process, while tempting, isn't always the best approach. Separating processes for scalability and future enhancements is something I'll definitely keep in mind for future projects.

This project was a great learning experience, and I'm looking forward to applying these lessons to future projects. If you're interested in asyncio, webhooks, or building chatbots, I'd love to hear your thoughts!
#python #asyncio #telegrambot #fastapi #webdevelopment #programming #opentowork #fedihire

Medium · How to write an AsyncIO Telegram bot in Python - KitFu Coda - MediumPar KitFu Coda

🐘 I've just published atoot, a Mastodon API client library for Python's asyncio

⭐ github.com/popura-network/atoo

📖 Quickstart guide: atoot.readthedocs.io/en/latest

❓ How is it different from Mastodon.py?
atoot uses asynchronous I/O operations and provides an easy way to write complex concurrent software for Mastodon API.

❤️ I'm still working to make it a decent library with good docs and tests. If you find atoot useful, give it a GitHub star!

github.comGitHub - popura-network/atoot: Asynchronous Python library for Mastodon APIAsynchronous Python library for Mastodon API. Contribute to popura-network/atoot development by creating an account on GitHub.