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
Implemented 17 Agentic Architectures in a Simpler way

# What My Project Does

I built a hands-on learning project in a **Jupyter Notebook** that implements **multiple agentic architectures** for LLM-based systems.

# Target audience

This project is designed for students and researchers who want to gain a clear understanding of Agent patterns or techniques in a simplified manner.

# Comparison

Unlike high-level demos, this repository focuses on:

* Clear separation of reasoning, tools, and control flow
* Real-world frameworks like **LangChain, LangGraph, and LangSmith**
* Minimal abstraction where possible to keep learning easy

# GitHub

Code, documentation, and example can all be found on GitHub:

[https://github.com/FareedKhan-dev/all-agentic-architectures](https://github.com/FareedKhan-dev/all-agentic-architectures)

/r/Python
https://redd.it/1pm4qsu
Career Question

I have worked as a backend developer for 1 year and used primarily django. For the 6 months I have been working in IT, but I would like to go back to being a software developer again eventually. Im wondering how the job market is looking for you guys, has your django experience helped you land any software jobs?

/r/django
https://redd.it/1pm8eey
The Geminids Meteors & The active Asteroids Phaethon - space science coding

Hey everyone,


have you seen the Geminids last night? Well, in fact they are still there, but the peak was at around 9 am European Time.


Because I just "rejoined" the academic workforce after working in industry for 6 years, I was thinking it is a good time to post something I am currently working on: a space mission instrument that will go to the active asteroid (3200) Phaethon! Ok, I am not posting (for now) my actual work, but I wanted to share with you the astro-dynamical ideas that are behind the scientific conclusion that the Geminids are related to this asteroid.


The parameter that allows us to compute dynamical relation is the so called "D_SH" parameter from 1963! And in a short tutorial I explain this parameter and its usage in a Python noscript. Maybe someone of you wants to learn something about our cosmic vicinity using Python :)?


https://youtu.be/txjo\_bNAOrc?si=HLeZ3c3D2-QI7ESf


And the correspoding code: https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/CompressedCosmos/CompressedCosmos\_Geminids\_and\_Phaethon.ipynb


Cheers,

Thomas

/r/Python
https://redd.it/1pmdshy
How to make flask into an API

I wanna use a frontend framework how do people do this tell me smart people of flask

/r/flask
https://redd.it/1pmfwrb
Scalability - Django Posgres SaaS app

Hello all, we have a saas application that we built on a single database + api + frontend (web and mobile)

as my users grow i will be needing to collect the gps and communicate with them constantly during the day - think of it as thumbtack/service channel tasks etc

in your opinion if i need to sell this to multiple customer and each customer has 100 service reps using this, do you think django and single database with multiple polling would handle 20k concurrent users? whats the impact on the users using web app at the same time etc? database locks? performance issues?

thank you in advance!

/r/django
https://redd.it/1pmjbqi
Maintaining a separate async API

I recently published a Python package that provides its functionality through both a sync and an async API. Other than the sync/async difference, the two APIs are completely identical. Due to this, there was a lot of copying and pasting around. There was tons of duplicated code, with very few minor, mostly syntactic, differences, for example:

1. Using async and await keywords.
2. Using asyncio.Queue instead of queue.Queue.
3. Using tasks instead of threads.

So when there was a change in the API's core logic, the exact same change had to be transferred and applied to the async API.

This was getting a bit tedious, so I decided to write a Python noscript that could completely generate the async API from the core sync API by using certain markers in the form of Python comments. I briefly explain how it works here.

What do you think of this approach? I personally found it extremely helpful, but I haven't really seen it be done before so I'd like to hear your thoughts. Do you know any other projects that do something similar?

EDIT: By using the term "API" I'm simply referring to the public interface of my package, not a typical HTTP API.

/r/Python
https://redd.it/1pme2nx
Ilya Sutskever is puzzled by the gap between AI benchmarks and the economic impact D

In a recent interview, Ilya Sutskever said:

> This is one of the very confusing things about the models right now. How to reconcile the fact that they are doing so well on evals... And you look at the evals and you go "Those are pretty hard evals"... They are doing so well! But the economic impact seems to be dramatically behind.

I'm sure Ilya is familiar with the idea of "leakage", and he's still puzzled. So how do you explain it?

Edit: GPT-5.2 Thinking scored 70% on GDPval, meaning it outperformed industry professionals on economically valuable, well-specified knowledge work spanning 44 occupations.

/r/MachineLearning
https://redd.it/1pm2zsb
How do I add an extra plugin to flask-ckeditor?


I found the link https://github.com/helloflask/flask-ckeditor/issues/11 on how to set up mathjax/extra plugin in flask-ckeditor.

I managed to add the mathjax button but the problem is the button isn’t working.

Here is the button but when I click okay https://imgur.com/a/p6BERkd I get 0 output and when I try something like ​```$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $``` and click submit I get the output of the query from the Posts table and content column in other_page.html ```is <p>$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $</p> ```





Here is the code.
https://pastebin.com/7D4NXEtH


Here is the link of the instructions on how to add an extra button/plugin.
https://github.com/helloflask/flask-ckeditor/issues/11


Here is an image of my route
https://imgur.com/a/UmLnQpS

Here is some of the plugins notice mathjax
https://imgur.com/a/WuivWet


Here are parts of the error in the browser
https://pastebin.com/YwW47SeA


Also in the ide I get the output errors below
https://pastebin.com/4uQFiQVU


I found this error https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#mathjax-no-config .
The problem is the error above I assume. I click on the first link and get to https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-mathJaxLib
and I see this code ```config.mathJaxLib = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML';```.


I am trying to add ``` <noscript> config.mathJaxLib = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML'; </noscript> ``` to the head or body tag and

/r/flask
https://redd.it/1pmlav2
Introducing dj-cache-panel, a universal cache inspector for Django.

Hey everyone, I just released **dj-cache-panel**, a lightweight Django admin extension that lets you query and perform actions on your django cache instances.

Django ships with great caching primitives, but debugging cache issues is still basically guesswork. This project gives you a clean admin UI to browse, inspect, and delete keys across different backend types:

* Works with redis, memcached, local memory, database cache backend
* Search keys (prefix, wildcard, exact match) on backends that support it
* Delete keys in one click
* Zero models, zero migrations
* Works completely using your already defined CACHES setting

Repo: [https://github.com/yassi/dj-cache-panel](https://github.com/yassi/dj-cache-panel)

Docs: [https://yassi.github.io/dj-cache-panel/]()

pypi: [https://pypi.org/project/dj-cache-panel/](https://pypi.org/project/dj-cache-panel/)


This work is a natural extension to my previous work dj-redis-panel, so go ahead and check that out as well.



/r/django
https://redd.it/1pmnkrx
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/1pmt0u0
Django Roadmap at roadmap.sh

Hi there! My name is Javier Canales, and I work as a content editor at roadmap.sh. For those who don't know, roadmap.sh is a community-driven website offering visual roadmaps, study plans, and guides to help developers navigate their career paths in technology.

We're planning to launch a brand new Django Roadmap. It aims to be comprehensive, targeting Django newbies and mature developers who may want a Django refresh or to improve their fluency. Our primary source is the Django Documentation. However, we're not covering all the topics out there, as we don't want to overwhelm users with an extremely large roadmap.

Before launching the roadmap, we would like to ask the community for some help. Here's the link to the draft roadmap. We welcome your feedback, suggestions, and constructive input. If you have any suggestions for items to include or remove from the roadmap, please let me know.

Once we launch the official roadmap, we will start populating it with content and resources. Contributions will also be welcome on that side via GitHub :)

Hope this incoming roadmap will also be useful for you. Thanks very much in advance.

https://preview.redd.it/3afo8tdlnr6g1.png?width=734&format=png&auto=webp&s=503dc4221f87a42280f6256a13fa787836b69dba



/r/djangolearning
https://redd.it/1pkrfn5
Released dataclass-wizard 0.36.0: v1 dumpers, new DataclassWizard class, and performance cleanup

I just released dataclass-wizard 0.36.0 after a bit of a gap (got busy with grad school) and wanted to share a few highlights.

dataclass-wizard is a small library for loading/dumping dataclasses from JSON with flexible key casing and type coercion.


What’s new in 0.36.0:

• New DataclassWizard base class (auto-applies @dataclass) — this will be the default direction for v1

• Proper v1 dumpers module (finally 😅) — much cleaner separation and better dump performance

• Cleaner v1 config API (v1_case instead of v1_key_case)

• Internal refactors to make the v1 load/dump pipeline more maintainable going forward

One thing I’m particularly happy about in this release is finally splitting out v1 dump logic into its own module instead of having it tangled with legacy paths — it simplified the code a lot and made performance tuning easier.

Docs: https://dataclass-wizard.ritviknag.com/

GitHub: https://github.com/rnag/dataclass-wizard

Would love feedback from folks who’ve built serialization layers or dealt with dataclass/typing edge cases.

/r/Python
https://redd.it/1pmsj0n
Django blog with multiple images per post

I have built a basic blog with a single Post model. and it is limited to one image per post, which serves as the cover image.

I was able to handle the part with uploading multiple images, I need the ability to insert these images anywhere within the article body, rather than just looping through an array of images and displaying them in one place.


P.S I don't wan't to build every page manually.

/r/django
https://redd.it/1pmpkjk
Kreuzberg v4.0.0-rc.8 is available

Hi Peeps,

I'm excited to announce that Kreuzberg v4.0.0 is coming very soon. We will release v4.0.0 at the beginning of next year - in just a couple of weeks time. For now, v4.0.0-rc.8 has been released to all channels.

## What is Kreuzberg?

Kreuzberg is a document intelligence toolkit for extracting text, metadata, tables, images, and structured data from 56+ file formats. It was originally written in Python (v1-v3), where it demonstrated strong performance characteristics compared to alternatives in the ecosystem.

## What's new in V4?

### A Complete Rust Rewrite with Polyglot Bindings

The new version of Kreuzberg represents a massive architectural evolution. Kreuzberg has been completely rewritten in Rust - leveraging Rust's memory safety, zero-cost abstractions, and native performance. The new architecture consists of a high-performance Rust core with native bindings to multiple languages. That's right - it's no longer just a Python library.

Kreuzberg v4 is now available for 7 languages across 8 runtime bindings:

- Rust (native library)
- Python (PyO3 native bindings)
- TypeScript - Node.js (NAPI-RS native bindings) + Deno/Browser/Edge (WASM)
- Ruby (Magnus FFI)
- Java 25+ (Panama Foreign Function & Memory API)
- C# (P/Invoke)
- Go (cgo bindings)

Post v4.0.0 roadmap includes:

- PHP
- Elixir (via Rustler - with Erlang and Gleam interop)

Additionally, it's available as

/r/Python
https://redd.it/1pn2a3t
Choosing Django model translation libraries in 2025

I’m looking for advice on choosing a model translation library for a Django + DRF application in 2025. We’re using PostgreSQL.

The use case is fairly typical:

Clients can add multiple translations for certain model fields (e.g. `name`, `denoscription` on an `Item` model)
When fetching data via the API, we return the correct translation dynamically based on a parameter (e.g. request header)

I’ve looked into the existing options, and it seems like there are three main contenders. I’d love to hear what others are using in production today, and what would you recommend.

Below is short summary of translation libraries i found and my thoughts on them, I'm not very familiar with Django ecosystem so any insights are appreciated

**Modeltranslation**

Utilizes one column per language per translatable field, no separate table, no joins, no jsonb stored, if you have 5 languages for model with 3 translatable fields you end up with extra 15 columns.

This one seems to have some activity, with fixes getting added to main recently and releases happening regularly. Seems like only non abandoned pick even though I'm not stoked about bloating tables with translations.

**Django-Parler**

Utilizes translation table

What worries me here is that it had last commit on `main` branch on Sep 3, 2022,

/r/django
https://redd.it/1pn4kio
Built a Japanese learning game using Django & Vanilla JS. Focus on "Zen" aesthetics.

/r/django
https://redd.it/1pn4g2r
Strategies for removing django-polymorphic from codebase

As per the noscript... The codebase grew with polymorphic in place, but it is causing more headaches and testing nightmares than the little abstraction help it provides. Going about removing it from some rather central models, while keeping all data and transferring to inheriting from abstract base classes instead, has been veeeery painful to say the least.

Anybody done the move and have some pointers?

/r/django
https://redd.it/1pmow0e
How to implement phone number + OTP login with django-allauth?

I’m currently working on a Django project and I have a requirement to allow users to log in using their Phone Number and an OTP (One-Time Password) via SMS, beside the standard Email/Username + Password combo.

I'd really like to use django-allauth for auth features.

I know that recent versions of django-allauth added ACCOUNT_PHONE_VERIFICATION_ENABLED and support for phone numbers as a primary identifier, but I don't know how to implement phone number + OTP login.

If anyone has implemented a Phone+OTP flow specifically with django-allauth recently, I’d love to hear how you approached.

Thanks in advance!

/r/django
https://redd.it/1pluo6i
Miguel's Flask Course

Hi all,

I'm currently learning Flask and after some due diligence I dove into Miguel's course. I felt good for the first few chapters and was grasping concepts pretty well then things started to get more complicated, I think more so the things that were introduced outside of the scope of Flask (third party libraries that are used) and it just completely knocked me off my horse. I feel like I'm just watching the videos now. I've made it to pretty much the end of the course but I don't feel like I've learnt as much as I should or could've. I'm not sure whether I'm too dumb or what's limiting me. Is it normal to find this course hard? Everyone says it's the go to for Flask and that's incredible, but I've honestly struggled immensley with it.

I moved to flask after I learnt JS and React, built some of my own little projects and felt comfortable enough to move on. I didn't really experience roadblocks like this with JS and React. But Flask, although the simple routes and whatnot are easy, it's beyond that when I feel stuck. I'm not sure what to do now, I've been learning

/r/flask
https://redd.it/1pnblkp
Building the Fastest Python CI

Hey all, there is a frustrating lack of resources and tooling for building Python CIs in a monorepo setting so I wrote up how we do it at $job.

# What my project does

We use uv as a package manager and pex to bundle our Python code and dependencies into executables. Pex recently added a feature that allows it to consume its dependencies from uv which drastically speeds up builds. This trick is included in the guide. Additionally, to keep our builds fast and vertically scalable we use a light-weight build system called Grog that allows us to cache and skip builds aswell as run them in parallel.

# Target Audience

Anyone building Python CI pipelines at small to medium scale.

# Comparison

The closest comparison to this would be Pants which comes with a massive complexity tasks and does not play well with existing dev tooling (more about this in the post). This approach on the other hand builds on top of uv and thus keeps the setup pretty lean while still delivering great performance.


Let me know what you think 🙏


Guide: https://chrismati.cz/posts/building-the-fastest-python-ci/

Demo repository: https://github.com/chrismatix/uv-pex-monorepo

/r/Python
https://redd.it/1pnbze0
Tuesday Daily Thread: Advanced questions

# Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

## How it Works:

1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.

## Guidelines:

* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.

## Recommended Resources:

* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.

## Example Questions:

1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the

/r/Python
https://redd.it/1pnn7xm