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
When working in a team do you makemigrations when the DB schema is not updated?

Pretty simple question really.

I'm currently working in a team of 4 django developers on a large and reasonably complex product, we use kubernetes to deploy the same version of the app out to multiple clusters - if that at all makes a difference.

I was wondering that if you were in my position would you run makemigrations for all of the apps when you're just - say - updating choices of a CharField or reordering potential options, changes that wouldn't update the db schema.

I won't say which way I lean to prevent the sway of opinion but I'm interested to know how other teams handle it.

/r/django
https://redd.it/1m5l189
Is it ok to use Pandas in Production code?

Hi I have recently pushed a code, where I was using pandas, and got a review saying that I should not use pandas in production. Would like to check others people opnion on it.

For context, I have used pandas on a code where we scrape page to get data from html tables, instead of writing the parser myself I used pandas as it does this job seamlessly.


Would be great to get different views on it. tks.

/r/Python
https://redd.it/1m5lm8e
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/1m5z8b2
Need help figuring out why it is not working.

Has anybody used django-tailwind-cli on their projects?
For the love of god, I could not figure out what is wrong with my setup. I am unable to load CSS on a template.
Anyone willing to help would be greatly appreciated.

/r/django
https://redd.it/1m6aun3
Installing djangorestframework

I have a fresh lightsail install with Django stack. I want to now install djangorestframework. How do I install it so Django can use it? Do i install it into a venv or globally using pip?

/r/djangolearning
https://redd.it/1m30n13
PEP 798 – Unpacking in Comprehensions

PEP 798 – Unpacking in Comprehensions

https://peps.python.org/pep-0798/

# Abstract

This PEP proposes extending list, set, and dictionary comprehensions, as well as generator expressions, to allow unpacking notation (* and **) at the start of the expression, providing a concise way of combining an arbitrary number of iterables into one list or set or generator, or an arbitrary number of dictionaries into one dictionary, for example:

*it for it in its # list with the concatenation of iterables in 'its'
{it for it in its} # set with the union of iterables in 'its'
{d for d in dicts} # dict with the combination of dicts in 'dicts'
(
it for it in its) # generator of the concatenation of iterables in 'its'

/r/Python
https://redd.it/1m607oi
D Is it me or is ECAI really bad this year?

I have one accepted paper and another one rejected. The review and meta-review quality was really subpar. It felt like most of the responses we got, on both sides of the spectrum, came from underexperinced reviewers. I am all for letting undergrads read, review, and get experience, but I always review the paper by myself first and would never submit theirs as is. This really boggles me because I always thought ECAI is a good conference, but this year I can't help but feel a little bit embarrassed to even go there.

I have not submitted to other conferences yet. So, I wonder if there is a trend.

/r/MachineLearning
https://redd.it/1m69wc3
Wii tanks made in Python

What My Project Does
This is a full remake of the Wii Play: Tanks! minigame using Python and Pygame. It replicates the original 20 levels with accurate AI behavior and mechanics. Beyond that, it introduces 30 custom levels and 10 entirely new enemy tank types, each with unique movement, firing, and strategic behaviors. The game includes ricochet bullets, destructible objects, mines, and increasingly harder units.

Target Audience
Intended for beginner to intermediate Python developers, game dev enthusiasts, and fans of the original Wii title. It’s a hobby project designed for learning, experimentation, and entertainment.

Comparison
This project focuses on AI variety and level design depth. It features 19 distinct enemy types and a total of 50 levels. The AI is written from scratch in basic Python, using A* and statemachine logic.

GitHub Repo
https://github.com/Frode-Henrol/Tank\_game

/r/Python
https://redd.it/1m6lzvk
Anyone else doing production Python at a C++ company? Here's how we won hearts and minds.

I work on a local LLM server tool called Lemonade Server at AMD. Early on we made the choice to implement it in Python because that was the only way for our team to keep up with the breakneck pace of change in the LLM space. However, C++ was certainly the expectation of our colleagues and partner teams.

This blog is about the technical decisions we made to give our Python a native look and feel, which in turn has won people over to the approach.

Rethinking Local AI: Lemonade Server's Python Advantage

I'd love to hear anyone's similar stories! Especially any advice on what else we could be doing to improve native look and feel, reduce install size, etc. would be much appreciated.

This is my first time writing and publishing something like this, so I hope some people find it interesting. I'd love to write more like this in the future if it's useful.

/r/Python
https://redd.it/1m6g0jx
Advice needed on coding project!

Hi! I only recently started coding and I'm running into some issues with my recent project, and was wondering if anyone had any advice! My troubles are mainly with the button that's supposed to cancel the final high-level alert. The button is connected to pin D6, and it works fine when tested on its own, but in the actual code it doesn't stop the buzzer or reset the alert counter like it's supposed to. This means the system just stays stuck in the high alert state until I manually stop it. Another challenge is with the RGB LCD screen I'm using. it doesn’t support a text cursor, so I can’t position text exactly where I want on the screen. That makes it hard to format alert messages, especially longer ones that go over the 2-line limit. I’ve had to work around this by clearing the display or cycling through lines of text. The components I'm using include a Grove RGB LCD with a 16x2 screen and backlight, a Grove PIR motion sensor to detect movement, a Grove light sensor to check brightness, a red LED on D4 for visual alerts, a buzzer on D5 for sound alerts, and a

/r/Python
https://redd.it/1m6ow2y
Superfunctions: solving the problem of duplication of the Python ecosystem into sync and async halve

Hello r/Python! 👋

For many years, pythonists have been writing asynchronous versions of old synchronous libraries, violating the DRY principle on a global scale. Just to add async and await in some places, we have to write new libraries! I recently wrote [transfunctions](https://github.com/pomponchik/transfunctions) - the first solution I know of to this problem.

# What My Project Does

The main feature of this library is superfunctions. This is a kind of functions that is fully sync/async agnostic - you can use it as you need. An example:

from asyncio import run
from transfunctions import superfunction,sync_context, async_context

@superfunction(tilde_syntax=False)
def my_superfunction():
print('so, ', end='')
with sync_context:
print("it's just usual function!")
with async_context:
print("it's an async function!")

my_superfunction()
#> so, it's just usual function!

run(my_superfunction())
#> so, it's an async function!


As you can see, it works very simply, although there is a lot of magic under the hood. We just got a feature that works both as regular and as coroutine, depending on how we use it. This allows you to write very powerful and versatile libraries that no longer need to be divided into synchronous and asynchronous, they can be any

/r/Python
https://redd.it/1m6rzqv
I was paid for creating an app but I don't know if Django is my best choice

Hi there, I'm a backend dev with experience mostly in python.

Recently a real estate agent contacted me to create a property management system.

I know django and a little bit of django templates but I see a lot of people using Node + React or Django + React and I don't know if using purely django will be a headache.

Any suggestions or advice on what stack to use would be highly appreciated.

Thanks in advance.

/r/django
https://redd.it/1m6tz2f
Just launched a Flask + AI project that auto-generates interactive checklists — would love UI Feeback
https://listacks.com

/r/flask
https://redd.it/1m667rs
Lumocards-One: Information System

Dear Pythonistas!

I'm releasing this prototype I made in Python called Lumocards-One.

It's a terminal application you can use to organize notes and projects and journal entries. See the YouTube video to get an idea of whether you could benefit from this. Happy programming all!

YouTube Preview of Lumocards-One

YouTube Installation and Features Video

Github Project, with install instructions

What My Project Does

It allows you to create and organize cards, create an agenda file for today, display your Google calendar, and manage Journal entries. Also includes a Pomodoro timer and search features.

Target Audience 

It's meant for Open Source community and as a prototype all computer users who enjoy text-based applications.

Comparison 

It's similar to other note taking apps, but it has more features and better animations than other programs I've seen/encountered.

/r/Python
https://redd.it/1m6yuj0
Showcase Time tracker built with Python + CustomTkinter - lives in system tray & logs to Excel

What My Project Does

A simple time tracking app - no login, no installation, that helps to track time for a task and logs data to Excel. Handles pauses, multi day tasks, system freezes.


Target Audience

For developers, freelancers, students, and anyone who wants to track work without complex setups or distractions.

>Open-source and available here:
🔗 GitHub: a-k-14/time\_keeper

Key Features:

Lives in the system tray to keep your taskbar clean
Tracks task time and logs data to an Excel file
Works offline, very lightweight (\~41 MB)
No installation required



Why

I’m an Accountant by profession, but I’ve always had an interest in programming. I finally took the initiative to begin shifting toward the development/engineering side.

While trying to balance learning and work, I often wondered where my time was going and which tasks were worth continuing or delegating so that I can squeeze more time to learn. I looked for a simple time tracking app, but most were bloated or confusing.

So I built Time Keeper \- a minimal, no-fuss time tracker using Python and CustomTkinter.

Would love your feedback :)






/r/Python
https://redd.it/1m6fgwk
Django or Flash for backend

"I'm interested in using Python for backend development, and I’ve noticed that Django and Flask are the two most popular frameworks. For those who have worked with either (or both), what has your experience been like? Which one would you recommend and why?

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