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
I built a production-ready Django/DRF Boilerplate with Custom User Auth, JWT, and Spectaular Docs feedback welcome!

Hey,

I spent a while cleaning up my personal project starter and decided to open-source it as drf-boilerplate. I'm sharing it because I'm tired of rewriting the same core authentication logic for every new DRF API.

What it solves:

1. The Custom User Pain: Fully configured AbstractUser model with login via either email OR username.
2. Auth Separation: Integrated djangorestframework-simplejwt with pre-built endpoints for token refresh/blacklist.
3. Deployment Headache: Settings are split into base, development, and production, all driven by django-environ for clean .env handling.
4. UX Flows: Includes models/stubs for Email Verification and Password Reset flows (the hardest parts to set up correctly).

I'd appreciate any feedback on the file structure etc.

Repo Link: https://github.com/fulanii/drf-boilerplate/

/r/django
https://redd.it/1of47w2
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/1ofdbzk
Skylos: Dead code + Vibe code security flaws detector

Hi everyone

I have created Skylos to detect dead code quite a while back. Just here to give a short update. We have updated and expanded Skylos' capabilities to include common security flaws generated by AI. These things include the basic stuff like SQL injection, path traversal etc. So how this works, your py files are parsed through the AST.. After that the security scanners will take over and run over that same tree. Once that is complete, a generic "dangerous" table is applied node by node to catch any security flaws. As for how the dead code side works, i'm gonna keep it short. basically it parses the py files to build a graph of functions, classes, variables etc etc. it will then record where each symbol is referenced. thats it.

# Target audience

Anyone working with python code.

# Why use Skylos?

I know people will ask why use this when there's vulture, bandit etc etc. Well I mean those are really established and great libraries too. We're kind of more niche. For starters, Skylos provides real taint tracking by propagating the taint in the AST. If i'm not wrong although i may be, bandit uses pattern matching. Just

/r/Python
https://redd.it/1ofevmc
Faster Jupyter Notebooks with the Zuban Language Server

The Zuban Language Server now supports Jupyter notebooks in addition to standard Python files.

You can use this, for example, if you have the Zuban extension installed in VSCode and work with Jupyter notebooks there. This update marks one of the final steps towards a feature-complete Python Language Server; remaining work includes auto-imports and a few smaller features.

/r/Python
https://redd.it/1oet078
full stack web development using Django or cybersecurity and networking. What should I chose?

This is my first post. I see that there is more insightful people in reddit. I am a computer science graduate 2025 passout. I tried for numerous mass drives and startup but failed to get in nothing. I realized i have to built a skill of my own rather than looking for company. but i dont know what to chose. Since i selected computer Science for its demand at that time but i don't even get a job.

I am thinking what to chose full stack web development or cybersecurity? if it is web development i will chose Django and i don't know much about cybersecurity... but i consider it because the rumors that it is good career path. What should i do?

/r/djangolearning
https://redd.it/1oa5l0a
D How was Multi-head Latent Attention not a thing before DeepSeek-V2 came up with it?

Multi-head Latent Attention (MLA) was introduced by DeepSeek-V2 in 2024. The idea is to project keys and values into a latent space and perform attention there, which drastically reduces complexity.

What I don't understand: how did no one propose this earlier? It feels like a pretty natural next step, especially given the trends we’ve seen over the past few years.

For instance, the shift from diffusion in pixel space to latent diffusion (e.g. Stable Diffusion) followed that same principle: operate in a learned latent representation (e.g. through some modern VAE variation) for efficiency. And even in the attention world, Perceiver (https://arxiv.org/abs/2103.03206) in 2021 already explored projecting queries into a latent space to reduce complexity. MLA feels like a very small step from that idea, yet it didn't appear until 2024.

Of course, I know this is a bit of a naive take since in ML research we all know how this goes: in practice, good ideas often don't work out out of the box without "tricks" or nuances. Maybe (probably) someone did try something like MLA years ago, but it just didn't deliver without the right tricks or architecture choices.

So I'm wondering: is that what happened here? Did people experiment with latent attention

/r/MachineLearning
https://redd.it/1oetrex
My Django based open-source project PdfDing is receiving a grant

Hi r/django,

for quite some time I have been working on the open-source project PdfDing - a selfhosted PDF manager, viewer and editor offering a seamless user experience on multiple devices. Last week PdfDing was selected to receive a grant from the NGI Zero Commons Fund. This fund is dedicated to helping deliver, mature and scale new internet commons across the whole technology spectrum and is amongst others funded by the European Commission. The exact sum of the grant still needs to be discussed, but obviously I am very stocked to have been selected and need to share it with the community.

You can find the repository here. As always I would be quite happy about a star and you trying out the application.

/r/django
https://redd.it/1of90vh
Flask-Admin v2.0 released

After more than 1 year of work, Flask-Admin released v2.0 🥳

Flask-Admin solves the boring problem of building an admin interface on top of an existing data model. With little effort, it lets you manage your web service’s data through a user-friendly interface.

https://github.com/pallets-eco/flask-admin/releases/tag/v2.0.0

/r/flask
https://redd.it/1ofn3m4
Creating a migration without changing the model

What would happen if I were to remove a table column and add a new one in a migration, when I only actually added the one column to the model without removing the old one.

Reasoning:
I created a table with an inherited classes and now I want to remove a column but I don’t want to change the actual model class since other tables use it.

/r/django
https://redd.it/1ofb6lg
Staticfiles not being served for Django Admin Panel on cPanel

This is my first time using cPanel for hosting a DRF API, everything worked so far but the admin panel not getting styled although I followed a tuto on Youtube on how to do it and I already used whitenoise but it jsut won't work, the staticfiles are being created but the admin panel is not styled, is there a way where I can at least see some errors or logs ...

/r/django
https://redd.it/1ofwkon
Learning Flask and RESTful API

Please for the love of God tell me how do I learn API oriented Flask? All the tutorials on the internet are just built around web development with hundreds lines of HTML code in them. I don't need that. I want to use Flask to work with APIs and use it as a stepping stone to eventually learn more complex frameworks like FAST API. Please don't recommend Miguel Grinberg tutorial it's a frontend oriented tutorial and only has 1 chapter on databses and 1 chapter on APIs. And please don't post links for documentation. Is there an actual practical way to learn Flask? I don't understand why isn't there a course or a big tutorial on it on the internet?? All I can find relating to Flask is either Grinberg tutorial or a couple of small articles like HOW TO BUILD YOUR API IN 3 LINES OF CODE. How come a framework so popular doesn't have any learning resources on it besides 1 megatutorial and JUST READ THE MANUAL MAN?

/r/flask
https://redd.it/1ofniw8
POS APIs: Custom Integration

Hi everyone!

I am part of a small team that runs a single owned cafe. We are looking to test our own cafe management app (currently the MVP is built with Django and React as I am developing this alone).

I am looking for POS APIs to connect to the Django backend.

The key features I am looking for is:
1. Accept and Log orders to my db (Transactional Info)
2. Basic menu functionalities (add, remove, update pricing, etc.)
3. Query order data to update things like inventory, return, wastage etc., through our already existing custom workflows.
4. Query orders based on private events and/or customer orders (I can create the segments but I need a way of communicating that to the order)

Firstly, I want to know if I am unnecessarily complicating this?

Apologies if this is the wrong place to ask, but any leads on where I can find answers would be helpful.

I have briefly looked at Square, goTab(this ones a bit confusing) and the Toast API but I was not sure if I am locked in to use some fancy cloud system to unlock the actual stuff I need. As our primary goal is to create certain custom KPIs that enable the team to

/r/djangolearning
https://redd.it/1ofy334
Flask-Compress 1.20 released

2 releases were made recently to improve the support of conditional requests.

This should result in better performance when etags are involved (304 not modified instead of 200 OK). Also, Python3.14 is fully supported!



/r/flask
https://redd.it/1ofnpas
Sunday Daily Thread: What's everyone working on this week?

# Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

## How it Works:

1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.

## Guidelines:

Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

## Example Shares:

1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

/r/Python
https://redd.it/1og6hlr
My Python based open-source project PdfDing is receiving a grant

Hi r/Python,

for quite some time I have been working on the open-source project PdfDing - a Django based selfhosted PDF manager, viewer and editor offering a seamless user experience on multiple devices. You can find the repository [here](https://github.com/mrmn2/PdfDing). As always I would be quite happy about a star and you trying out the application.

Last week PdfDing was selected to receive a grant from the [NGI Zero Commons Fund](https://nlnet.nl/news/2025/20251016-selection-NGI0CommonsFund.html). This fund is dedicated to helping deliver, mature and scale new internet commons across the whole technology spectrum and is amongst others funded by the European Commission. The exact sum of the grant still needs to be discussed, but obviously I am very stocked to have been selected and need to share it with the community.

**What My Project Does**

PdfDing's features include:

* Seamless browser based PDF viewing on multiple devices. Remembers current position - continue where you stopped reading
* Stay on top of your PDF collection with multi-level tagging, starring and archiving functionalities
* Edit PDFs by adding comments, highlighting and drawings
* Manage and export PDF highlights and comments in dedicated sections
* Clean, intuitive UI with dark mode, inverted color mode, custom theme colors and multiple layouts
* SSO support via OIDC
* Share PDFs with

/r/Python
https://redd.it/1ogf2iw
I built a Python tool to debug HTTP request performance step-by-step

# What My Project Does

httptap is a CLI and Python library for detailed HTTP request performance tracing.

It breaks a request into real network stages - DNS → TCP → TLS → TTFB → Transfer — and shows precise timing for each.

It helps answer not just “why is it slow?” but “which part is slow?”

You get a full waterfall breakdown, TLS info, redirect chain, and structured JSON output for automation or CI.

🔗 Repo: [github.com/ozeranskii/httptap](https://github.com/ozeranskii/httptap)
📦 PyPI: pypi.org/project/httptap
📕 Documentation: [https://httptap.dev/](https://httptap.dev/)
📹 asciinema: https://asciinema.org/a/751564

# Target Audience

Developers debugging API latency or network bottlenecks
DevOps / SRE teams investigating performance regressions
Security engineers checking TLS setup
Anyone who wants a native Python equivalent of curl -w + Wireshark + stopwatch

httptap works cross-platform (macOS, Linux, Windows), has minimal dependencies, and can be used both interactively and programmatically.

# Comparison

When exploring similar tools, I found two common options:

[reorx/httpstat (Python)](https://github.com/reorx/httpstat) — depends on curl, unmaintained, limited visibility
davecheney/httpstat (Go) — cleaner, but mostly a decorated curl -v, no TLS or JSON export

httptap takes a different route:

Pure Python implementation using httpx and httpcore trace hooks (no curl)
Deep TLS inspection (protocol, cipher, expiry days)
Rich output modes: human-readable table, compact line, metrics-only, and full JSON


/r/Python
https://redd.it/1ogjjrl
Pip 25.3 - build constraints and PEP 517 builds only!

This weekend I got to be the release manager for pip 25.3!

I'd say the the big highlights are:

* A new option `--build-constraint` that allows you to define build time dependency constraints without affecting install constraints.
* Building from source is now PEP 517 only, no more directly calling `setup.py`. This will affect only a tiny % of projects, as PEP 517 automatically falls back to setuptools (but using the official build interface), but it finally removes legacy behavior that tools like uv never even supported.
* Similarly, editable installs are PEP 660 only, pip now no longer calls `setup.py` here either, this does mean if you use editable installs with setuptools you need to use v66+.

A small highlight, but one I'm very happy with, is if your remote index supports PEP 658 metadata (PyPI does), then `pip install --dry-run` and `pip lock` will avoid downloading the entire package.

The official announcement post is at: https://discuss.python.org/t/announcement-pip-25-3-release/104550

The full changelog is at: https://github.com/pypa/pip/blob/main/NEWS.rst#253-2025-10-24

/r/Python
https://redd.it/1og1yzs
How to implement Server Sent Events (SSE) in Django with WSGI

I tried django-eventstream + daphne (ASGI) - it worked, but I've lost hot-reload on server and browser. Then I tried a custom implementation with uvicorn - it worked, but browser hot reload didn't worked anymore, neither server hot reload even though I had --reload flag for uvicorn.

So, I wasted a few hours saving 5 seconds of restarting server and reloading browser after each change and created a new service in Go which takes messages published by Django to redis pub/sub and sends them to frontend. It's basically a new service in a docker-compose file next to your redis service (super lightweight - because is built in Go).

\~2.4 RAM used and it has \~8mb in size.

https://preview.redd.it/ddfqha5t3ixf1.png?width=945&format=png&auto=webp&s=bfd271bd1677e2d047e6060f64ee9cbaeaa84621




Yeah, I could've used pooling, but that setInterval is tricky and I've seen it cause issues in the past.

Here is the repo if anyone is interested:

https://github.com/ClimenteA/go-sse-wsgi-sidecar

/r/django
https://redd.it/1ogs2pw