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
How do you guys secure your django websites?

recently i was working on a freelance project
i wrote a small function for deleting objects but each time i notice that there's something wrong and it was the lack if security and its driving me crazy that each time i have to implement a new security function


so my question is:

How do you guys implement the security features?

do you create all of the security features at once? or wait the production and user feedback?

https://preview.redd.it/lepcn95y5n6f1.png?width=1360&format=png&auto=webp&s=f59125378d9d256b372ad14c3a9c5dc04791b0de



/r/django
https://redd.it/1la9cc8
[Project] I built an open-source tool to turn handwriting into a font using PyTorch and OpenCV.

I'm excited to share HandFonted, a project I built that uses a Python-powered backend to convert a photo of handwriting into an installable .ttf font file.

**Live Demo:** [https://handfonted.xyz](https://www.google.com/url?sa=E&q=https%3A%2F%2Fhandfonted.xyz)
**GitHub Repo:** [https://github.com/reshamgaire/HandFonted](https://github.com/reshamgaire/HandFonted)

**What My Project Does**

HandFonted is a web application that allows a user to upload a single image of their handwritten alphabet. The backend processes this image, isolates each character, identifies it using a machine learning model, and then generates a fully functional font file (.ttf) that the user can download and install on their computer.

**Target Audience**

This is primarily a portfolio project to demonstrate a full-stack application combining computer vision, ML, and web development. It's meant for:

* **Developers and students** to explore how these different technologies can be integrated.
* **Hobbyists and creatives** who want a fun, free tool to create a personal font without the complexity of professional software.

**How it Differs from Alternatives**

While there are commercial services like Calligraphr, HandFonted differs in a few key ways:

* **No Template Required:** You can write on any plain piece of paper, whereas many alternatives require you to print and fill out a specific template.
* **Fully Free & Open-Source:** There are no premium features or sign-ups. The entire codebase is available on GitHub for anyone to inspect, use, or learn from.
* **AI-Powered Recognition:** It

/r/Python
https://redd.it/1laipn1
Django Channels

Hi so i need to implement notifications in my application and I have a few questions about Django channel layer(COuld really use some help here):



1. Does every consumer instance get its own channel layer name ? ( lets say i have 2 websocket URLs mapped to 2 consumers , and every client establishes a connection to both these consumers via the url router )



2. Is the channel layer name uniquely generated only for that specific connection ? and therefore might be different if the same consumer spins up another instance of itself for a connection ?



3. How do i store and access these channel layer names for each user when i need to add them to a group or something . Do i just store them in a database for the duration of the connection and get rid of them after ?

/r/django
https://redd.it/1lak6tk
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/1lauzll
How do I implement rate limiting?

How do I implement rate limiting? Would I have to use redis?

/r/django
https://redd.it/1lav2ko
How do I implement rate limiting?

How do I implement rate limiting in my api? Would I have to use redis?

/r/flask
https://redd.it/1lav24s
I built "Submind" – a beautiful PyQt6 app to batch transcribe and auto-translate subtitles

# What My Project Does

**Submind** is a minimal, modern PyQt6-based desktop app that lets you transcribe audio or video files into `.srt` Subtitles using OpenAI’s Whisper model.

🎧 **Features**:

* Transcribe single or multiple files at once (batch mode)
* Optional auto-translation into another language
* Save the original and translated subtitles separately
* Whisper runs locally (no API key required)
* Clean UI with tabs for single/batch processing

It uses the open-source Whisper model ([https://github.com/openai/whisper](https://github.com/openai/whisper)) and supports common media formats like `.mp3`, `.mp4`, `.wav`, `.mkv`, etc.



# Target Audience

This tool is aimed at:

* Content creators or editors who work with subtitles frequently
* Students or educators needing quick lecture transcription
* Developers who want a clean UI example integrating Whisper
* Anyone looking for a fast, local way to convert media to `.srt`

It’s not yet meant for large-scale production, but it’s a polished MVP with useful features for individuals and small teams.



# Comparison

I didn't see any Qt Apps for Whisper yet. Please comment if you have seen any.



# Try it out

GitHub: [rohankishore/Submind](https://github.com/rohankishore/Submind)


Let me know what you think! I'm open to feature suggestions — I’m considering adding drag-and-drop, speaker labeling, and live waveform preview soon. 😄

/r/Python
https://redd.it/1lap8mz
MCPGex - MCP server for finding, testing and refining regex patterns

Hello,

Wanted to showcase my recently published project, MCPGex, which may be of use to many of you that want to find, test, and refine regex patterns with LLMs.

What My Project Does

MCPGex is an MCP server that allows LLMs to test and validate regex patterns against test cases. It provides a systematic way to develop regex patterns by defining or generating expected outcomes and iteratively testing patterns until all requirements are satisfied. LLMs sometimes fail to capture the correct regex pattern on the first or even second try, so MCPGex allows them to test their regex patterns out.

Target Audience

MCPGex is for anyone who uses regex patterns and would like to have a quick way to generate regex patterns that work. Instead of searching for regex patterns when you forget them, you can ask to have them generated. Of all the regex tasks given thus far, MCPGex has provided the LLM the ability to successfully get the right pattern.

Comparison

As far as I know, there is nothing similar to MCPGex that allows LLMs to test and refine their generated regex patterns. I may be mistaken, and if I am, feel free to correct me! :)

You can go to the project GitHub page by

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