Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels
Why do you like/hate Django?
Hello! I'd like to hear different opinions about this framework.
Why do you like it or why do you hate it.
Everyone has a free space to share their opinions about it!
PS: you don't have to motivate me on why i should or shouldn't use it, i'm already using it for work. This doesn't mean i have a love feeling tho 😂, so i want to read everyone's opinions!
/r/django
https://redd.it/1nil9zn
Looking for a study buddy(woman)
I need accountability buddy. I have multiple unfinished projects. my suggestion is to have study sessions together every day. It would create some external structure and responsibility. My tz is gmt+5. I am 31f
/r/djangolearning
https://redd.it/1nhmwg9
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/1ni2d07
Random 404 errors.
I am a beginner, and my Flask app is randomly giving 404 URL not found errors. It was running perfectly, and I restarted the app, but now it is not. Last time it happened, I just closed my editor and shut my pc off, and after some time, it was working again.
I know my routes are correct, and I am using url_for and even my Index page, which i donet pass any values into, is not loading.
Has Anyone else faced these issues before and know how to solve them?
/r/flask
https://redd.it/1nhjxbx
How to block a domain from accessing my website?
There is this domain, lets call it example.com. It has pointed it's ip to my Django site. Because of ALLOWED_HOSTS, they are just seeing an error.
But i want to block them all together since they are sending plenty of requests as well. How do i do this? Using cloudflare
/r/django
https://redd.it/1nhzv09
Do I really need to learn Django templates if I want to do backend dev?
Hey everyone, I’m currently learning backend development with Django and I’m a bit confused about where templates fit in.
Here’s my thought process so far:
1. Django can return HTML pages using its built-in template system. This is the traditional server-side rendering (SSR) model that a lot of older frameworks also used (PHP, Ruby on Rails, Java JSP, etc.).
2. Nowadays, many apps use client-side rendering (CSR) with React, Vue, etc. In that case, the backend usually just provides a JSON API and the frontend handles rendering.
So my question is: If I want to focus mainly on backend development in Django, do I still need to learn templates?
/r/django
https://redd.it/1nhl9wo
I built AuthTuna, a modern, async-first security framework for FastAPI with hierarchical permissions
Hey everyone,
I built an async security library for FastAPI called AuthTuna to solve some problems I was facing with existing tools.
# What My Project Does
AuthTuna is an async-first security library for FastAPI. It's not just a set of helpers; it's a complete foundation for authentication, authorization, and session management. Out of the box, it gives you:
* **Fully async** operations built on SQLAlchemy 2.0.
* **Hierarchical RBAC** for complex, nested permissions (e.g., `Organization -> Project -> Resource`), which goes beyond simple roles.
* **Secure, server-side sessions** with built-in hijack detection.
* A familiar developer experience using standard FastAPI `Depends` and Pydantic models.
# Target Audience
This is built for Python developers using FastAPI to create **production-grade applications**. It's specifically useful for projects that need more complex, granular authorization logic, like multi-tenant SaaS platforms, internal dashboards, or any app where users have different levels of access to specific resources. It is not a toy project and is running in our own production environment.
# Comparison
I built this because I needed a specific combination of features that I couldn't find together in other libraries.
* **vs. FastAPI's built-in tools:** The built-in security utilities are great low-level primitives. AuthTuna is a higher-level, "batteries-included" framework. You get pre-built user flows, session management,
/r/Python
https://redd.it/1nhn589
django-cotton, 1+ more reason to start using it.
Coming Soon .... django-cotton/pull/296
>Cotton Directives, a better way to write control flow statements (if
, elif
, else
, for
) following django_cotton’s philosophy. These directives use HTML attributes such as c-if
and c-for
, which can be applied to any HTML element, not limited to Django Cotton components.
<c-avatars>
<c-avatar c-for="user in users">
<c-image c-if="user.photo" :src="user.photo" />
<c-icon c-elif="user.icon" :icon="user.icon" />
<c-initials c-else :name="user.fullname" />
</c-avatar>
</c-avatars>
vs
<c-avatars>
{% for user in users %}
<c-avatar>
{% if user.photo %}
<c-image :src="user.photo" />
{% elif user.icon %}
<c-icon :icon="user.icon" />
{% else %}
<c-initials :name="user.fullname" />
{% endif %}
/r/django
https://redd.it/1nhiyh5
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/1nh6ydt
D Recent paddleocr version accuracy
Has anyone tried using the paddleocr latest version 3.2.0, I could observe the recognition accuracy has decreased compared to previous version which I was using (2.10.0)
/r/MachineLearning
https://redd.it/1nhbxwk
System recommendation in Django
What is the name of this algorithm that can be used for recommendations when there are similar data between two users, and how can I use it with Django?
/r/django
https://redd.it/1ngltd7
Another free Python 3 book - Files and Directories
If you are interested, you can click the top link on my landing page and download my eBook, "Working with Files and Directories in Python 3" for free: https://tr.ee/MFl4Mmyu1B
I recently gave away a Beginner's Python Book and that went really well
So I hope this 26 page pdf will be useful for someone interested in working with Files and Directories in Python. Since it is sometimes difficult to copy/paste from a pdf, I've added a .docx and .md version as well. The link will download all 3 as a zip file. No donations will be requested. Only info needed is a name and email address to get the download link. It doesn't matter to me if you put a fake name. Enjoy.
/r/Python
https://redd.it/1ngy2ha
D No Google or Meta at EMNLP 2025?
I was going through the EMNLP 2025 sponsors page and noticed something odd. Google and Meta aren’t listed this year. Link here.
Is it that they’re really not sponsoring this time? Or maybe it’s just not updated yet?
For those of us who are PhD students looking for internships, this feels a bit concerning. These conferences are usually where we get to connect with researchers from those companies. If they are not sponsoring or showing up in an official way, what’s the best way for us to still get on their radar?
Curious if others are thinking about this too.
/r/MachineLearning
https://redd.it/1ngsn3g
P Convolutional Neural Networks for Audio -- the full story behind SunoAI
Last week i wrote a reddit post, about my project SunoAI and it sorta blew up for my standards. People in the replies were really curious about Convolutional Neural Networks and why I decided to go with them for Audio Classification. So, I decided to write an in depth blog that explains everything there is to know about CNNs from pooling to dropouts to batch normalization. I also go in depth about my results with the CNN I built, and how CNNs see audio, Mel Spectograms and much more.
Checkout this blog for more details tanmay.bansal20/mastering-cnns-for-audio-the-full-story-of-how-i-built-sunoai-c97617e59a31?sk=3f247a6c4e8b3af303fb130644aa108b">tanmay.bansal20/mastering-cnns-for-audio-the-full-story-of-how-i-built-sunoai-c97617e59a31?sk=3f247a6c4e8b3af303fb130644aa108b" rel="nofollow">https://medium.com/@tanmay.bansal20/mastering-cnns-for-audio-the-full-story-of-how-i-built-sunoai-c97617e59a31?sk=3f247a6c4e8b3af303fb130644aa108b
https://preview.redd.it/kcu0n3eui3pf1.png?width=847&format=png&auto=webp&s=0fae2651a12849dd021176ac706b7f0aa64ca2a9
Also check out the visualiser I built around this CNN, it includes feature maps, waveforms, spectrograms, everything to the last detail https://sunoai.tanmay.space
/r/MachineLearning
https://redd.it/1ngmgxh
D which papers HAVEN'T stood the test of time?
As in title! Papers that were released to lots of fanfare but haven't stayed in the zeitgeist also apply.
Less so "didn't stand the test of time" but I'm thinking of KANs. Having said that, it could also be that I don't work in that area, so I don't see it and followup works. I might be totally off the mark here so feel free to say otherwise
/r/MachineLearning
https://redd.it/1ng6dsf
D - NeurIPS 2025 Decisions
Just posting this thread here in anticipation of the bloodbath due in the next 2 days.
/r/MachineLearning
https://redd.it/1nie5rl
What’s the one Python feature you wish you discovered earlier?
I’ve been coding in Python for a few years, and just recently realized how much time f-strings can save compared to old-style string formatting.
Honestly, I feel like I wasted so many lines of code before discovering this. 😅
Curious — what’s one Python trick, library, or feature that completely changed how you code once you found it?
/r/Python
https://redd.it/1ni9puj
NOW - LMS: A flask based learning platform
<tl-dr>
# Python >= 3.11
# Sources:https://github.com/bmosoluciones/now-lms
# License: Apache 2
python3 -m venv venv
venv/bin/pip install now_lms
venv/bin/lmsctl database init
venv/bin/lmsctl serve
# Visit `http://127.0.0.1:8080/` in your browser, default admin user and password are `lms-admin`.
</tl-dr>
Hello, this is a project I have been working to release a online learning plataform for my sister use and my use.
NOW - LMS is designed to be simple yet powerful. Here are its key features:
* **Clean codebase**: Python and HTML5.
* **Compatible with multiple databases**: SQLite, PostgreSQL, and MySQL.
* **Complete course creation functionality**, allowing full curriculum setup.
* **Courses are organized into sections**, which group resources in a logical manner.
* **Flexible resource types** within a course section:
* YouTube videos
* PDFs
* Images
* Audio files
* Rich text content
* External HTML pages
* Slide presentations
* External resource links
* **Course types**:
* Free or paid
* Self-paced, synchronous (with tutor), or time-limited
* **Paid courses support an audit mode**, allowing limited
/r/flask
https://redd.it/1ngwce6
Issue with modified normalize_email and it's uniqueness
I have this Custom User:
[CustomUser](https://preview.redd.it/jj337x6ojapf1.png?width=976&format=png&auto=webp&s=74588d74b758fdb65402e2de5400bf59fc905f00)
and this User Manager:
[UserManager part 1](https://preview.redd.it/2kdwjkayjapf1.png?width=1476&format=png&auto=webp&s=6c43499fad84b24768e8b7c92aa6bfc0466ebe16)
[UserManager part 2](https://preview.redd.it/rzy91my5kapf1.png?width=1250&format=png&auto=webp&s=36a4f5fa88277dbcef3bd3b528bd4dd4574c30d4)
[this is my utility function](https://preview.redd.it/v1hbpaudkapf1.png?width=1220&format=png&auto=webp&s=223af8382fdf63c2f82d1b177eb2350c21990ca4)
When I create a User I am still somehow able to create this, What am I doing now?
https://preview.redd.it/p3p0dxykjapf1.png?width=2852&format=png&auto=webp&s=e94554d59922e90bedb79ce416cb0e6fee777c07
DB data:
https://preview.redd.it/9u5ddr9kmapf1.png?width=1900&format=png&auto=webp&s=a2886c82c51b298115c2a5a494397eeefea4f0c6
/r/django
https://redd.it/1nhgk66
I made a vs code extension that insults you if you copy & paste AI generated code
-on an important note: this project was just for fun, I'm not against using AI to help your coding sessions-
What my project does:
It's a vs code extension that gives random insults such as "Do you ask GPT what to eat for dinner as well?" to the user if it detects AI generated content. It uses a pretrained transformer-based model for inference (roberta-base-openai-detector), that returns the probability of human and AI writing the given section of text. It was pretty fun to play around with, although not accurate (the model was trained on GPT-2, and not optimized for code, so accuracy is bum), but it was my first time mixing languages together to create something. (In this case typescript and python) It's interesting how extensions like these are set up, I think it's valuable for anyone to do pet projects like these.
Target audience: noone really, just a funny pet project, due to the inaccuracy I wouldn't recommend it for actual usage (it's a bit difficult to create something more accurate, these kind of open-source models were trained on texts, not code)
Comparison: To my knowledge there hasn't been a vs code extension like this before, but there are several much more
/r/Python
https://redd.it/1nhtowu
DAAAI 2026 phase1
I’ve seen a strange situation that many papers which got high scores like 6 6 7, 6 7 7 even 6 7 8 are rejected, but some like 4 5 6 even 2 3 are passed. Do anyone know what happened?
/r/MachineLearning
https://redd.it/1nhpwwn
3 months in Python, I made my first proper 2D game
What My Project Does:
I’ve been messing with Python for about three months, mostly tutorials and dumb exercises. Finally tried making an actual game, and this is what came out.
It’s called Hate-Core. You play as a knight fighting dragons in 2D. There’s sprites, music, keyboard and touch controls, and a high-score system. Basically my attempt at a Dark Souls-ish vibe, but, you know… beginner style. Built it with Pygame, did the movement, attacks, scoring, and slapped in some sprites and backgrounds.
Target Audience:
Honestly? Just me learn-ing Python. Not production-ready, just a toy to practice, see what works, and maybe have some fun.
Comparison:
Way beyond boring number guessing, dice rolls, or quizzes you see from beginners. It’s an actual 2D game, with visuals, music, and some “combat” mechanics. Dark Souls-ish but tiny, broken, and beginner-coded.
I’d love honest feedback, tips, ideas or anything. I know it’s rough as hell.
Check it out here: https://github.com/ah4ddd/Hate-Core
/r/Python
https://redd.it/1nhfhcs
I made a terminal-based game that uses LLMs -- Among LLMs: You are the Impostor
I made this game in Python (that uses **Ollama** and local `gpt-oss:20b` / `gpt-oss:120b` models) that runs directly inside your terminal. TL;DR **above** the example.
>Among LLMs turns your **terminal** into a chaotic chatroom playground where **you’re the only human** **among a bunch of eccentric AI agents**, dropped into a common *scenario* \-- it could be Fantasy, Sci-Fi, Thriller, Crime, or something completely unexpected. Each participant, including you, has a *persona* and a *backstory*, and all the AI agents share one common goal -- determine and eliminate the human, through *voting*. **Your mission: stay hidden, manipulate conversations, and turn the bots against each other with edits, whispers, impersonations, and clever gaslighting**. Outlast everyone, turn chaos to your advantage, and make it to the final two.
>Can you survive the hunt and *outsmart* the AI ?
Quick Demo: [https://youtu.be/kbNe9WUQe14](https://youtu.be/kbNe9WUQe14)
Github: [https://github.com/0xd3ba/among-llms](https://github.com/0xd3ba/among-llms) (refer to `develop` branch for latest updates)
(Join the discord community (link in repository's README) if you have any bug reports, issues, feature- requests, suggestions or anything, as the subreddit I made for this got banned immediately along with my other account getting banned from Reddit for no apparent reason)
* **What my project does:** Uses local Ollama gpt-oss models uniquely in a game setting; Built
/r/Python
https://redd.it/1nhdt04
[R] AI Learns to Speedrun Mario in 24 Hours (2 Million Attempts!)
https://youtube.com/watch?v=NlwJhB8AFwg&si=0druuuZJLOqdxHoT
/r/MachineLearning
https://redd.it/1nh2uh5
Cosmic Django
https://brunodantas.github.io/blog/2025/09/12/cosmic-django/
/r/django
https://redd.it/1ng0m9r
As a Django beginner dev, which open source repository is great to contribute to gain real world experience?
I was looking into several repositories on git after a got a short term break from building my portfolio for my first job/intern. I believe some online contribution can help me achieve my goal of being ready for jobs without getting a job, but the terrifying part as a beginner is there's no one to guide you on the way cuz you're not earning anyone's money and no one cares.
From your experience, which online repositories or other contributing platforms would you recommend for someone trying to understand real-world tech workflow and gain experience. I would like to hear what would you do if you were in my place and wanna achieve what I mentioned. Thanks.
/r/django
https://redd.it/1ng4vdu
Weird Issue
I'm using Django with the rest framework (but I don't think that matters here) and just added a new URL to my site. When making a call to it I get the error:
Forbidden (Origin checking failed - [http://localhost:3000](http://localhost:3000) does not match any trusted origins.
My other urls are all working fine. Does any one have any hints of why this would be happening with just the one URL? I copied and pasted my react axios code and just changed the URL. When I purposefully put a typo into the URL it gives a different error message so I know that that's not it.
Edit: To confirm, I already have the following in my [settings.py](http://settings.py) file
CORS_ALLOWED_ORIGINS = [
'http://localhost:3000'
]
and other URL post calls are working.
UPDATE - Figured it out.
In my url I had
path('set_facility_patient_id/',OnePatientFacilityIDAPI),
when I fixed it to
path('set_facility_patient_id/',OnePatientFacilityIDAPI.as_view()),
it worked.
That wasn't the error message I was expecting for a goof up like this which is why it took me so long to figure it
/r/django
https://redd.it/1ngu7do
Top 5 things to enhance your backend flask app
https://redd.it/1nghdgy
@pythondaily
Do anyone used JWT here ?
So I am using this JWT in Django because its stateless.
Earlier i was sending it in login response so client can store it and use it .
But since refresh token can be misused . Where to store it on client side? Not in localstorage i guess but how to store and use it securely?
Just needed some advice on this.
/r/django
https://redd.it/1ngpv71
Building My Django Portfolio - Offering to Build Real Projects (Free or Low-Cost)
I’m currently a Python/Django developer in the making, working through my BCA degree and building my career path toward backend development. I’ve done several projects (REST APIs, dashboards, hackathon apps), but I want to strengthen my portfolio with real-world projects that solve actual problems for people.
That’s why I’m offering to:
* Build small-to-medium Django projects **for free** (or at a very low cost if the scope is bigger).
* Handle the **full stack if needed** (Django backend + React/HTML/CSS frontend).
* Learn and implement **deployment/hosting** , and if you prefer, I can even manage hosting for you at a minimal fee.
✅ Why am I doing this?
* To gain **real client experience** beyond personal projects.
* To practice **hosting, deployment, and maintenance**.
* To create a **stronger portfolio** that helps me land Python/Django roles.
If you’ve been thinking: *“I’d like a small app for my idea / side project / workflow, but don’t have a developer yet”,* this could be a great match.
⚠️ Just to set expectations:
* I’m focusing on **Django-based apps** (CRUD systems, dashboards, APIs, authentication, etc.).
* I’ll provide clear timelines and revisions, but I won’t be able to support endless scope creep.
* All projects will be added to my portfolio/GitHub (unless you’d like it private).
If
/r/django
https://redd.it/1nghsxo