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
p99.chat - quickly measure and compare the performance of Python snippets in your browser

Hi, I am Adrien, co-founder of CodSpeed

We just launched p99.chat, a performance assistant in your browser that allows you to quickly measure, visualize and compare the performance of your code in your browser.

It is free to use, the code runs in the cloud, the measurements are done using the pytest-codspeed crate and our runner.

Here is example chat of comparing the performance of bubble sort and quicksort.

Let me know what you think!

/r/Python
https://redd.it/1l3zzn4
Just for fun: looking for Django devs to collaborate on a community-driven open source e-commerce project

Hey everyone!

I'm a Django developer with about 2 years of experience, and I've never created or contributed to an open source project before — so I thought, why not start one with the community?

The idea is simple: build a basic but scalable e-commerce project with Django, just for fun and learning, without relying on large frameworks like Django Oscar. I’ve used Oscar before, and while it’s powerful, it can feel too big, too slow, and a bit overengineered for small to mid-size projects.

So I’m putting together a lightweight, modular e-commerce base that’s easy to understand, extend, and hack on. Something the community can shape and improve over time.

There's no official roadmap yet, just a general goal:

Keep it clean and simple
Make it scalable and flexible
Focus on real-world usability, not overengineering
Learn, share, and have fun with Django

If anyone's interested, just shoot me a message or let me know — happy to have you on board!

/r/djangolearning
https://redd.it/1l45ubr
Python Discord Event: Project Show-and-Tell

Python Discord (partnered with r/Python) is excited to announce our first Project Showcase event!

This will be an opportunity for members of the community to do a live show-and-tell of their Python projects in one of our stage channels. If you have a project that you're interested to present, submit it here!

Submitted projects must be written primarily in Python, must have the code in a publicly accessible place such as GitHub, and must not be monetized (excluding donations such as GitHub Sponsors).

The call for proposals will end in 2 days (8th June 04:00 UTC, subject to extension), at which time our staff will look at the submissions and decide which ones will get to present. We'll announce which proposals have been accepted in advance of the event.

The event will take place at 14 June 2025 at 15:00 UTC. We plan to hold future iterations of the event at different times to accommodate different timezones and schedules.

If you wish to demo a project or watch the event live, please make sure you have joined as a member at discord.gg/python! Not all showcases will be recorded!

/r/Python
https://redd.it/1l4c4rn
Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1l4ej2e
Django Migration rollbacks in production

Hi everybody,

What's everyone's strategy for rolling back migrations in production? Let's assume a bug was not caught in dev or QA, and somehow made it onto production and we need to revert back to stable. How do you handle the migrations that need to be unapplied?

I know you can certainly do it the hard way of manually unapplying for each app, but I'm looking for an automated and scalable way. Thanks for your time!

/r/django
https://redd.it/1l4bk1z
Sold an App made with the help of AI

I sold an App ( Django Python JS) for 7K USD mostly using AI, I have done small projects for about 2 -3Ks, but since I don’t Like Front End that much I never tried more complex Apps, so I had the opportunity jump on this project inventory - buy orders - authentication - and some strange requirements from the owner of a car workshop where JS was a must, and I basically did the front end with AI, and part of the backend too, I just coded like 20% and using my old projects as base.
I understand the code and can make changes, if needed, but somehow I felt like this is just all? Or now is just work smarter not harder? I’m sure this project that took me 2 months, would have take 8 months or more without AI.
The App have been in use for some months and had no issues at all. I mean you need to understand things and what they do, but still this felt soo strange.

/r/django
https://redd.it/1l4inux
How to setup a Jupyter Enterprise Gateway for my server?

Hey there. I'm new to setting up clusters and working on a backend of this complexity so let me explain what I'm trying to do here:

I'm trying to set up a framework in my lab for people to access our GPU server from their own local devices, ideally a jupyter notebook. When needed, I would like for them to run their code and utilize the server's gpu instead of their own local compute. For this i asked deep research and it gave me two options, based on JupyterHUB or JupyterEnterprise Gateway.

In the Jupyter Enterprise Gateway method it suggested, i would run jupyter notebooks locally but those notebooks will run on the kernels that are containerized on the server. I understood this approach broadly but have no idea if this is even feasible. I would like an explainer on how i would even start setting up this framework.

I will attach link to the conversation in ChatGPT. Please do tell me if it makes sense. If so, please be kind enough to explain how this works.

Conversation Link: **https://chatgpt.com/share/68431361-2650-8005-9373-97d13e8bcb77**

/r/IPython
https://redd.it/1l4wf65
Best Django Open Source Repository

Hi everyone!

I’m currently looking for a high-quality, open-source Django project repository to explore and learn from. I strongly believe that studying real-world, production-grade codebases is one of the best ways to deepen understanding and improve as a developer.

Ideally, I’m looking for a repository that:
• Follows industry best practices
• Has a well-structured project architecture
• Includes features like testing, CI/CD, Docker support, authentication, API design, etc.
• Is actively maintained or at least well-documented

If you know of any such Django-based projects that have helped you or are known for their clean and scalable architecture, I’d love your recommendations!

Thanks in advance 🙌

/r/django
https://redd.it/1l4mkm3
Want to Speed Up My Web Dev Process Without Losing the Learning

I’ve been developing apps with Django for about a year now. I’m mostly self-taught and would say I’m pretty decent with it, especially on the backend. I usually rely on AI or online templates for the frontend since I have very little experience with CSS.

Lately, I’ve noticed I’m really slow when building apps. For example, there’s this one app I’ve been working on since February. I feel tired and burned out, but I can’t drop it because someone is interested in it. The problem is—it’s holding me hostage. I’ve got other ideas and projects I want to start, but I feel stuck.

I want to speed up my development process without sacrificing learning. I’m aiming to really master Django deeply—not just use it, but understand how it works under the hood.

So how do you balance learning with building efficiently?

/r/django
https://redd.it/1l4pc3a
CRUDAdmin - Modern and light admin interface for FastAPI built with FastCRUD and HTMX

Hey, guys, for anyone who might benefit (or would like to contribute)

Github: https://github.com/benavlabs/crudadmin
Docs: https://benavlabs.github.io/crudadmin/

CRUDAdmin is an admin interface generator for FastAPI applications, offering secure authentication, comprehensive event tracking, and essential monitoring features.

Built with FastCRUD and HTMX, it's lightweight (85% smaller than SQLAdmin and 90% smaller than Starlette Admin) and helps you create admin panels with minimal configuration (using sensible defaults), but is also customizable.

Some relevant features:

Multi-Backend Session Management: Memory, Redis, Memcached, Database, and Hybrid backends
Built-in Security: CSRF protection, rate limiting, IP restrictions, HTTPS enforcement, and secure cookies
Event Tracking & Audit Logs: Comprehensive audit trails for all admin actions with user attribution
Advanced Filtering: Type-aware field filtering, search, and pagination with bulk operations

There are tons of improvements on the way, and tons of opportunities to help. If you want to contribute, feel free!

https://github.com/benavlabs/crudadmin

/r/Python
https://redd.it/1l4yh0g
HttpOnly cookies in Django and React

Has anyone implemented JWT authentication using HttpOnly cookies in Django and React ? Are there any resources or videos that can help.

/r/django
https://redd.it/1l4vd6f
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

# Weekly Thread: Resource Request and Sharing 📚

Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!

## How it Works:

1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.

## Guidelines:

Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.

## Example Shares:

1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.

## Example Requests:

1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.

Share the knowledge, enrich the community. Happy learning! 🌟

/r/Python
https://redd.it/1l57cfo
Why Django?

No seriously (purely an educational post since idrk).

If you want to do enterprise -> spring boot

If you want to microservice -> Golang backend frameworks

If you want to do prototypes -> Fastapi

If you want to do a startup level scheme -> Supabase auth or wtv + flask

So why django?

/r/django
https://redd.it/1l57obn
R LLMs are Locally Linear Mappings: Qwen 3, Gemma 3 and Llama 3 can be converted to exactly equivalent locally linear systems for interpretability

https://arxiv.org/abs/2505.24293

https://github.com/jamesgolden1/llms-are-llms

Hello all, I'd like to share my new research describing an alternative approach to LLM interpretability. I show that transformer decoder LLMs can be made locally linear at inference time without changing outputs or weights.

Result: LLMs can be converted into nearly exactly equivalent linear systems that reconstruct the next-token output for any given input text sequence. Instead of 25+ layers of nonlinear computations, this method computes a single set of matrix multiplications that linearly operates on the input embedding vectors and nearly exactly reconstructs the output embedding for a single token prediction.

Method: A "linear path" through the transformer is identified, the nonlinear components are detached from the gradient, and the Jacobian with respect to the input embeddings is computed. This yields the "detached Jacobian", which is the set of matrices that operate linearly on input embeddings to reproduce the predicted output embedding with \~10⁻⁶ error for float32 models.

Interpretability: This method provides nearly-exact token attribution rather than approximate attention weights - tools from linear algebra like the SVD are used to understand which concepts drive predictions

Scope: Works across Qwen 3, Gemma 3, Llama 3, Phi 4, Ministral and OLMo 2 (tested up to 70B parameters at q4).

Practical: The method works on

/r/MachineLearning
https://redd.it/1l4rpe2
A simple file-sharing app built in Python with GUI, host discovery, drag-and-drop.

Hi everyone! 👋

This is a Python-based file sharing app I built as a weekend project.

**What My Project Does**

* Simple GUI for sending and receiving files over a local network
* Sender side:
* Auto-host discovery (or manual IP input)
* Transfer status, drag-and-drop file support, and file integrity check using hashes
* Receiver side:
* Set a listening port and destination folder to receive files
* Supports multiple file transfers, works across machines (even VMs with some tweaks)

**Target Audience**

This is mainly a **learning-focused, hobby project** and is ideal for:

* Beginners learning networking with Python
* People who want to understand sockets, GUI integration, and file transfers

It's not meant for production, but the logic is clean and it’s a great foundation to build on.

**Comparison**

There are plenty of file transfer tools like Snapdrop, LAN Share, and FTP servers. This app differs by:

* Being **pure Python**, no setup or third-party dependencies
* Teaching-oriented — **great for learning sockets, GUIs, and local networking**

Built using **socket**, **tkinter**, and standard Python libraries. Some parts were tricky (like VM discovery), but I learned a lot along the way. Built this mostly using GitHub Copilot + debugging manually - had a lot of fun in doing so.

🔗

/r/Python
https://redd.it/1l5bjyr
Am I dumb? Why does Flask just refuse to work?

https://preview.redd.it/obujwa5y8f5f1.png?width=387&format=png&auto=webp&s=b859848ca12288d53f574c0fa9810ed474093a36

https://preview.redd.it/rcbu2df29f5f1.png?width=645&format=png&auto=webp&s=015e5cd5b4d548e2ec6517207440ab14c3ceb6d5

https://preview.redd.it/u3fulu8k9f5f1.png?width=751&format=png&auto=webp&s=0c492372a70f2ef7bd9ffb7de7c13edba72aa643

https://preview.redd.it/gei7k73m9f5f1.png?width=652&format=png&auto=webp&s=94ec9027991c72ca0c8bb2144e78b34a173dd2f8

https://preview.redd.it/nwzgds3p9f5f1.png?width=610&format=png&auto=webp&s=6328322de11734fdfeef5f43d96bb1c3319ff124

https://preview.redd.it/7uxhip5x9f5f1.png?width=836&format=png&auto=webp&s=d82d28b7c3f6b6c43f7b2b392a8fd1906e24cead

https://preview.redd.it/n3r92vqqaf5f1.png?width=1279&format=png&auto=webp&s=416858a0d81f87fd20d325256b9e78f58ee4cc8f

I have no clue why the site doesn't display anything. Like I think the index function is just not called for some reason. i've tried putting print statements within the index function and they never print anything.

When I click on the link, nothing appears, its just perpetual loading. i've checked a trillion times that the folder has the python file and then a templates folder with index.html inside.

I've tried tutorials, I've copy pasted 1:1 programs that are meant to work, everything leads to the same exact result, so i don't know if its my code anymore. I've tried reinstalling python, reinstalling flask, and nothing ever works. It's not just my device, my school one is also experiencing the same issue.

does anyone know what i can do?? if you need any more details please tell me. i'm kinda not good so apologies if im doing or missing something horribly obvious

/r/flask
https://redd.it/1l5b52d
Pydantic / Celery Seamless Integration

I've been looking for existing pydantic - celery integrations and found some that aren't seamless so I built on top of them and turned them into a 1 line integration.

[https://github.com/jwnwilson/celery\_pydantic](https://github.com/jwnwilson/celery_pydantic)

**What My Project Does**

* Allow you to use pydantic objects as celery task arguments
* Allow you to return pydantic objecst from celery tasks

**Target Audience**

* Anyone who wants to use pydantic with celery.

**Comparison**

* [This blog post](https://benninger.ca/posts/celery-serializer-pydantic/) is the majority of the code above, but it requires registering each model manually, which I didn't want to do.
* [Celery’s official Pydantic integration](https://docs.celeryq.dev/en/v5.5.2/userguide/tasks.html?ref=blog.dosu.dev#argument-validation-with-pydantic) only accepts plain dicts in arguments, not pydantic models. It also only returns dicts.

You can also steal this file directly if you prefer:
[https://github.com/jwnwilson/celery\_pydantic/blob/main/celery\_pydantic/serializer.py](https://github.com/jwnwilson/celery_pydantic/blob/main/celery_pydantic/serializer.py)

There are some performance improvements that can be made with better json parsers so keep that in mind if you want to use this for larger projects. Would love feedback, hope it's helpful.

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