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
Best way to showcase pre-production?

I’m currently working on a website for a friend, who doesn’t have much technical experience. I want to show him the progress I have so far, and let him try it out, but I don’t want to pay for anything. I’m kind of new to this stuff myself, but I have heard of GitHub pages. I believe it is only for static sites though. Is there a good free alternative for flask sites?

/r/flask
https://redd.it/1mmy9uw
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/1mmy5dl
VectorDB - In-memory vector database with swappable indexing

# What My Project Does

It's a lightweight vector database that runs entirely in-memory. You can store embeddings, search for similar vectors, and switch between different indexing algorithms (Linear, KD-Tree, LSH) without rebuilding your data.

# Target Audience

This is for developers who need vector search in prototypes or small projects. Not meant for production with millions of vectors - use Pinecone or Weaviate for that.

# Comparison

Unlike Chroma/Weaviate, this doesn't require Docker or external services. Unlike FAISS, you can swap index types on the fly. Unlike Pinecone, it's free and runs locally. The tradeoff: it's in-memory only (with JSON snapshots) and caps out around 100-500k vectors.

GitHub: https://github.com/doganarif/vectordb

/r/Python
https://redd.it/1mn0ig1
[D] Reminder that Bill Gates's prophesy came true

/r/MachineLearning
https://redd.it/1mm5oqm
Do Django migrations make anyone else nervous? Just curious !

Every time I hit migrate on a big project, there’s that tiny voice in my head like this might be the one that blows everything up.
99% of the time it’s fine… but that 1% sticks with you.
Do you just trust it and hope for the best, or always run it on staging first?



/r/django
https://redd.it/1mmzx36
Should I put my data synchronization in a separate app?

I have a new Django app that handles different things of an industry. All the primary data, such as costumers and inventory info comes from the business' ERP API endpoints. I sync this information on an hourly basis with a chron job and it always follow the same pattern:

- Update the Job's database row to register the update time and that the sync started

- Fetch the data

- Run a function that will parse (don't use serializer because it is very slow) the data and handle to allow me to bulk update and create the information

- Update the Job's database row again

Right now my Django app is just a single big app and I'm splitting it into separate apps to make maintance easier, since it is new and didn't hit production yet there's no need to worry about how the migrations/data will be, I can just reset everything if needed. I'm thinking about creating an app just for the Job information and keep there everything related to it there, including the functions that parse the data in a structure like this:

```
project_root/

├── customers/
├── inventory/

/r/django
https://redd.it/1mn3tdj
Am willing to work on any Django project in exchange for a laptop

Been working with Django for a while now, I have significant experience and would be asset,,my laptop just got stolen when I was about to get my project to it's completion stage,,,but thank God I had it backed up on GitHub

/r/django
https://redd.it/1mn9lbv
SMTP internal server error in fastapi

I have problem on sending SMTP mail on savella platform using fastapi for mail service I am using aiosmtplib and I try many port numbers like 587,25,2525,465 none is working and return 500 internal server issue when itry on local host it is working properly

/r/Python
https://redd.it/1mn5ukj
So, what happened to pypistats?

I use this site https://www.pypistats.org/ to gauge the popularity of certain packages, but it has been down for about a month. What gives?

/r/Python
https://redd.it/1mnaren
APIException (#3 in r/FastAPI pip package flair) – Fixes Messy JSON Responses (+0.72 ms)

What My Project Does

If you’ve built anything with FastAPI, you’ve probably seen this mess:

* One endpoint returns 200 with one key structure
* Another throws an error with a completely different format
* Pydantic validation errors use yet another JSON shape
* An unhandled exception drops an HTML error page into your API, and yeah, FastAPI auto-generates Swagger, but it doesn’t correctly show error cases by default.

The frontend team cries because now they have to handle **five** different response shapes.

**With** [APIException](https://github.com/akutayural/APIException)**:**

* Both success and error responses follow the same ResponseModel schema
* Even unhandled exceptions return the same JSON format
* Swagger docs show **every** possible response (200, 400, 500…) with clear models
* Frontend devs stop asking “what does this endpoint return?” – it’s always the same
* All errors are logged by default

**Target Audience**

* FastAPI devs are tired of inconsistent response formats
* Teams that want clean, predictable Swagger docs
* Anyone who wants unhandled exceptions to return nice, readable JSON
* People who like “one format, zero surprises” between backend and frontend

**Comparison**

I benchmarked it against FastAPI’s built-in HTTPException using Locust with 200 concurrent users for 2 minutes:

|fastapi HTTPException|apiexception APIException|
|:-|:-|
|Avg Latency|2.00ms|2.72ms|
|P95|5ms|6ms|
|P99|9ms|19ms|
|Max Latency|44ms|96ms|
|RPS|609|609|

The difference is acceptable since **APIException** also **logs the exceptions**.

Also, most libraries only standardise errors. This one

/r/Python
https://redd.it/1mnf7ss
I built a tool that uses the 'ast' module to auto-generate interactive flowcharts from any Python.

Like many of you, I've often found myself deep in an unfamiliar codebase, trying to trace the logic and get a high-level view of how everything fits together. It can be a real time sink. To solve this, I built a feature into my larger project, Newton, specifically for Python developers.

What the product does

Newton is a web app that parses a Python script using the ast module and automatically generates a procedural flowchart from it. It's designed to give you an instant visual understanding of the code's architecture, control flow, and dependencies.

Here it is analyzing a 3,000+ line Python application (app.py): Gx10jXQW4AAzhH5 (1903×997)

Key Features for Developers

Automated Flowcharting: Just paste your code and it builds the graph, mapping out function definitions, loops, and conditionals.
Topic Clustering: For large scripts, an AI analyzes the graph to find higher-order concepts and emergent properties. In the screenshot, you can see it identifying things like "Application Initialization" and "User Authentication" automatically. This helps you understand what different parts of the code do conceptually.
Interactive Chat: You can select a node (like a function) or a whole Topic Cluster and ask questions about it. It's like having an agent that has already read and understood your code.

Target Audience

I built this for:

Developers who are

/r/Python
https://redd.it/1mngei8
Tilf - a Pixel Art Editor written with PySide6

Hello everyone, lately I’ve been having fun with SDL, and I wanted to try creating a small adventure video game, nothing too complex. However, to call something a proper videogame, you also need a visual component, maybe made up of a few characters and objects interacting with each other, perhaps using Pixel Art, which I personally love.

I searched online, and most of the tools that let you create even a single sprite require an account, ask for an email, are paid, or only work online. There is some open-source software that runs locally, but it can be quite complex to set up, and all I really want are a few simple tools to draw the character/object I have in mind.

Why not create an editor that only does that one thing? From past experience, I’ve loved working with Qt, especially using PySide widgets. So, here it is: I wrote it from scratch using PySide6. No installations, no configurations. You just download it to your computer and start using it right away.

There’s still a lot that could be improved, but it remains a simple and personal project, nothing demanding. I just hope it might be useful to others. It runs on Windows,

/r/Python
https://redd.it/1mno2u4
Used Django for the first time on a project and I am kind of blown away.

My wife and I had an idea for a project a few months ago that I finally got around to building (it's not ready for prime time yet so currently gated behind a mountain of Cloudflare rules). When I started on it I was using Flask for some quick hit tests of the concepts but was getting a bit frustrated extending features and how it does what it says on the tin and little else. I went down the headless CMS route for a bit playing with your standard headless Wordpress approach since I used to be pretty good in php but didn't feel like learning React or Node. Even tried Strapi which wasn't bad but not what I wanted either. Both of those CMS's were almost TOO feature rich and I felt like I was fighting them more than using them.

At a previous company we were a heavy duty Django shop (I ran ops/infra teams so we only made sure it worked at scale and all the pre-production environments worked) and I'm still friends with a bunch of people who used to write Python and worked in Django so I thought I'd give it a

/r/django
https://redd.it/1mnb4ym
I built a tool to auto-transcribe and translate China's CCTV News

What My Project Does

I created a Python tool that automatically downloads, transcribes, and translates episodes of CCTV's "Xinwen Lianbo" (新闻联播) - China's most-watched daily news program - into English subtitles.

Target Audience

Perfect for Chinese language learners who want to practice with real, current news content. The translations are faithful and contextual, making it easier to understand formal/political Chinese vocabulary.

\- Local transcription with Chinese-optimized ASR model (FunASR Paraformer)
\- OpenRouter API for translation (DeepSeek V3-0324)
\- All built with modern Python tooling (uv, typer, etc.)
\- Uses ffmpeg, yt-dlp to generate ready-made "burned" video with subtitles and processing.

Comparison

There is no project like this on GitHub (yet).

GitHub: https://github.com/piotrmaciejbednarski/cctv-xinwen-lianbo-en

/r/Python
https://redd.it/1mnp1st
eQuacks Toy Currency

eQuacks is my attempt at a toy currency. It literally has not use, but it works normally. Its backend is in Flask, so I thought I might post this here. I'll send you some of this currency if you post your eQuacks username.

Link: https://equacks.seafoodstudios.com/

Source Code: https://github.com/SeafoodStudios/eQuacks

/r/flask
https://redd.it/1mnj5z8
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/1mnthov