Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
What is considered truly advanced in Django?

Hello community,

I've been working professionally with Django for 4 years, building real-world projects. I'm already comfortable with everything that's considered "advanced" in most online tutorials and guides: DRF, complex ORM usage, caching, deployment, etc.

But I feel like Django has deeper layers, those that there are very few tutorials around (djangocon and those kind of events have interesting stuff).

What do you consider the TOP tier of difficulty in Django?

Are there any concepts, patterns, or techniques that you consider truly separate a good developer from an expert?

/r/django
https://redd.it/1o52kon
Monday Daily Thread: Project ideas!

# 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"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) 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](https://www.youtube.com/watch?v=a37BL0stIuM)

# 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](https://www.youtube.com/watch?v=9P5MY_2i7K8)

## 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](https://automatetheboringstuff.com/2e/chapter9/)

Let's help each other grow. Happy

/r/Python
https://redd.it/1o54sdj
What's the highest # of open source libraries you've ever packaged into a single application?

Hey everyone,

I was going down a dependency rabbit hole this morning for a new project and it got me curious. We all know the node_modules memes, but I think we sometimes lose sight of just how much incredible, free work our applications are built on.

I just ran a check on the open-source AI agent I've been building, and the number that came back was genuinely mind-boggling to me: nearly 250 open-source libraries.
It's an autonomous agent that does self-tuning for LLMs, so it needs a whole stack to work: vector databases, search indexes, SLM inference, observability and tracing, the web framework, etc. But seeing it all laid out... it's a humbling reminder that my "project" is really just a thin layer of orchestration on top of decades of work from thousands of developers I'll never meet.

It really reinforces the whole "standing on the shoulders of giants" thing. It feels like a responsibility to contribute back.
So, it made me wonder: what's your number? What's the deepest you've ever gone down the dependency rabbit hole, and what kind of project was it?

/r/Python
https://redd.it/1o4vn5m
rovr v0.4.0: an update to the modern terminal file explorer

source code: [https://github.com/nspc911/rovr](https://github.com/nspc911/rovr)

what my project does:

* it's a file manager in the terminal, made with the textual framework

comparison:

* as a python project, it cannot compete in performance with yazi at all, nor can it compete with an ncurses-focused ranger. superfile is also catching up, with its async-based preview that was just released.
* the main point of rovr was to make it a nice experience in the terminal, and also to have touch support, something that lacked, or just felt weird, when using other file explorers.

hey everyone, this follow-up on [https://www.reddit.com/r/Python/comments/1mx7zzj/rovr\_a\_modern\_customizable\_and\_aesthetically/](https://www.reddit.com/r/Python/comments/1mx7zzj/rovr_a_modern_customizable_and_aesthetically/) that I released about a month ago, and during the month, there have been quite a lot of changes! A shortcut list was added in #71 that can be spawned with `?`, so if you are confused about any commands, just press the question mark! You can also search for any keybinds if necessary. rovr also integrates with [fd](https://github.com/sharkdp/fd), so you can simply enable the `finder` plugin and press `f` to start searching! yazi/spf style `--chooser-file` flag has also been added. An extra flag `--cwd-file` Also exists to allow you to grab the file if necessary (I'm planning to remove cd on quit to favour this instead) cases where opening

/r/Python
https://redd.it/1o4q4vt
🚀 Blinter The Linter - A Cross Platform Batch Script Linter

Yes, it's 2025. Yes, people still write batch scripts. No, they shouldn't crash.

## What It Does
158 rules across Error/Warning/Style/Security/Performance
Catches the nasty stuff: Command injection, path traversal, unsafe temp files
Handles the weird stuff: Variable expansion, FOR loops, multilevel escaping
10MB+ files? No problem. Unicode? Got it. Thread-safe? Always.

## Get It Now
pip install Blinter

Or grab the standalone .exe from GitHub Releases

## One Command
python -m blinter script.bat


That's it. No config needed. No ceremony. Just point it at your .bat or .cmd files.

---

The first professional-grade linter for Windows batch files.
Because your automation scripts shouldn't be held together with duct tape.

📦 PyPI⚙️ GitHub

What My Project Does
A cross platform linter for batch scripts.

Target Audience
Developers, primarily Windows based.

Comparison
There is no comparison, it's the only batch linter so theres nothing to compare it to.

/r/Python
https://redd.it/1o4sswc
Built this Django-Unfold showcase — thinking to extend it into a CRM project

/r/django
https://redd.it/1o4psg7
Livestream with django

Hello, to give you some context: in the app I am developing, there is a service called "Events and Meetings." This service has different functionalities, one of which is that the user should be able to create an online event. My question is, besides django-channels, what other package can help achieve livestreaming for more than 10 or 20 users?

I should mention that I am developing the API using Django REST Framework.

/r/django
https://redd.it/1o4wqlr
P Adapting Karpathy’s baby GPT into a character-level discrete diffusion model

Hi everyone,

I've been exploring how discrete diffusion models can be applied to text generation and put together a single annotated Jupyter Notebook that implements a character-level discrete diffusion GPT.

It's based on Andrej Karpathy’s baby GPT from his nanoGPT repo, but instead of generating text autoregressively (left-to-right), it learns to denoise corrupted text sequences in parallel.

Discrete diffusion model in action

The notebook walks through the math, introduces what adding noise for discrete tokens means, builds discrete diffusion model from baby GPT, and trains it on Shakespeare's text using Score-Entropy based objective.

Access it on GitHub (notebook + README):
https://github.com/ash80/diffusion-gpt
or run it directly on Google Colab:
https://colab.research.google.com/github/ash80/diffusion-gpt/blob/master/The\_Annotated\_Discrete\_Diffusion\_Models.ipynb

I'd appreciate any feedback, corrections, and suggestions, especially from anyone experimenting with discrete diffusion models.

/r/MachineLearning
https://redd.it/1o4qu0h
My first medium blog on GIL

Hi everyone, today I tried my first attempt at writing a tech blog on GIL basics like what is it, why it is needed as recent 3.14 gil removal created a lot of buzz around it. Please give it a read. Only a 5 min read. Please suggest if anything wrong or any improvements needed.

**GIL in Python: The Lock That Makes and Breaks It**

PS: I wrote it by myself based on my understanding. Only used llm as proof readers so it may appear unpolished here and there.

/r/Python
https://redd.it/1o4oozb
Need advice on simulating real time bus movement and eta predictions

Hello Everyone,

I'm currently studying in college and for semester project i have selected project which can simulate real time bus movement and can predict at what bus will arrive that the certain destination.

What I have:

1. Bus departure time from station
2. Distance between each bus stop
3. Bus stop map coordinates

What I'm trying to achive:

1. Simulating bus moving on real map
2. Variable speeds, dwell times, traffic variation.
3. Estimate arrival time per stop using distance and speed.
4. Live dashboard predicting at what time will reach certain stop based upon traffic flow,speed

Help I need:

1. How to simulate it on real map (showing bus is actually moving along the route)
2. What are the best tools for this project
3. How to model traffic flow

Thanks



/r/Python
https://redd.it/1o5gurz
My first RTC app using Django channels finally went live. I need your feedback.

Hey folks, I just finished the first version of my real-time chat app built with Django, Django Channels, and WebSockets. I also used React for the frontend (which I actually learned while building this project).

It’s still missing some important stuff like testing, better error handling, and a few production-level optimizations, but it’s functional, users can register, log in, and chat in real time with real typing indicators and live presence tracker. I’d really appreciate any backend-focused feedback.

Tech stack:

Django + Django Channels
Redis for message brokering
PostgreSQL
React (frontend)

Live demo / GitHub repos:
here are the live version, frontend and the backend

Login with these accounts to explore:

email: guest1@djgram.com, password:1234, email: guest2@djgram.com, password: 1234

I know it’s far from perfect, still no tests or CI/CD setup but I wanted to get some real feedback before adding more features.
Any feedback (even brutal honesty) is super welcome.

/r/djangolearning
https://redd.it/1o4ulh1
Trying to use Google Drive to Store Media Files, But Getting "Service Accounts do not have storage quota" error when uploading

I'm building a Django app and I'm trying to use Google Drive as storage for media files via a service account, but I'm encountering a storage quota error.

# What I've Done

Set up a project in Google Cloud Console
Created a service account and downloaded the JSON key file
Implemented a custom Django storage backend using the Google Drive API v3
Configured GOOGLE_DRIVE_ROOT_FOLDER_ID in my settings

# The Error

When trying to upload files, I get:

HttpError 403: "Service Accounts do not have storage quota. Leverage shared drives
(https://developers.google.com/workspace/drive/api/guides/about-shareddrives),
or use OAuth delegation instead."

# What I've Tried

1. Created a folder in my personal Google Drive (regular Gmail account)
2. Shared it with the service account email (the client_email from the JSON file) with Editor permissions
3. Set the folder ID as GOOGLE_DRIVE_ROOT_FOLDER_ID in my Django settings

This is the code of the storage class:

```

# The original version of the code
# https://github.com/torre76/django-googledrive-storage/blob/master/gdstorage/storage.py
Copyright (c) 2014, Gian Luca Dalla Torre
All rights reserved.
"""

import enum
import json


/r/django
https://redd.it/1o5f3tr
gRPC: Client side vs Server side load balancing, which one to choose?

Hello everyone,
My setup: Two FastAPI apps calling gRPC ML services (layout analysis + table detection). Need to scale both the services.

Question: For GPU-based ML inference over gRPC, does NGINX load balancing significantly hurt performance vs client-side load balancing?

Main concerns:

* Losing HTTP/2 multiplexing benefits
* Extra latency (though probably negligible vs 2-5s processing time)
* Need priority handling for time-critical clients

Current thinking: NGINX seems simpler operationally, but want to make sure I'm not shooting myself in the foot performance-wise.

Experience with gRPC + NGINX? Client-side LB worth the complexity for this use case?

/r/Python
https://redd.it/1o5kwve
Parsegument! - Argument Parsing and function routing

Project Source code: https://github.com/RyanStudioo/Parsegument

Project Docs: https://www.ryanstudio.dev/docs/parsegument/

# What My Project Does
Parsegument allows you to easily define Command structures with Commands and CommandGroups.
Parsegument also automatically parses arguments, converts them to your desired type, then executes functions automatically, all with just one method call and a string.

# Target Audience
Parsegument is targetted for people who would like to simplify making CLIs. I started this project as I was annoyed at having to use lines and lines of switch case statements for another project I was working on

# Comparison
Compared to python's built in argparse, Parsegument has a more intuitive syntax, and makes it more convenient to route and execute functions.

This project is still super early in development, I aim to add other features like aliases, annotations, and more suggestions from you guys!

/r/Python
https://redd.it/1o5jkb9
Use cases of Django vs NodeJS

Hey I have only really done websites in React + NodeJS + “express” package in NodeJS. I know very little about Django.
I was wondering the use cases or the situations where Django would be better to use than NodeJs.
Also if you could explain the differences in performance btwn Django and NodeJs too.

I’d need the advice pretty soon like by one or two days from now

/r/djangolearning
https://redd.it/1o43b73
ChanX: The Django WebSocket Library I Wish Existed Years Ago

Django Channels is excellent for WebSocket support, but after years of using it, I found myself writing the same boilerplate patterns repeatedly: routing chains, validation logic, and documentation. ChanX is a higher-level framework built on top of Channels to handle these common patterns automatically.

# The Problem

If you've used Django Channels, you know the pain:

https://preview.redd.it/1uhc8l973xuf1.png?width=996&format=png&auto=webp&s=913508d7488031446d8c5044132d449ddd770c0f

Plus manual validation everywhere, no type safety, and zero automatic documentation. Unlike Django REST Framework, Channels leaves you building everything from scratch.

# The Solution

Here's what the same consumer looks like with ChanX:

https://preview.redd.it/ymmxw1f93xuf1.png?width=1036&format=png&auto=webp&s=9a156365fcfe57b9ebec78892454619ca47705aa

**What you get:**

* Automatic routing with Pydantic validation - no if-else chains
* Full type safety with mypy/pyright - catch errors before runtime
* Auto-generated AsyncAPI 3.0 docs - like Swagger for WebSockets
* Event broadcasting from anywhere - HTTP views, Celery tasks, etc.
* Built-in authentication with Django permissions
* Structured logging and comprehensive testing utilities
* Works with both Django Channels and FastAPI

**Comparison with other solutions:** See how ChanX compares to raw Django Channels, Broadcaster, and Socket.IO at [https://chanx.readthedocs.io/en/latest/comparison.html](https://chanx.readthedocs.io/en/latest/comparison.html)

# Tutorial for Beginners

I wrote a hands-on tutorial that builds a real chat app with AI assistants, notifications, and background tasks. It uses a Git repo with checkpoints so you can jump in anywhere or compare your code if you get stuck.

Tutorial:

/r/django
https://redd.it/1o5qvcj
Newbie question — which hosting is best for a small Django + Next.js e-commerce site?

Hi everyone, I’m a total newbie so please be kind if this is a basic question 😅

I’m currently learning Python Django from a book (I have zero coding background) and also experimenting with Claude-Code. My goal is to build and deploy a small e-commerce website using Django (backend) and Next.js (frontend). (Australia mel)

Here’s my situation:

Daily users: about 500

Concurrent users: around 100


I want to deploy it for commercial use, and I’m trying to decide which hosting option would be the most suitable. I’m currently considering:

DigitalOcean

Vercel + Railway combo

Google Cloud Run


If you were me, which option would you choose and why? I’d love to hear advice from more experienced developers — especially any tips on cost, performance, or scaling. 🙏

I'm considering price or easy use ai or easy deploy

Thanks for reading my long sentence post


/r/django
https://redd.it/1o5589y
Tuesday Daily Thread: Advanced questions

# Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

## How it Works:

1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.

## Guidelines:

* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.

## Recommended Resources:

* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.

## Example Questions:

1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the

/r/Python
https://redd.it/1o60ghk