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
Vision Agents 0.1

First steps here, we've just released 0.1 of Vision Agents. https://github.com/GetStream/Vision-Agents

What My Project Does

The idea is that it makes it super simple to build vision agents, combining fast models like Yolo with Gemini/Openai realtime. We're going for low latency & a completely open sdk. So you can use any vision model or video edge network.

Here's an example of running live video through Yolo and then passing it to Gemini

agent = Agent(
edge=getstream.Edge(),
agentuser=agentuser,
instructions="Read @golfcoach.md",
llm=openai.Realtime(fps=10),
#llm=gemini.Realtime(fps=1), # Careful with FPS can get expensive
processors=[ultralytics.YOLOPoseProcessor(model
path="yolo11n-pose.pt")],
)

Target Audience 

Vision AI is like chatgpt in 2022. It's really fun to see how it works and what's possible. Anything from live coaching, to sports, to physical therapy, robotics, drones etc. But it's not production quality yet. Gemini and OpenAI both hallucinate a ton for vision AI. It seems close to being viable though, especially fun to have it describe your surroundings etc.

Comparison

Similar to Livekit

/r/Python
https://redd.it/1o2yh3k
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/1o3h3uy
Looking for an easy and free way to deploy a small Flask + SQLAlchemy app (SQLite DB) for students

Hey everyone! πŸ‘‹

I’m a Python tutor currently teaching Flask to my students. As part of our lessons, we built a small web app using Flask + SQLAlchemy with an internal SQLite database. You can check the project here:
πŸ‘‰ https://github.com/Chinyiskan/Flask-Diary

In the course, they recommend PythonAnywhere, but honestly, it feels a bit too complex for my students to set up β€” especially for beginners.

I’m looking for a free and modern platform (something like Vercel for Node.js projects) that would allow an easy and straightforward deployment of this kind of small Flask app.

Do you have any suggestions or workflows that you’ve found simple for students to use and understand?
Thanks in advance for any ideas or recommendations πŸ™

/r/flask
https://redd.it/1o3cu0j
SPDL - Scalable and Performant Data Loading

Hi Python community,

Inspired by recent showcases on pipeline libraries ([Pipevine](https://www.reddit.com/r/Python/comments/1o2n119/ergonomic_concurrency/), [pipefunc](https://www.reddit.com/r/Python/comments/1o3323m/pipefunc_build_lightningfast_pipelines_with/)), I’d like to share my project: **SPDL (Scalable and Performant Data Loading)**.

# What My Project Does

SPDL is designed to address the data loading bottleneck in machine learning (ML) and AI training pipelines. You break down data loading into discrete tasks with different constraints (network, CPU, GPU transfer etc) and construct a pipeline, and SPDL executes them efficiently. It features a task execution engine (pipeline abstraction) built on asyncio, alongside an independent I/O module for media processing.

# Resources:

* **Repo:** [https://github.com/facebookresearch/spdl](https://github.com/facebookresearch/spdl)
* **Documentation:** [SPDL Docs](https://facebookresearch.github.io/spdl/main/)
* **PyPI:**
* Install with `pip install spdl`
* [spdl-core](https://pypi.org/project/spdl-core/) (no dependency)
* [spdl-io](https://pypi.org/project/spdl-io/) (requires NumPy, and optionally PyTorch / Numba / Jax)
* **arXiv:** [2504.20067](https://arxiv.org/abs/2504.20067)

# Target Audience

ML practitioners whose focus is model training rather than software engineering. It is production-ready.

# Core Principles

* **High Throughput & Efficiency:** SPDL maximizes data loading speed and minimizes CPU/memory overhead to keep GPUs busy.
* **Flexibility:** The pipeline abstraction is highly customizable, allowing users to tailor the structure to their environment, data, and requirements.
* **Observability:** SPDL provides runtime statistics for each pipeline component, helping users identify bottlenecks and optimize performance.
* **Intuitive Construction:** Pipelines are easy to

/r/Python
https://redd.it/1o396tf
Having issues connecting to a Flask API in server

So, I have a web app deployed on Render, with a backend Flask API in the same server, which uses a Postgresql located in Supabase.

In local everything works fine, the front connects fine with the back, waiting for a response. But on Render, when the front calls a GET endpoint from the back, instantly receives a 200 response (or 304 if it's not the first time that same call is made), and then the back processes the call, and I know that because I see the database gets updated with that data. From the browser I can also see that right before getting the 200 or the 304, I get a net::ERR_CONNECTION_REFUSED response.

Been checking what it could be, and saw it could be CORS, which I think it's configured fine, or that I had to specify the host of the API when running it, by setting it to 0.0.0.0.

But still, nothing works...

Thanks in advance!

/r/flask
https://redd.it/1o1ph7m
πŸš€ saasboiler.io (Django and NextJS SaaS Boilerplate) is LIVE!!

# πŸš€ saasboiler.io IS LIVE!!!

Tech Stack & Features:

– Frontend: Next.js

– Backend: Django

– Frontend Hosting: Vercel

– Backend Hosting: Render

– Database: PostgreSQL

– Auth: Google Auth

– Payments: Stripe

– Styling: ShadCN + Tailwind CSS

– AI-generated marketing content (OpenAI)

– Social media posting to Reddit & X from dashboard

– Emails via Resend

– Simple custom analytics for landing page metrics

🎁 DM or reply for free access to the repo!

πŸ“Ί More tutorials & setup videos coming soon!

/r/django
https://redd.it/1o32o5i
Best practices for using Python & uv inside Docker

Getting uv right inside Docker is a bit tricky and even their official recommendations are not optimal.

It is better to use a two-step build process to eliminate uv from the final image size.

A two-step build process not only saves disk space but also reduces attack surface against security vulerabilities

/r/Python
https://redd.it/1o3p4bf
I made a game that is teaching you Python! :) After more than three years, I finally released it!

It's called The Farmer Was Replaced

Program and optimize a drone to automate a farm and watch it do the work for you. Collect resources to unlock better technology and become the most efficient farmer in the world. Improve your problem solving and coding skills.

Unlike most programming games the game isn't divided into distinct levels that you have to complete but features a continuous progression.

Farming earns you resources which can be spent to unlock new technology.

Programming is done in a simple language similar to Python. The beginning of the game is designed to teach you all the basic programming concepts you will need by introducing them one at a time.

While it introduces everything that is relevant, it won't hold your hand when it comes to solving the various tasks in the game. You will have to figure those out for yourself, and that can be very challenging if you have never programmed before.

If you are an experienced programmer, you should be able to get through the early game very quickly and move on to the more complex tasks of the later game, which should still provide interesting challenges.

Although the programming language isn't exactly Python, it's similar enough that Python IntelliSense works

/r/Python
https://redd.it/1o3voso
Announcing html-to-markdown v2: Rust rewrite, full CommonMark 1.2 compliance, and hOCR support

Hi Pythonistas,

I'm glad to announce the v2 release of html-to-markdown.

This library started life as a fork of markdownify, a Python library for converting HTML to Markdown. I forked it originally because I needed modern type hints, but then found myself rewriting the entire thing. Over time it became essential for kreuzberg, where it serves as a backbone for both html -> markdown and hOCR -> markdown.

I am working on Kreuzberg v4, which migrates much of it to Rust. This necessitated updating this component as well, which led to a full rewrite in Rust, offering improved performance, memory stability, and a more robust feature set.

v2 delivers Rust-backed HTML β†’ Markdown conversion with Python bindings, a CLI and a Rust crate. The rewrite makes this by far the most performance and complete solution for HTML to Markdown conversion in python. Here are some benchmarks:

Apple M4 β€’ Real Wikipedia documents β€’ convert() (Python)

| Document | Size | Latency | Throughput | Docs/sec |
| ------------------- | ----- | ------- | ---------- | -------- |
| Lists (Timeline) | 129KB | 0.62ms | 208 MB/s | 1,613

/r/Python
https://redd.it/1o3sqqz
Django + Tailwind vs. Django + React

I am building and maintaining a few Django apps and I just love how templates + htmx solves pretty much all my problems.

Recently, I've been asked to look into using something like React/Next.JS for our next project, and as a backend engineer who is too lazy to learn Javascript the "wrong way", I'm trying to come up with alternatives.

Things I like about our current setup:

* It works REALLY well
* I can easily cover everything with tests
* There's almost no blackbox behavior
* Django documentation is GREAT

Things I don't like (and think it can be solved with Tailwind and/or React):

* Look and feel (I don't know how to explain but it feels a bit outdated)
* Having to build things like pagination from the ground up with HTMX or regular requests (feels like it would be easier in React)
* RBAC in DRF seems so much cleaner

I've done some research and I already know the technical details about both approaches but it would be nice to hear from people who actually need to spend time everyday with these technologies.

/r/django
https://redd.it/1o3yzn2
I made a Better Notepad alternative using PySide6

# What My Project Does

ZenNotes is a minimalistic Notepad app with a sleek design inspired by the Fluent Design. It offers the familiar look of the Windows Notepad while having much more powerful features like Translate, TTS, etc.

# Target Audience

Anyone who uses Windows Notepad, or noepads in general

# Comparison 

The target competition is Windows Notepad. ZenNotes is like an "extension" of Windows Notepad, with similar looks but much more features, like TTS, Translate, etc.

# GitHub

https://github.com/rohankishore/ZenNotes

/r/Python
https://redd.it/1o3uy4y
Advice for Azure VM/deployment

Hello everyone,

I have never worked with deployment side, except 1 time bought VM for bot deployment on a some server provider, 3 years ago.

Now, I have to deploy my company web app to Azure platform. My manager said that I would check and choose platform and plan for our web app.

My knowledge about deployment is very limited especially about Azure platform (never worked).

Could someone give me some advice what Azure product to choose in order to deploy and run web app?

About web app backend: python (in future Go), Django/Flask, work with API , use DB (SQLite or Postgres), Docker(probably), some extra libraries, and I think done . App will show some information on 1 page for the start.
It will be used company employees (200 people) 24/7. App will scale in the future .

Thank you in advance,
Regards,

/r/django
https://redd.it/1o47mqh
[D] Kubernetes maintainers are burning out β€” The New Stack warns of a possible security disaster

/r/MachineLearning
https://redd.it/1o42pq4
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/1o4ap8i
CSRF Token Verification errors after switching to ASGI

I'm suddenly getting CSRF verification errors POSTing data in my hosted Django (v5.2.7) project after switching over to ASGI (using daphne). No changes were made to the templates/views that are affected. I've also inspected the page to confirm that the CSRF token is being passed to the page.

I did see that there was a report for ASGI applications and HTTP/2 that has since been closed and the related PR has been merged. I'm having a hard time seeing when to expect that change to appear in Django (can't find it mentioned in the release notes for the 5.x versions) But I updated to the latest available version for Django (was using 5.2.5 before), and even tried the alpha build just for kicks and the error still occurs. I also tried changing the config for nginx to set 'off' for http2 and 'on' for http3.

When I was looking into this I saw that some django projects will define an array of domains for CSRF_COOKIE_DOMAIN and CSRF_TRUSTED_ORIGINS. I didn't have those before, but added them in with the same domains as for allowed hosts.

Does anyone have any suggestions or ideas on what could be going on here and what I could try

/r/django
https://redd.it/1o4ci3b
Those who have managed to get into IT in the last couple of years, please share your experiences!

I'm finishing my fourth year of university as a software engineer. Looking at companies' requirements, I realize it's easier to get into IT with your product than to go through a three- or even five-stage interview process for a meager salary.

/r/Python
https://redd.it/1o4hjl6
What’s the best hosting option for a Django + TailwindCSS portfolio site β€” balancing stability & cost?

I built a dynamic portfolio website using Django (MVT) and TailwindCSS, with a SQLite database.
I’m looking for the best hosting option that offers a good balance between stability and price.

The site is small, gets light traffic, but I still want it to feel reliable and professional.


Any recommendations or experiences with hosting small Django apps like this?

/r/django
https://redd.it/1o4lbwh