Python Daily – Telegram
Python Daily
2.57K 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 Love Django

Now that I've been coding for quite a bit I've fallen rather in love with Django's simplicity and how segmented purposes are between templates.html v.s. urls.py v.s. views.py v.s. forms.py v.s. models.py ||| I really like how segregated the logic is, for other frameworks I imagine this is less so the case?

/r/django
https://redd.it/1pfdpun
How many people are building graphQL API using Django?

How many people are building graphQL API using Django?

/r/django
https://redd.it/1pfddsq
Built an open-source mock payment gateway in Python (no more Stripe test limits)

What My Project Does

AcquireMock is a self-hosted payment processor for testing and development. It simulates a real payment gateway with:

Payment page generation with card forms (accepts test card 4444 4444 4444 4444)
OTP email verification flow
Webhook delivery with HMAC signatures and retry logic
Saved payment methods for returning customers
Production-ready features: CSRF protection, rate limiting, request validation

Tech stack: FastAPI + PostgreSQL + SQLAlchemy + Pydantic. Frontend is vanilla JS to keep it lightweight.

Target Audience

This is meant for:

Developers building payment integrations who hit Stripe test mode limits
Teaching/learning how payment flows work (OTP, webhooks, 3DS simulation)
Offline development environments where external APIs aren't accessible
Projects that need a mock payment system without external dependencies

Not intended for production use - it's a testing/development tool.

Comparison

Unlike Stripe's official test mode:

Runs completely offline (no API keys, no internet required)
No rate limits or request caps
Full control over webhook timing and retry logic
Can be customized for specific testing scenarios
Works without any external service configuration

Compared to other mock payment tools, this one includes a full UI (not just API endpoints), supports multi-language, has email OTP flow, and comes with Docker Compose for instant setup.

GitHub: https://github.com/illusiOxd/acquiremock

Open to feedback, especially on the

/r/Python
https://redd.it/1pfl8ln
Does having a back in an engineering degree really cause problems for my future career?

Hey everyone,
Current engineering student here, looking for some real-world perspective.
How much does having a "back" (a failed subject needing a re-take) truly impact job prospects or grad school admissions? I'm hearing mixed messages that it's a huge red flag.
Seeking insight:
-For first jobs: Does a back matter less than the final CGPA/GPA?
-Offsetting: What's the best way to compensate (internships, projects, etc.)?
-Your experience: Did you have a back and still land a great job?
Any honest advice is welcome. Thanks!

/r/django
https://redd.it/1pfgo7f
Seeker

Guys, I will need to create a search engine for an application at my work.
Does anyone know if Django has a lib that would make this easier?
This search engine is used to search for information registered and not registered in my database.
Similar to the Google search engine.

/r/django
https://redd.it/1pfogir
Working with username with custom user model

I have come to know that it is advisable to create my own custom user model instead of using the default provided by django, most of the tutorials i have watched don't seem to add a username field and instead strip the username from the email, when i did add the field username i was no longer able to create a superuser without the error "django.core.exceptions.FieldDoesNotExist: User has no field named 'accounts.User.username' ". where should i go from here

my custom user manager

my custom user model



/r/djangolearning
https://redd.it/1pecctq
qCrawl — an async high-performance crawler framework

Site: https://github.com/crawlcore/qcrawl

What My Project Does

qCrawl is an async web crawler framework based on asyncio.

Key features

Async architecture - High-performance concurrent crawling based on asyncio
Performance optimized - Queue backend on Redis with direct delivery, messagepack serialization, connection pooling, DNS caching
Powerful parsing - CSS/XPath selectors with lxml
Middleware system - Customizable request/response processing
Flexible export - Multiple output formats including JSON, CSV, XML
Flexible queue backends - Memory or Redis-based (+disk) schedulers for different scale requirements
Item pipelines - Data transformation, validation, and processing pipeline
Pluggable downloaders - HTTP (aiohttp), Camoufox (stealth browser) for JavaScript rendering and anti-bot evasion

Target Audience

1. Developers building large-scale web crawlers or scrapers
2. Data engineers and data scientists need automated data extraction
3. Companies and researchers performing continuous or scheduled crawling

Comparison

1. it can be compared to scrapy - it is scrapy if it were built on asyncio instead of twisted, with queue backends Memory/Redis with direct delivery and messagepack serialization, and pluggable downloaders - HTTP (aiohttp), Camoufox (stealth browser) for JavaScript rendering and anti-bot evasion
2. it can be compared to playwright/camoufox - you can use them directly, but using qCraw, you can in one spider, distribute requests between aiohttp for max performance and camoufox if JS rendering

/r/Python
https://redd.it/1pfofmq
Looking for EU based alternative to Amazon SES

Hi, want to implement email in Django that work in a similar way to Amazon SES, any advices?

/r/django
https://redd.it/1pfxcwz
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 noscript 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/1pg3xoh
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