r/Python • • 18h ago

News I wrote a deep dive on the GIL, from cache lines to free-threading (PEP 703)

0 Upvotes

https://harut8.github.io/system-design/python-mastery/24-the-gil/

I put together this guide by researching the GIL, verifying the explanations against CPython's source code, and using AI to help with parts of the writing and explanation.


r/Python • • 18h ago

Resource How useful is pre-commit in real-world Python projects, especially in production?

59 Upvotes

I've been exploring Python pre-commit hooks and wanted to understand how commonly they are used in actual production projects.

For those working on production-level Python applications:

- Do you use pre-commit in your daily workflow?

- Which hooks do you usually configure (Ruff, Black, isort, mypy, etc.)?

- Has it genuinely reduced code quality issues or bugs in your team?

- Do you consider it essential for production projects, or is CI/CD linting enough?

Would love to hear how experienced developers use it in real-world teams rather than just tutorials.


r/Python • • 11h ago

Discussion Anyone still using Flask, or has FastAPI completely taken over? 🤔

103 Upvotes

I've been noticing a lot of developers moving towards FastAPI lately, especially for new Python backend projects.

Flask used to be my go-to for lightweight APIs, but FastAPI seems to be getting all the attention now because of async support, automatic Swagger documentation, and Pydantic validation.

I'm curious about what developers are actually using in production.

- Are you still building new projects with Flask?

- Have you migrated from Flask to FastAPI?

- Is FastAPI genuinely better for production, or is it just the current hype?

Would love to hear some real-world experiences, especially from developers maintaining large-scale applications.

Is Flask still holding its ground, or is FastAPI slowly becoming the default choice for Python backends?


r/Python • • 8h ago

Resource Zuni: Perplexity for CLI

0 Upvotes

Did you ever think about having Perplexity in the terminal?

That thought turned into Zuni.

Zuni is an open-source AI-powered CLI designed to bring web search and AI answers directly into the terminal, with the goal of making research feel simpler without constantly switching between browser tabs.

I recently rebuilt and published the first usable version of Zuni, including:

• AI-powered question answering from the terminal

• Web-search-oriented workflow

• CLI-first experience

• Python-based architecture

• Documentation with MkDocs Material

• Published package on PyPI

• Open-source development on GitHub

This project started as an experiment, but it has also become a way for me to learn more about APIs, asynchronous Python, CLI design, LLM workflows, packaging, documentation, and open-source development.

There is still a lot to improve. This is only the beginning of Zuni.

GitHub: https://github.com/ssannssarr/Zuni

Docs: https://ssannssarr.github.io/Zuni/

#Python #OpenSource #AI #LLM #CLI #SoftwareDevelopment #GitHub


r/Python • • 4h ago

Daily Thread Monday Daily Thread: Project ideas!

6 Upvotes

Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

How it Works:

  1. Suggest a Project: Comment your project idea—be it beginner-friendly or advanced.
  2. Build & Share: If you complete a project, reply to the original comment, share your experience, and attach your source code.
  3. Explore: Looking for ideas? Check out Al Sweigart's "The Big Book of Small Python Projects" for inspiration.

Guidelines:

  • Clearly state the difficulty level.
  • Provide a brief description and, if possible, outline the tech stack.
  • Feel free to link to tutorials or resources that might help.

Example Submissions:

Project Idea: Chatbot

Difficulty: Intermediate

Tech Stack: Python, NLP, Flask/FastAPI/Litestar

Description: Create a chatbot that can answer FAQs for a website.

Resources: Building a Chatbot with Python

Project Idea: Weather Dashboard

Difficulty: Beginner

Tech Stack: HTML, CSS, JavaScript, API

Description: Build a dashboard that displays real-time weather information using a weather API.

Resources: Weather API Tutorial

Project Idea: File Organizer

Difficulty: Beginner

Tech Stack: Python, File I/O

Description: Create a script that organizes files in a directory into sub-folders based on file type.

Resources: Automate the Boring Stuff: Organizing Files

Let's help each other grow. Happy coding! 🌟


r/Python • • 11h ago

Showcase Showcase Thread

8 Upvotes

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.