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
Djoser | password reset nightmare

Hi community! I’m using Djoser + Django REST Framework for authentication and I’m getting a little frustrated about the password‑reset flow (JUST A LITTLE 🥲).
My password‑reset emails generates links like: (http://localhost:8000/auth/users/reset_password_confirm/uid/token/)

The problem is that this endpoint expects a POST with the user’s new password, but clicking the link issues a GET, so the request fails immediately.

Most of the solutions I’ve found feel hacky, because they require either:
\- Overriding the Djoser view to handle a GET (redirecting to my frontend) and then handling a POST to the same URL to set the new password
\- Modifying Djoser’s email templates (which just feels bad to me)

Does anyone know a cleaner way to work around this? Any alternative patterns, suggestions, or insights would be hugely appreciated!

/r/djangolearning
https://redd.it/1kfdibf
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/1kkezzz
First Django project! Need suggestions with "front-end"

Hi all! I'm working on my first Django project, using Django (obvs) and DRF. I have the basics ready to deploy the project and have it ready as a portfolio piece. For a portfolio, I'm wondering how I can display the web app. Right now I'm using DRF's browsable API, I'm wondering if it's best to use Django templates to add some user friendliness to the project, or would it be worth learning React to 1 expand my skill set. 2. Have a better-looking project, or is there a better alternative anyone could suggest? I appreciate any help, guys!

/r/django
https://redd.it/1kka0sa
[D] What Yann LeCun means here?

/r/MachineLearning
https://redd.it/1kk19ob
Zeet

I created a Django app that I’m trying to deploy using Zeet. I’m having trouble on Step First. After I go to Zeet.co and sign in using my GitHub account, which authenticates successfully, I am redirected to zeet.co/contact. After that, all attempts to get to any other Zeet page, such as the dashboard, gets redirected to the Contact page. I’m stuck.

/r/django
https://redd.it/1kk3eba
Hands on machine learning with sickit learn.

i had a question related to the book hands on machine learning with sickit learn the question is that for me the chapter 2 is quite hard as it is an end to end ml project so i wanted to know if the ucoming chapters are easy like i am an intermediate or they will be hard as well and if should i continue.

/r/Python
https://redd.it/1kkktef
I’m new to web development. Should I learn Flask before Django?

What’s the easiest tutorial for building my first Flask website?

/r/flask
https://redd.it/1kko3hr
Pulumi Automation API for Django + Celery
https://youtu.be/fipPQaJWfCg

/r/django
https://redd.it/1kjk1n2
Overriding default web error popups

Question: is there a way to override default browser error popups? Such as "email invalid should be followed by @ etc etc.." Or "date invalid because February doesn't have 30 days" Or whatnot, if so how would you do it? Just curious! I know it's not a django specific problem. Also is there a way to disable different browsers coming with their predefined css or JS? For example for Microsoft edge it comes with a prebuilt password visibility toggle while chrome doesn't

/r/django
https://redd.it/1kjgftw
Frontend Templates marketplace

Does anybody know a good marketplace for sample templates to take inspiration from? Whenever I decide to do some frontend in HTML, CSS for my project, I feel stuck because most of the times there's no specific page design in my mind. So it all gets fumbled. I've been learning design from penpot YouTube tutorial, but that's very time consuming.

/r/django
https://redd.it/1kkto6m
Nom-Py, a parser combinator library inspired by Rust's Nom

# What My Project Does

Hey everyone, last year while I was on holiday, I created nom-py, a parser-combinator library based on Rust's Nom crate. I have used Nom in Rust for several projects, including writing my own programming language, and I wanted to bring the library back over to Python. I decided to re-visit the project, and make it available on PyPi. The code is open-source and available on GitHub.

Below is one of the examples from the README.

from nom.combinators import succeeded, tag, takerest, takeuntil, tuple
from nom.modifiers import apply

to
parse = "john doe"

parser = tuple(
apply(succeeded(take
until(" "), tag(" ")), str.capitalize),
apply(takerest(), str.capitalize),
)

result, remaining = parser(to
parse)
firstname, lastname = result
print(firstname, lastname) # John Doe

# Target Audience

I believe this interface lends itself well to small parsers and quick prototyping compared to alternatives. There are several other parser combinator libraries such as parsy and parista, but these both overload Python operators,

/r/Python
https://redd.it/1kkfuiu
Reflex Build - V0/Lovable for Python Devs

Hey everyone!

Creator of reflex here. For those who don't know, Reflex is an open source framework to build web apps in pure Python, no Javascript required.

# What my Project Does

Over the past few months, we've been working on Reflex Build – a web-based tool to build apps with Prompting and Python. We wanted to make it easy to create great-looking web apps using AI and then seamlessly hook them up to your existing Python logic. Products like V0/Lovable primarily target JS developers - we want to bring that same experience to the Python ecosystem.

Here's an example app built with just a few prompts, cloning the Claude web interface (and connecting it to the Anthropic Python library): https://claude-clone.reflex.run.

This app specifically used our image-to-app feature - you can view the source code and fork the app here.

Features we've made so far:

Text + image based prompting
Database integration (connect your Postgres database, and we will automatically detect your schema so you can build apps around your data easily)
Github Integration to connect with your local workflow for complex / backend edits
Connected to our hosting service so you can deploy apps straight from the web (you can also download and self-host reflex

/r/Python
https://redd.it/1kl28iq
Best Database and Deployment method to use for a Django + React Project

Hello,

I'm working on a Django + React.ts project, something close to udemy but without video content, only showcasing an academy courses and their details, what database do you recommend me to use? And what should I use for deployment? My website doesn't have authentication, other than the static pages, it has submission forms and courses, instructors and publications to load from database.

Any advice would be much appreciated, this is my first time deploying a website for a client :) thanks in advance.

/r/django
https://redd.it/1kky9z8
Looking for contributors & ideas

# What My Project Does

[`catdir`](https://github.com/emilastanov/catdir) is a Python CLI tool that recursively traverses a directory and outputs the concatenated content of all readable files, with file boundaries clearly annotated. It's like a structured `cat` for entire folders and their subdirectories.

This makes it useful for:

* generating full-text dumps of a project
* reviewing or archiving codebases
* piping as context into GPT for analysis or refactoring
* packaging training data (LLMs, search indexing, etc.)

Example usage:

catdir ./my_project --exclude .env --exclude-noise > dump.txt

# Target Audience

* Developers who need to review, archive, or process entire project trees
* GPT/LLM users looking to prepare structured context for prompts
* Data scientists or ML engineers working with textual datasets
* Open source contributors looking for a minimal CLI utility to build on

While currently suitable for light- to medium-sized projects and internal tooling, the codebase is clean, tested, and open for contributions — ideal for learning or experimenting.

# Comparison

Unlike `cat`, which takes files one by one, or tools like `find | xargs cat`, `catdir`:

* Handles errors gracefully with inline comments
* Supports excluding common dev clutter (`.git`, `__pycache__`, etc.) via `--exclude-noise`
* Adds readable file boundary markers using relative paths
* Offers a CLI interface via `click`
* Is designed to be pip-installable

/r/Python
https://redd.it/1kkzfy8
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/1kl7zw6
synchronous vs asynchronous

Can you recommend a YouTube video that explains synchronous vs asynchronous programming in depth

/r/django
https://redd.it/1kkxyc9
Threads and Multiprocessing: The Complete Guide


Hey, I made a video walking through concurrency, parallelism, threading and multiprocessing in Python.

I show how to improve a simple program from taking 11 seconds to under 2 seconds using threads and also demonstrate how multiprocessing lets tasks truly run in parallel.

I also covered thread-safe data sharing with locks and more, If you’re learning about concurrency, parallelism or want to optimize your code, I think you’ll find it useful.
https://www.youtube.com/watch?v=IQxKjGEVteI

/r/Python
https://redd.it/1kl73hn
Building a Radial GUI Gauge Meter in Python with Tkinter and ttkbootstrap framework

In this tutorial, You will learn to use the meter() class from ttkbootstrap library to create beautiful analog meters for displaying quantities like speed, cpu/ram usage etc.

[YouTube Video of Meter Widget tutorial using Tkinter and ttkbootstrap Library here](https://www.youtube.com/watch?v=zKBg5-Y4NAI).
Original Article along with Source Codes for the ttkbootstrap Meter Widget tutorial here.

You will learn to create a meter, change its appearance like dial thickness, colour, shape of the meter (semi circle or full circle),continuous dial or segmented dial.

How to update the meter dial position using step() method and set() method .

I may use this code base to to build a System monitor in the future using ttkbootstrap widget and psutil library.



/r/Python
https://redd.it/1klexqo
Android style app folders for Windows desktop ( python + pygame )

* **What My Project Does**: this project aims to add app folders similar to the ones seen in android homescreen
* **Target Audience**: For now its just a personal project because i like the look of android folders
* **Comparison** : as far as i have seen , there is no project that atempts to do the same thing but i could be wrong
* **Image** : [Preview Image](https://ibb.co/2rGPGCX)
* **git repo :** [**https://github.com/SrQubit-dev/TapTiles**](https://github.com/SrQubit-dev/TapTiles)
* **More info :**
* this project started in godot but due to some limitation i used pure python with pygame for the gui
* Compatible with ( .exe | .lnk | .url ) apps there are some apps that give issues like PPSSPP but it works with at least 95% of the apps i have incuding steam games
* to add apps just drag and drop the file
* To create a new folder is as easy as creating a shortcut to the main exe and add the argument --CodeName folder\_name at the end , each "CodeName" can have its own apps
* Also the color can be customized using the arguments : --BgColor r,g,b and --BorderColor r,g,b

/r/Python
https://redd.it/1kla0r2
Webserver to control DSLR Camera

Hi, as title says. I am planning to building a webserver that help users control dslr camera (capture, timelapse, change settings, etc.) with Flask, my idea is:

Front-end: HTML, CSS, JS
Back-end: Python, Flask
Library to interact with camera: libgphoto2
Others: Nginx + Cloudflare Tunnel

Workflow will be: User using web interface to control -> js listening user actions and fetch api -> flask app call controller class method (using libgphoto2) -> return result as jsonify -> js display it.

Do you guys think its fine?

English is not my first language sorry for grammar mistakes .


/r/flask
https://redd.it/1klfpd6