PythonHub
2.31K subscribers
2.35K photos
48.9K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Function calling using LLMs

While LLMs excel at generating cogent text based on their training data, they may also need to interact with external systems. Function calling allows them to construct such calls. The LLM does not execute these calls directly, instead it creates a data structure that describes the call, passing that to a separate program for execution and further processing. The LLM's prompt includes de...

https://martinfowler.com/articles/function-call-LLM.html
Asyncio Demystified: Rebuilding it From Scratch One Yield at a Time

The article demystifies Pythonโ€™s asyncio by rebuilding its core concepts from scratch, starting with basic generators and coroutines, then constructing a cooperative multitasking scheduler, and finally integrating non-blocking I/O using custom awaitable Future objects. Through step-by-step code examples, it shows how Pythonโ€™s async/await syntax is just syntactic sugar over these primitiv...

https://dev.indooroutdoor.io/asyncio-demystified-rebuilding-it-from-scratch-one-yield-at-a-time
Vibe Coding with Django, React and Cursor: My Experience and Takeaways

Cory Zue shares his experience with "vibe coding," a new approach to software development using AI tools, and how he built a Django/React app calleddjobs.devin just two days. He emphasizes the importance of planning, iterating, and reviewing code when working with AI, and shares tips for effectively using tools like Cursor and managing rules files.

https://www.youtube.com/watch?v=ELiiMX_o2LI
Procrastinate - PostgreSQL Task Queue for Python (Celery Alternative!)

This video introduces Procrastinate, a PostgreSQL-based task queue for Python, offering a simpler alternative to Celery by leveraging Postgres for task management, eliminating the need for additional services like Redis or RabbitMQ. The tutorial covers setting up Procrastinate with Django, defining and triggering tasks, including scheduled tasks, and integrating it with the Django admin ...

https://www.youtube.com/watch?v=6puV9y7K0z8
The REAL Reason You Should Use Type Hints in Python

This video explains that the true power of type hints in Python lies in how they encourage better code design by prompting developers to think more generically about data structures. The video also highlights the principle that inputs should be as generic as possible (contravariant), while outputs should be as specific as possible (covariant).

https://www.youtube.com/watch?v=0oBLMwHdZ2Y
Scaling Python Task Queues Effectively

Task queues are a great way to offload work to the background but scaling Python task queues is tricky. Learn how you can keep your task queues chugging along!

https://judoscale.com/blog/scaling-python-task-queues