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
Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1l2rfyx
Best library for Google Maps/address functionality?

I'm working on a project that will have addresses tied to various models. I would like to have a view that will display all of them as markers on a map, etc.

I have tried django-google-maps, which seems to do the trick with the backend admin, but it leaves a bit to be desired on the frontend, for example I don't want to show the map preview on the frontend, just a single autocomplete address field.

It would also be nice if later I could make views with dropdowns by state/country, which I don't think can be done with django-google-maps.

How are others implementing this?


I've also tried making my own core "Address" model that would be modeled after what google maps uses, with the idea that I can tie the logic of that model to others, but I'm struggling to make things work logically to where I can add the field easily to other models, and into their forms.py, etc.

/r/django
https://redd.it/1l2lvqh
What am I doing wrong? My html page doesn't load the css.

/r/flask
https://redd.it/1l2qld2
Frontend for backend dev

I've been writing this backend, got to a stage where I need to get a frontend to keep things going, I know just html and css, then I decided to turn to AI to write the front end which is turning out just fine, some include JS which I have absolutely no idea about JS, thw only thing ai write is html and css so far, ive been the one writing the api views myself, it doesn't look bad on a resume as a backend developer when someone is looking at it, or does it?

Is that vibe coding ?

/r/django
https://redd.it/1l2amxg
pyleak - detect leaked asyncio tasks, threads, and event loop blocking in Python

What pyleak Does

pyleak is a Python library that detects resource leaks in asyncio applications during testing. It catches three main issues: leaked asyncio tasks, event loop blocking from synchronous calls (like time.sleep() or requests.get()), and thread leaks. The library integrates into your test suite to catch these problems before they hit production.

Target Audience

This is a production-ready testing tool for Python developers building concurrent async applications. It's particularly valuable for teams working on high-throughput async services (web APIs, websocket servers, data processing pipelines) where small leaks compound into major performance issues under load.

The Problem It Solves

In concurrent async code, it's surprisingly easy to create tasks without awaiting them, or accidentally block the event loop with synchronous calls. These issues often don't surface until you're under load, making them hard to debug in production.

Inspired by Go's goleak package, adapted for Python's async patterns.



PyPI: pip install pyleak

GitHub: https://github.com/deepankarm/pyleak

/r/Python
https://redd.it/1l2y5rz
Whitenoise serving original js files alongside hashed files

Hi, I've been struggling with serving static files in deployment in my django app. It's a simple monolithic architecture using vanilla js for front end. I use nginx to serve the static files and whitenoise to generate the hashed versions into a single directory. The problem is when I check the static folder I see also original files alongside hashed versions and this results in having a multiple event listeners being triggered on the same event and lots of bugs. I found this configuration to avoid copying original files: WHITENOISE_KEEP_ONLY_HASHED_FILES = True
when I set this I see that for some reason only js files that are imported in the html file as script are imported and imports that are required from inside js files are failing. I'm guessing it's looking for original file in the static folder and with this config they don't exist.

Everything is served in one VPS server.

Anyways it's a huge mess, I just hope someone has faced this issue and has a fix.

I'm thinking about using webpack or vite but are not keen on adding 3rd part dependencies if there's a simple fix.



/r/django
https://redd.it/1l300jy
CarbonKivy - IBM's Carbon Design Components for Kivy

# What My Project Does

CarbonKivy is a Python library that integrates IBM's Carbon Design System with the Kivy framework. It provides a modern, accessible, and user-friendly UI toolkit inspired by Carbon’s design principles, enabling developers to create consistent and visually appealing applications in Kivy. CarbonKivy is a next-generation toolkit for developers looking to create professional-grade applications using the power of Kivy coupled with the design excellence of Carbon Design principles.

Github: CarbonKivy

Demo application: Carbonify

Documentation: CarbonKivy docs

# Target Audience
Its meant for Android, iOS, Windows, Linux and macOS developers.
This can be used for both production and personal projects.

# Comparison
Many of us are aware of KivyMD - Google's Material Design Components for Kivy.

CarbonKivy follows a whole different design system by IBM i.e. the Carbon Design System. This project is in Active Development and will be adding more available components as in the latest Carbon Design System.

Our project follows a whole different strategy and design priciples for more optimized and user friendly experience.

/r/Python
https://redd.it/1l2wwmp
Mongo Analyser: A TUI Application for MongoDB with Integrated AI Assistant

I’ve made an open-source TUI application in Python called Mongo Analyser that runs right in your terminal and helps you get a clear picture of what’s inside your MongoDB databases.

What My Project Does
Mongo Analyser is a terminal app that connects to MongoDB instances (Atlas or local), scans collections to infer field types and nested document structures, shows collection stats (document counts, indexes, and storage size), and lets you view sample documents. Instead of running db.collection.find() commands, you can use a simple text UI and even chat with an AI model (currently provided by Ollama, OpenAI, or Google) for schema explanations, query suggestions, etc.

Target Audience
I believe if you’re a Python developer, data engineer, data analyst, or anyone dealing with messy, schema-less data stored in MongoDB, this tool can help you understand what your data actually looks like and how its structure could be improved.

Comparison
Unlike Flask/Django web apps or GUI tools like Compass, Mongo Analyser lives in your terminal, so no web server or browser is needed. Compared to Streamlit or Anvil, you avoid extra dependencies but still get AI-powered insights without a separate backend.

Project's GitHub repository: https://github.com/habedi/mongo-analyser

The project is in the beta stage, and suggestions

/r/Python
https://redd.it/1l36v2r
What should I choose in FE (React + DRF)

I'm planning on working on a new project. However, I haven't decided how I'm going to structure my Front-end. I thought about going with Tanstack Router. Or should I choose something like React Router v7 as framework or Tanstack start. My colleague and I are pretty comfortable with Django and DRF. But we haven't made a final decision about the FE. Any suggestions?

/r/django
https://redd.it/1l33e6u
WEP - Web Embedded Python (.wep)

WEP — Web Embedded Python: Write Python directly in HTML (like PHP, but for Python lovers)

Hey r/Python! I recently built and released the MVP of a personal project called WEP — Web Embedded Python. It's a lightweight server-side template engine and micro-framework that lets you embed actual Python code inside HTML using .wep files and <wep>...</wep> tags. Think of it like PHP, but using Python syntax. It’s built on Flask and is meant to be minimal, easy to set up, and ideal for quick prototypes, learning, or even building simple AI-powered apps.

# What My Project Does

WEP allows you to write HTML files with embedded Python blocks. You can use the echo() function to output dynamic content, run loops, import libraries — all inside your .wep file. When you load the page, Python gets executed server-side and the final HTML is sent to the client. It’s fast to start with, and great for hacking together quick ideas without needing JavaScript, REST APIs, or frontend frameworks.

# Target Audience

This project is aimed at Python learners, hobbyists, educators, or anyone who wants to build server-rendered pages without spinning up full backend/frontend stacks. If you've ever wanted a “just Python and HTML” workflow for demos

/r/Python
https://redd.it/1l35niu
RTime Blindness: Why Video-Language Models Can't See What Humans Can?

Found this paper pretty interesting. None of the models got anything right.

arxiv link: https://arxiv.org/abs/2505.24867

Abstract:

Recent advances in vision-language models (VLMs) have made impressive strides in understanding spatio-temporal relationships in videos. However, when spatial information is obscured, these models struggle to capture purely temporal patterns. We introduce SpookyBench, a benchmark where information is encoded solely in temporal sequences of noise-like frames, mirroring natural phenomena from biological signaling to covert communication. Interestingly, while humans can recognize shapes, text, and patterns in these sequences with over 98% accuracy, state-of-the-art VLMs achieve 0% accuracy. This performance gap highlights a critical limitation: an over-reliance on frame-level spatial features and an inability to extract meaning from temporal cues. Furthermore, when trained in data sets with low spatial signal-to-noise ratios (SNR), temporal understanding of models degrades more rapidly than human perception, especially in tasks requiring fine-grained temporal reasoning. Overcoming this limitation will require novel architectures or training paradigms that decouple spatial dependencies from temporal processing. Our systematic analysis shows that this issue persists across model scales and architectures. We release SpookyBench to catalyze research in temporal pattern recognition and bridge the gap between human and machine video understanding. Dataset and code has been made available on our project website:

/r/MachineLearning
https://redd.it/1l33op4
Introducing sqlxport: Export SQL Query Results to Parquet or CSV and Upload to S3 or MinIO

In today’s data pipelines, exporting data from SQL databases into flexible and efficient formats like Parquet or CSV is a frequent need — especially when integrating with tools like AWS Athena, Pandas, Spark, or Delta Lake.

That’s where `sqlxport` comes in.

# 🚀 What is sqlxport?

sqlxport is a simple, powerful CLI tool that lets you:

Run a SQL query against PostgreSQL or Redshift
Export the results as Parquet or CSV
Optionally upload the result to S3 or MinIO

It’s open source, Python-based, and available on [PyPI](
https://pypi.org/project/sqlxport/).

# 🛠️ Use Cases

Export Redshift query results to S3 in a single command
Prepare Parquet files for data science in DuckDB or Pandas
Integrate your SQL results into Spark Delta Lake pipelines
Automate backups or snapshots from your production databases

# Key Features

PostgreSQL and Redshift support
Parquet and CSV output
Supports partitioning
MinIO and AWS S3 support
CLI-friendly and scriptable
MIT licensed

# 📦 Quickstart

pip install sqlxport

sqlxport run \
--db-url postgresql://user:pass@host:5432/dbname \
--query "SELECT
FROM sales" \
--format parquet \
--output-file sales.parquet

Want to upload it to MinIO or S3?



/r/Python
https://redd.it/1l3edpx
Using Python 3.14 template strings

https://github.com/Gerardwx/tstring-util/

Can be installed via pip install tstring-util

What my project does
It demonstrates some features that can be achieved with PEP 750 template strings, which will be part of the upcoming Python 3.14 release. e.g.

command = t'ls -l {injection}'

It includes functions to delay calling functions until a string is rendered, a function to safely split arguments to create a list for subprocess.run(, and one to safely build pathlib.Path.

Target audience

Anyone interested in what can be done with t-strings and using types in string.templatelib. It requires Python 3.14, e.g. the Python 3.14 beta.

Comparison
The PEP 750 shows some examples, which formed a basis for these functions.

/r/Python
https://redd.it/1l3it4s
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

# Weekly Thread: Professional Use, Jobs, and Education 🏢

Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.

---

## How it Works:

1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.

---

## Guidelines:

- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.

---

## Example Topics:

1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?

---

Let's help each other grow in our careers and education. Happy discussing! 🌟

/r/Python
https://redd.it/1l3l3gs
N Nvidia’s Blackwell Conquers Largest LLM Training Benchmark

New MLPerf training results are in, and Nvidia's Blackwell GPUs continue to dominate across all six benchmarks. That said, the computers built around the newest AMD GPU, MI325X, matched the performance of Nvidia’s H200, Blackwell’s predecessor, on the most popular LLM fine-tuning benchmark.
https://spectrum.ieee.org/mlperf-training-5

/r/MachineLearning
https://redd.it/1l39vua
Need guidance regarding how to become a stack developer

Hey guys I’m an amateur with little to no knowledge on how to become a stack developer. Im good in python and now recently started learning Django .I’m currently pursuing BCA but don’t have anyone to ask about this issue.
Things I wanted to know:

Is there a roadmap as to how to become one?

Good YouTube channels for this

How to sharpen my skills

PLEASE some help or any help would be
Appreciated.

/r/djangolearning
https://redd.it/1l3hure
Organizing arbitrary languages in the Database

Hi,

i've created several multilingual applications with django, but all content was maintained by editors. Transmeta does a really good job here, and because it is no longer maintained, i forked it and made it usable with python3 and django5.

But now i'm working on a platform that lets users translate their data to arbitrary languages. For example, on a platform like linkedin jobs, i'd like to enter my data once for each language, and create job applications for different languages.

How would you organize this? I don't want to overwhelm the user with i18n fields in forms, i want to give them the opportunity to create their data in specific languages. i.E. somebody that writes their job applications in spanish and english, don't want to add the german localizations.

This looks like i have to craft a custom solution for my case, that allows the user to enter all data simple for their language, and offer a possibility to translate the data to different languages.

Background: It is a platform that displays a users skills, but it also can create job application documents as pdf. And in my experience with job applications all over europe, some companies want english applications, some want applications in

/r/django
https://redd.it/1l3ox55
MCGA: A ridiculous Python package that chickens out of tariffs when it's too high

**A ridiculous Python package that chickens out of tariffs when it's too high**

# What the hell is this?

MCGA is a **satirical Python package** that lets you chicken out after setting high tariffs. Set a 120% tariff on numpy? Your import numpy now takes 12 seconds... unless it "chickens out" mid-way and reduces the delay! The higher the tariffs, the higher the probability of chickening out. It's all about the TACO. 

It's completely useless

# How it works:

import mcga

# Set some TREMENDOUSLY BEAUTIFUL tariffsmcga.set_tariffs({
    "numpy": 145,    # 14.5 second delay... or chicken out to 4s!
    "pandas": 120,   # 12 second delay... 70% chance to chicken out
    "requests": 80,  # 8 second delay, probably won't chicken out
})

import numpy     
                 # 🐔 Chickening out on numpy
                 # 🐔 Reduced to 40%

import pandas   

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