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
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