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
We open-sourced kubesdk - a fully typed, async-first Python client for Kubernetes.

Hey everyone,

[Puzl Cloud](https://puzl.cloud/) team here. Over the last months we’ve been packing our internal Python utils for Kubernetes into kubesdk, a modern k8s client and model generator. We open-sourced it a few days ago, and we’d love feedback from the community.

We needed something ergonomic for day-to-day production Kubernetes automation and multi-cluster workflows, so we built an SDK that provides:

* Async-first client with minimal external dependencies
* Fully typed client methods and models for all built-in Kubernetes resources
* Model generator (provide your k8s API - get Python dataclasses instantly)
* Unified client surface for core resources and custom resources
* High throughput for large-scale workloads with multi-cluster support built into the client

**Repo link:**

[https://github.com/puzl-cloud/kubesdk](https://github.com/puzl-cloud/kubesdk)



/r/Python
https://redd.it/1pet9mi
Feedback on Django based task manager tool with very slow database handling

This is my first post in the Django subreddit, so please bear with me, if it's out of scope or not fulfilling enough.

Over the past years, I have been working on and off on my first Django based project, which is a task manager web-platform being customized to my personal needs. The code is developed based on various tutorials and with help from vibe coding.

I have spent quite some effort to make the web-platform faster, but it still performs relatively slow even for a small database (server response time of 4-6 seconds for less than 500 database entries). I have tried to optimize the code by doing the following:

* Reducing query calls by profiling with queryhnter
* Use select\_related() and prefetch\_related()
* Use Q objects for complex queries
* Detect n+1 queries and solve them

Further I have tried to pin down the reason for the slow performance and have concluded the following:

* Performance issues not related to:
* Html template, as the response is the same with the template out-commented
* SQL query request, as this is insignificant
* Problem (could be) related to:
* View class: Processing of the DB objects (after queries)

None of the above efforts

/r/django
https://redd.it/1pdwth8
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/1pfau1c
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