eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

221
active users

#pythonprogramming

0 posts0 participants0 posts today

Many people write Python scripts to automate tasks, but without proper structure, these scripts can quickly become hard to maintain. If you're planning to write a script, check out this Real Python article by @rgoswami Your future self (and your teammates) will thank you.

realpython.com/python-script-s

realpython.comHow Can You Structure Your Python Script? – Real PythonStructure your Python script like a pro. This guide shows you how to organize your code, manage dependencies with PEP 723, and handle command-line arguments.

It’s a good idea to run slow tests last; this way, you catch failed tests early and avoid putting unnecessary stress continuously on resources like databases and external services. In this article, Tim Kamanin shared how to achieve this by creating a custom marker and a pytest plugin tailored for Django application tests.

timonweb.com/django/optimizing

timonweb.com · Optimizing Test Execution: Running live_server Tests Last with PytestBy Tim Kamanin

Pinpointing differences between two tables is very important for tasks like validating data migrations or spotting corruption. But when those tables live in different databases, it becomes tricky due to issues like network costs and different SQL dialects. In this article, Erez Shinnan shared how Reladiff tackles these challenges and its development journey.

eshsoft.com/blog/how-reladiff-

eshsoft.comHow Reladiff Works | Esh Software BlogA deep dive into the workings of Reladiff, exploring the challenges and techniques in data engineering with SQL.

Gwyneth Peña-Siguenza created a 5-part video series on building scalable Python APIs with FastAPI and Azure Cosmos DB. She covered key concepts like Pydantic models, FastAPI's dependency injection, async calls using azure.cosmos.aio, batch operations and centralised exception handling.

devblogs.microsoft.com/cosmosd

Azure Cosmos DB Blog · Building a Modern Python API with Azure Cosmos DB: A 5-Part Video Series - Azure Cosmos DB BlogExplore how to use Python with Azure Cosmos DB to build a production-ready API. Watch our video series for insights.

The @huggingface team has created tiny-agents, a new feature that lets their huggingface_hub software act as a Model Context Protocol (MCP) Client. In their recent article, they explained how to set up these tiny agents to give new abilities to your LLMs to interact with the world and perform complex tasks.

huggingface.co/blog/python-tin

huggingface.coTiny Agents in Python: a MCP-powered agent in ~70 lines of codeWe’re on a journey to advance and democratize artificial intelligence through open source and open science.

👀✨ Something exciting is coming… 👀✨

Applications for the Django Girls Workshop open on Monday 16th of June!

Whether you’ve never written a line of code or are just starting out, this is your sign to learn, connect and try something new 💻💫

Ready to dive in? Learn more here: djangogirls.org/en/pyconuk/

djangogirls.orgDjango Girls PyCon UK 2025 on 20th September 2025Django Girls is a one-day workshop about programming in Python and Django aimed at women.

Pandas used to be the go-to tool for working with data. But now, there are many other excellent options available, like Polars and PySpark. If different teams in your company use different data tools, Narwhals can help. @marcogorelli showed this with a helpful example in his article.

codecut.ai/unified-dataframe-f

CodeCut · Narwhals: Unified DataFrame Functions for pandas, Polars, and PySparkStop converting everything to pandas! Instead, use Narwhals, which works with Polars, pandas, PySpark, DuckDB, and PyArrow.

Last month, two new Rust-based Python type checkers, pyrefly and ty were released. Both of them are in the alpha stage. While they share some similarities, they differ significantly in design and features. In this article, Edward Li dove deep into both tools, highlighted their differences and what makes each one unique.

blog.edward-li.com/tech/compar

Edward Li's Blog · Pyrefly vs. ty: Comparing Python’s Two New Rust-Based Type CheckersA deep dive into Meta's pyrefly and Astral's ty - two new Rust-based Python type checkers that both promise faster performance and better type inference.

Nested loops are often discouraged, but they make perfect sense in scenarios like handling multidimensional data or generating patterns. In this @realpython article, Amanda Adoyi explained what nested loops are, shared practical examples, highlighted common pitfalls and offered tips on how to optimise them.

realpython.com/nested-loops-py

realpython.comNested Loops in Python – Real PythonLearn how to use nested loops in Python to iterate over multiple sequences and perform repeated actions efficiently in your programs.

In this article, Vitalii Honchar explained how to build AI-powered apps that can chat with uploaded PDF files. He showed how to implement Retrieval Augmented Generation (RAG) using FastAPI for the API and LangChain to interact with OpenAI.

vitaliihonchar.com/insights/py

Vitalii HoncharPython RAG API Tutorial with LangChain & FastAPI – Complete GuideLearn how to build a Retrieval-Augmented Generation (RAG) PDF chat service using FastAPI, Postgres pgvector, and OpenAI API in this step-by-step tutorial.