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
Where do you guys actually find Django work?

I've been working in tech for 6 years, mostly writing, but the technical side, like spinning up VMs and load testing hosting providers, benchmarking performance, that sort of thing.

I just finished a backend program and have some decent projects (e-commerce API, Telegram bot with Celery/Redis, the usual portfolio stuff). I know my way around Django/Python/Docker reasonably well at this point.

But I feel like I'm looking in the wrong places. Where do people actually find this work? Is it all networking? Discord servers? Freelance sites? Should I just be cold emailing companies?

What worked for you?

/r/django
https://redd.it/1owsf7c
Flask vs FastAPI for High CPU and High I/O Bounded Usage

Hello,


I have a scenario where I have heavy CPU load due to ML calls, etc and also I have heavy networking and I/O bound. I tried flask but it's very obvious that with lots of requests, the overhead of threads created by gunicord nonetheless the overhead of thread pool executor will add up latency to request.


FastAPI on the other hand is more complex in terms of how it handles requests as I see it I don't have much control over what happens and is difficult to debug.


I am unware of any extension to both...but my system already build using flask and I am worried that I might selected wrong framework.


Your thoughts?

/r/flask
https://redd.it/1owosst
P I visualized 8,000+ LLM papers using t-SNE — the earliest “LLM-like” one dates back to 2011

I’ve been exploring how research on large language models has evolved over time.

To do that, I collected around 8,000 papers from arXiv, Hugging Face, and OpenAlex, generated text embeddings from their abstracts, and projected them using t-SNE to visualize topic clusters and trends.

The visualization (on awesome-llm-papers.github.io/tsne.html) shows each paper as a point, with clusters emerging for instruction-tuning, retrieval-augmented generation, agents, evaluation, and other areas.

One fun detail — the earliest paper that lands near the “LLM” cluster is “Natural Language Processing (almost) From Scratch” (2011), which already experiments with multitask learning and shared representations.

I’d love feedback on what else could be visualized — maybe color by year, model type, or region of authorship?

/r/MachineLearning
https://redd.it/1owz9g5
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/1oxcssf
Best Cheap Hosting for Django/Wagtail CMS Website

Hi everyone,

I’m planning to launch a simple educational website for students in Bangladesh using Django + Wagtail. The site will mainly contain text content and explainer images, so I’m looking for very affordable hosting options that support Django deployments.

I’ve checked PythonAnywhere, Railway, and Render. I also found Contabo VPS, which is extremely cheap, but I’m unsure about their reliability.

Has anyone used Contabo for Django projects? Are they stable in terms of uptime and performance? And are there any other budget-friendly hosting providers you’d recommend?

Thanks in advance for your suggestions!

/r/django
https://redd.it/1owzx8y
Pydantic and the path to enlightenment

TLDR: Until recently, I did not know about pydantic. I started using it - it is great. Just dropping this here in case anyone else benefits :)

I maintain a Python program called *Spectre*, a program for recording signals from supported software-defined radios. Users create configs describing what data to record, and the program uses those configs to do so. This wasn't simple off the bat - we wanted a solution with...

Parameter safety (Individual parameters in the config have to make sense. For example, `X` must always be a non-negative integer, or \`Y\` must be one of some defined options).
Relationship safety (Arbitrary relationships between parameters must hold. For example, X must be divisible by some other parameter, Y).
Flexibility (The system supports different radios with varying hardware constraints. How do we provide developers the means to impose arbitrary constraints in the configs under the same framework?).
Uniformity (Ideally, we'd have a uniform API for users to create any config, and for developers to template them).
Explicit (It should be clear where the configurable parameters are used within the program).
Shared parameters, different defaults (Different radios share configurable parameters, but require different defaults. If I've got ten different configs, I don't want to maintain ten

/r/Python
https://redd.it/1ox9cct
Django e-commerce: Polymorphism vs Multi-Table Inheritance vs Composition for product types - what’s best?

I’m building a Django e-commerce platform with a large taxonomy (many product types) and type-specific fields/properties (e.g., different models for product A, product B, product C, etc.).

I also need to be able to search across all products.

/r/django
https://redd.it/1oxk6s5
The great leap forward: Python 2.7 -> 3.12, Django 1.11 -> 5.2

I would like to thank everyone who gave great advice on doing this upgrade. In the event, it took me about seven hours, with no recourse to AI coding required. The Python 3 version hasn't been pushed into production yet, but I'd estimate it's probably 90% of the way there.

I decided to go for the big push, and I think that worked out. I did take the advice to not go all the way to 3.14. Once I am convinced everything is fully operational, I'll go to 3.13, but I'll hold off on 3.14 for a bit more package support.

Switching package management to \`uv\` helped, as did the small-but-surprisingly-good test suite.

In rough order, the main problems I encountered were:

* bytes and strings. Literals themselves were OK (the code was already all unicode\_literals), but things like hash functions that take bytes were a bit tedious.
* Django API changes. I have to say, love Django to death, but the project's tendency to make "this looks better" breaking changes is not my favorite part of it.
* Django bugs. Well, bug: the \`atomic\` decorator can swallow exceptions. I spent some time tracking down a bytes/string issue because the exception was just \`bad thing happened\`

/r/Python
https://redd.it/1oxhjj7
Kroma: a powerful and simple module for terminal output in Python

*Looking for some feedback on Kroma, my new Python module! Kroma (based on the word "chroma" meaning color) is a modern alternative to libraries like `colorama` and `rich`.*


# What My Project Does

Kroma is a lightweight and powerful library for terminal output in Python. It allows you to set colors, text formatting, and more with ease!

# Target Audience

- Developers wanting to add color to their Python projects' terminal output

# Links

PyPI: https://pypi.org/project/kroma/
Docs: https://www.powerpcfan.xyz/docs/kroma/v2/
GitHub: https://github.com/PowerPCFan/kroma

# Comparison

***"So, why should I give Kroma a try?"***

Kroma has significant advantages over libraries like `colorama`, and Kroma even has features that the very popular and powerful module `rich` lacks, such as:

- Dynamic color manipulation
- Powerful gradient generation
- Built-in color palettes
- Global terminal color scheme management (via palettes)
- Simple, intuitive, lightweight, and focused API

...and more!


# Kroma Showcase

Here are some code snippets showcasing Kroma's features (these snippets—and more—can be found on the docs):

## Complex Multi-Stop Gradients:

You can use Kroma to create complex gradients with multiple color stops.

```python
import kroma

print(kroma.gradient(
"This is a rainbow gradient across the text!",
stops=(
kroma.HTMLColors.RED,
kroma.HTMLColors.ORANGE,


/r/Python
https://redd.it/1oxeb6l
TS/Go --> Python

So I have been familiar with Go & Typescript, Now the thing is in my new job I have to use python and am not profecient in it. It's not like I can't go general programming in python but rather the complete environment for developing robust applications. Any good resource, content creators to check out for understanding the environment?

/r/Python
https://redd.it/1oxnmeq
Oxidized Python/Django packages?

Hey, I’m building own project using Django and many packages use Rust under the hood.

Interesting what people use.

My list of all I’ve used so far:

Django:
- django-minify-html

Logging:
- logly

Web:
- robyn

Database:
- psqlpy

Date time:
- whenever

JSON:
- orjson

Audio:
- sphn

Files:
- opendal

Web server:
- granian
- ferron

Templates:
- minijinja

Code checking:
- ruff

Venv:
- uv

#python #rust

/r/django
https://redd.it/1oxqwd3
UI/UX or Full Stack Web Development ?

What should I learn for a great and secure career?

/r/django
https://redd.it/1oxk6jp
Looking for architecture feedback on a Django multi-vendor marketplace (Stripe Connect, i18n)

Hi folks,

I’m working on a Django-based multi-vendor marketplace platform (vendors, Stripe Connect payouts, i18n, dark Bootstrap UI).

Before I continue adding features, I want to validate the overall *architecture* and make sure I’m not making any big mistakes.

Could someone more experienced with Django architecture share thoughts on:

- project/app structure
- separating vendor logic vs store logic
- the right way to organize Stripe Connect flows
- how to properly structure templates for multi-vendor dashboards
- what would you change before using such a project in production?

If it’s allowed, I can drop the link to the demo / repo in the comments.

Thanks a lot!

/r/django
https://redd.it/1oy25x9
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 script 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/1oy6wuf
Google Drive webhooks only send the initial sync, never update… am I missing something obvious?

I’m trying to use Google Drive push notifications with Django and I can successfully create the watch channel I get the initial sync notification but I never receive update notifications for file changes. No errors anywhere, and polling works perfectly. It used to work perfectly, and then suddenly I stopped receiving notifications of changes to my webhook.

Stack: Django 5 + Uvicorn, Drive API v3, OAuth (refresh tokens), webhook via ngrok, DB stores channel info.

What works:

Webhook is reachable (405 GET, 200 POST)
Manual POST to webhook works
changes().watch() returns valid channel\_id + resource\_id
Initial sync arrives instantly
changes().list() detects real changes (page token moves)

What doesn’t:

No update webhook calls for create/edit/delete/move/rename
ngrok shows zero requests except the first sync
No logs or errors anywhere

Questions:

Can Google silently drop subscriptions? Any way to check status?
Does using ngrok free tier break push notifications?
Missing params like supportsAllDrives=true? Wrong token source?
Any way to see delivery logs?

Anyone here actually got Drive push notifications working recently?

/r/django
https://redd.it/1oy6b38
I made a CLI tool that deletes half your files

GitHub link: https://github.com/soldatov-ss/thanos


So I built a little Python CLI tool called "thanos-cli".
It does exactly what you think it does: it deletes half of the files in any directory you point it at.



/r/Python
https://redd.it/1oxypjo
I divided up models.py into different files in flask and I getting circular import errors. Does anyone have any suggestions?

I used chatgpt to create a flask file tree with blueprints.

My code was very similar to this and it was working except the templates are there own folder not nested within the other folders like auth













myapp/



├── app.py

├── config.py

├── extensions.py



├── blueprints/

│ ├── __init__.py

│ ├── main/

│ │ ├── __init__.py

│ │ ├── routes.py

│ │ ├── models.py

│ │ └── templates/

│ │ └── main/

│ │ └── index.html

│ │

│ └── auth/

│ ├── __init__.py

│ ├── routes.py

│ ├── models.py

│ └── templates/

│ └── auth/

│ └── login.html



└── templates/

└── base.html





The problem is I changed the blueprints

/r/flask
https://redd.it/1oydkld
How to get Feedback for a Project?


I am a full-time engineer and in my spare time or as a hobby I like to program. Now I have released a beta version of a website I made with Django to get some feedback from experts but it’s hard to find someone to get useful Feedback.

Do you have experience how to reach people to get feedback without looking like an ad or self promotion? Or is this subreddit already a good place to ask for Feedback?

I’d really appreciate feedback on:
- What works well?
- What’s confusing?
- What’s missing?
- How do design, navigation, and content feel for the user?


/r/djangolearning
https://redd.it/1oyr5p8