Python Daily – Telegram
Python Daily
2.56K subscribers
1.49K photos
53 videos
2 files
39K 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 made an alarm that will sound once your steam game has finished downloading

What My Project Does

This is a very simple project used to notify people exactly when their steam game has finished downloading.

Target Audience

Well I made this to wake me up from my nap when my game had finished downloading but I can see it being used by anyone since steam notifications can be pretty broken or if the user is AFK and wants to have an alarm alert them when the game has finished installing.

Comparison

I had a look online and I couldn't really find any alternatives of this. I'm definitely not the only one to come up with this idea and it is not hard at all to make so maybe people have made it and haven't posted it or I just didn't find it or my use case was so obscure no one else had the same situation. I guess it could be compared to a more aggresive version of the steam notification XD.


GitHub Link: https://github.com/Sexy-Dexty/Steam-Download-Alarm

/r/Python
https://redd.it/1pgctqs
Help Me! What to do next? Plz😔

/r/django
https://redd.it/1pg6lxe
A small modern Python project template I'm using for new repos

What My Project Does

This is a minimal Python project template I'm using when I spin up small repos. It gives you a ready-to-go structure with src/tests/docs, plus tooling for formatting, linting, testing, type-checking, and dependency management. Out of the box it wires up Black, Ruff, mypy, pytest, pip-tools, pre-commit, and a simple GitHub Actions CI workflow, all driven through invoke tasks so you can run the same commands locally and in CI.

Target Audience

This is mainly aimed at people who create a lot of small to medium Python projects and want a clean, modern starting point without a lot of extra complexity. It’s intended for real use (not just a toy), but it deliberately stays lightweight so you can delete or extend pieces as needed. I’ve focused on Python 3.13+ and tried

/r/Python
https://redd.it/1pg10u3
Render won’t deploy my Flask app — clicking “Deploy Web Service” does nothing

Hey everyone, I’m trying to deploy a simple Flask app on Render, but when I reach the final step and click “Deploy Web Service”, literally nothing happens. No error, no loading, no job started: the button just does nothing.

Here’s my setup:

Repo: GitHub → task-master-flex

Language: Python 3

Branch: main

Start Command:

gunicorn app:app

Build Command:

pip install -r requirements.txt

My requirements.txt includes:

Flask
Flask-SQLAlchemy
gunicorn

My app is in **app.py**, and the Flask object is named app:

if name == "main":
import os
port = int(os.environ.get("PORT", 5000))
app.run(host="0.0.0.0", port=port)

SQLite: using /tmp/test.db for storage.

I’ve tried:

reconnecting GitHub
switching browsers
clearing cache
re-creating the service

But the “Deploy” button still isn’t triggering anything.

Has anyone seen this? Is there a Render bug right now or something missing in my config?

Any help would be appreciated 🙏

/r/flask
https://redd.it/1pgekoc
django-scheduled-tasks: Running periodic background tasks with the 6.0 task framework

I'm excited about the addition of the 6.0 Tasks framework in Django. I'm trying it out as a light-weight
Celery replacement in some hobby and professional projects.

In doing so, I'm trying to provide a package for a (to me) common use-case of background tasks:
scheduling tasks to run periodically, e.g., at certain times of day, or every hour.

It's designed to wrap around whatever task backend you have running by registering certain tasks on a schedule,
and I've started with support for periodic tasks (run on a time interval) and crontab-based schedules.

Usage:


from django.tasks import task
from django_scheduled_tasks import periodic_task, cron_task
from datetime import timedelta


# note the order of the decorators! Make sure periodic_task is above task
@periodic_task(interval=timedelta(hours=2))
@task
def run_hourly():
...


# or call periodic_task with a task directly:
@task
def some_existing_task(some_arg: str):


/r/django
https://redd.it/1pgh6me
Extracting financial data from 10-K and 10-Q reports

I'm interested in hearing if anyone here is extracting financial data from 10-K and 10-Q reports, mainly data from:
Income statement (revenue, operating expenses, net income etc)
Balance sheet (Assets like Cash and cash equivalents, Liabilities like debt etc)
Cash flow statement (Cash flow from operations, investments and financing etc)

Anyone doing this by themselves today? What approach are you using, parsing iXBRL tags, parsing with LLM or some approach?

Interested in hearing about your solutions and pros and cons with them!

/r/Python
https://redd.it/1pglwm4
The Perfect Christmas Gift for Pythonistas Book (and your suggestions?)

I just wanted to share a fun find for anyone trying to figure out what to get a Python programmer for Christmas.

I picked up a book called The Python Programmer’s Survival Guide and it’s honestly hilarious. Not a tutorial, not a dry reference, just a tech-humor book that nails all the weird little things we deal with in Python. It's just funny as hell!

What surprised me is that it works for pretty much everyone. Beginners, seniors, anyone who have had to deal with the tantrums of Python. Haven't ever seen a book like this as a Python enthusiast.

If you want the perfect Christmas book gift for a Pythonista, this is it.

What is your pick as a Christmas gift to a Pythonista?

/r/Python
https://redd.it/1pgl3mc
Help Me! What to do next? Plz😔

/r/djangolearning
https://redd.it/1pg6mjn
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 denoscription 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

**Denoscription**: 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

**Denoscription**: 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

**Denoscription**: Create a noscript 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/1pgxoda
Please ROAST My FastAPI Template

Source code: [https://github.com/CarterPerez-dev/fullstack-template](https://github.com/CarterPerez-dev/fullstack-template)

I got tired of copying the same boilerplate across projects and finally sat down and made a proper template. It's mainly for my own use but figured I'd share it and get some feedback before I clean it up more.

**What my project does:**

* FastAPI with fully async SQLAlchemy (asyncpg, proper connection pooling)
* JWT auth with refresh token rotation + replay attack detection
* Alembic migrations (async compatible)
* PostgreSQL + Redis
* Docker Compose setup for dev and prod
* Nginx reverse proxy configs for both environments
* Rate limiting via slowapi (falls back to in-memory if Redis dies)
* Structured logging with structlog
* Repository pattern for DB operations
* Full test suite with pytest-asyncio + factory fixtures
* Fully Linted (mypy, ruff, pylint)
* Uses uv for package management, just for commands
* Basic user auth/CRUD and basic admin CRUD

**Comparison:**

* Did a deep dive into current best practices (+Nov 2025) for FastAPI, Pydantic, async SQLAlchemy, Docker, Nginx, and spent way too much time reading docs and GitHub issues to ensure nothing's using deprecated patterns or outdated approaches.
* Also has Astral's new type checker - 'ty 0.0.1a32' setup to mess around with (Came out literally last week, so I highly doubt any similar templates have

/r/Python
https://redd.it/1pgvpw1
Just upgraded from Django 5.2.6 to 6.0, admin sidebar filter is now on top :S

I just jump into django 6.0 half an hour ago, my experience so far (actually, short story)
\- I had some issues with "format_html" method, it's usage has changed to deal with XSS attacks so I recommed to read about it previously if you're using it on django 5.x or previous.
\- Django admin works fine but I got an odd issue on filters. My sidebar is no longer on the right handside, it now displays on top just like my laptop is rendering smartphone-like website.

About the first thing, I just needed to refactor some methods on my models to render html properly, not a big deal actually. "format_html" and "mark_safe" are now different and it will need to get the base html with placeholders on the first argument and then a list of arguments to place on the placeholders (obviously!).

Does anyone know how to put the sidebar back again on the right side :) ?
I'm unable to find any info on that topic.

/r/django
https://redd.it/1pgm1hu
I built a Terminal-based GPS with Turn-by-Turn Navigation (using Textual + Rich).

What My Project Does

TermGPS is a terminal-based navigation application (TUI) that provides live turn-by-turn directions. It uses the `Rich` and `Textual` libraries to render a radar-style map, visual signal meters, and a "Co-Pilot" panel that detects your speed (`km/h`) and provides live commentary. It pulls routing data from the OSRM API and supports live GPS tracking (Native CoreLocation on macOS, IP-Geolocation fallback on Linux/Windows)

Target Audience

This is primarily a toy/hobby project for terminal enthusiasts, "ricers" (r/unixporn fans), and developers who want to stay inside their CLI. It is **not** meant for critical real-world navigation (e.g., flying a plane or medical transport) due to current API limitations, but it works great for general city navigation or just looking cool on your second monitor.

Comparison

Unlike `mapscii` (which is a telnet map viewer) or `google-maps-cli` (which often just opens a browser link), TermGPS is a fully interactive, native Python application that runs entirely in your terminal buffer. It doesn't just show a map; it calculates routes, tracks your real-time movement, and has a dedicated UI with themes (Matrix, Dracula, etc.).

Repo & Source: https://github.com/Aditya-Giri-4356/termgps

(Note: Shows "AI-Assisted" in the repo because I pair-programmed this with an AI agent to test TUI rendering limits).

/r/Python
https://redd.it/1pgx1v7
Multi-tenant with some tenants requiring their own database

I'm building a Django SaaS and need advice on implementing a hybrid multi-tenancy architecture while keeping hosting costs low on AWS/GCP/Azure managed services (like RDS/Cloud SQL and Fargate/Cloud Run).

My Goal:

1. Standard Tenants (90%): Use a Shared PostgreSQL Database with Separate Schemas per Tenant (e.g., using django-tenants) to keep costs low.
2. High-Tier Tenants (10%): Require full Database Isolation (Dedicated Database Instance) due to strict compliance needs.

The Key Challenge: How do I best structure the Django application and DevOps pipeline to manage this mix?

The Two Potential Solutions I'm considering are:

A) Single Shared App: Use a custom Django Database Router to route requests to either the shared database (for schema switching) or the dedicated database instance.
B) Dual Deployment: Deploy a separate, dedicated application stack (App Server + DB) for the high-tier customers, leaving the main codebase for the shared schema customers.

Which approach offers the best trade-off between cost savings (for the 90% of tenants) and operational complexity (for managing the whole system)?

/r/django
https://redd.it/1ph76n2
Forcing clients to use latest static assets served from S3 storage what are your strategies?

What techniques/strategies do you use to force clients to use the latest css and other changing static assets from S3 compatible storage?
I already separate assets with a development bucket and production bucket, but what is a good way to force clients to use the latest version in the production bucket instead of their cached version?

/r/django
https://redd.it/1pggodf
Django ORM + Fast API (Guidance)

I'm using FastAPI + Django ORM + Uvicorn in a client project. Everything works fine normally, but if the server is idle for 1–2 weeks, the first request after that fails with:

Interal server error , & found this in my aws log

django.db.utils.InterfaceError: connection already closed


This comes from Django when it tries to open a cursor.

My DB settings:

CONNMAXAGE = 0
CONNHEALTHCHECKS = True


It looks like the database connection goes stale during long idle time, and Django/FastAPI doesn’t recreate it properly.

What’s the correct fix for long-idle Django connections in a FastAPI + Django ORM setup?
Should I increase CONN_MAX_AGE, call close_old_connections() on each request, or change Uvicorn worker settings?

/r/django
https://redd.it/1phb920
Built a SaaS Starter Kit with FastAPI (Auth + Billing + Celery + Stripe) — Looking for feedback!

Hey everyone,

I’ve been working on a SaaS starter kit using FastAPI that bundles together all the core features most products need: authentication, billing, background jobs, clean architecture, and a production-ready stack.

I built this because every new project kept repeating the same boilerplate — so I wanted something modular that could work as a standalone microservice or be integrated directly into any FastAPI project.

GitHub repo: https://github.com/mahmoudsamy7729/fastapi-saas-starter

/r/Python
https://redd.it/1phg3x5
PyCharm 2025.3 released

https://www.jetbrains.com/pycharm/whatsnew/

PyCharm 2025.3: unified edition, remote Jupyter, uv default, new LSP tools (Ruff, Pyright, etc.), smarter data exploration, AI agents + 300+ fixes.

/r/Python
https://redd.it/1phifp4
D Does this NeurIPS 2025 paper look familiar to anyone?

This NeurIPS 2025 paper seems very much like another well-known paper but appears to be renaming everything. Some parts are down to the word matches. Just to make sure I'm not going crazy, as an experiment, I'm not going to post the original paper just to see if others make the connection:

The Indra Representation Hypothesis
https://openreview.net/forum?id=D2NR5Zq6PG

Since comments are asking for the other paper:

The Platonic Representation Hypothesis
https://arxiv.org/abs/2405.07987

/r/MachineLearning
https://redd.it/1phillh
Opinion on using pyinfra

I recently came across pyinfra and I love it so far. It is way more intuitive than ansible or any of those Cloud DevOps tools. At least for small projects it seems to be the perfect fit and even beyond it I think.

Pyinfra is already around for a while and seems to be well maintained. But I don’t think it has the attention it deserves.

Do you know it? And what is your opinion why to use it / not use it…

Here is the link to the docs: https://pyinfra.com

/r/Python
https://redd.it/1phgso7
DRF/React security

Hi folks, just reading about the current security vulnerability with server side components and React/Next. As I understand it sends a fake post request and needs to Node to handle the request?

This exploit isn't something that would effect a React/DRF setup, is it? Just want to be 100% sure!

/r/django
https://redd.it/1phg6xq
MÉTODOS HTTP: O RESTAURANTE WEB

/r/flask
https://redd.it/1phchw4