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
Time to stop using filter()?

Python's built-in filter() function predates generators, and it has persisted, partly out of habit, partly for legacy reasons, and partly because it can be a bit faster than generators.

Having recently tested the performance of filters vs generators in Python 3.13, I found the speed benefit has reversed. In all of my tests, generators were faster than the equivalent filter call - typically by 5 to 10%.

Is it now time to stop using filter() in new code (Python >= 3.13), or are there still cases where it is clearly the better option?

/r/Python
https://redd.it/1iojoef
D How you do ML research from scratch?

Someone who has published their works at top ML conferences (NIPS, ICML, ICLR) or domain oriented conferences (CVPR, ICCV, ACL, EMNLP, KDD, SIGIR).
1. How do you get from 0 to your first paper?
2. How much is your skill (Pytorch, or domain knowledge)?
3. What is the whole process that you follow to become good at implementing your ideas?
4. How do you come up with an idea and solution?

/r/MachineLearning
https://redd.it/1ion90w
Turn Entire YouTube Playlists to Markdown Formatted and Refined Text Books (in any language)

Give it any YouTube playlist(entire courses for instance) and receive a clean, formatted and structured file with all the details of that playlist.

It's a simple yet effective script using the free Google Gemini API.

I haven't found any free tool available with this scale, so I made one.

This Python application extracts transcripts from YouTube playlists and refines them using the Google Gemini API(which is free). It takes a YouTube playlist URL as input, extracts transcripts for each video, and then uses Gemini to reformat and improve the readability of the combined transcript. The output is saved as a text file.

**What My Project Does**:

* Batch processing of entire playlists
* Refine transcripts using Google Gemini API for improved formatting and readability.
* User-friendly PyQt5 graphical interface.
* Selectable Gemini models.
* Output to markdown file.

**Target Audience**:

Turning large YouTube playlist into one large formatted text file has many advantages for studying and learning, documentation, having a source book of the playlist, etc...


**Comparison**:

I haven't found a similar tool that converts YouTube videos to easily readable document in this scale and be free and accessible.

Check it out : [https://github.com/Ebrizzzz/Youtube-playlist-to-formatted-text](https://github.com/Ebrizzzz/Youtube-playlist-to-formatted-text)

/r/Python
https://redd.it/1iou9nx
Announcing Django Shinobi, a fork of Django Ninja

For those who have been following or been involved with recent development of Django Ninja, you’ll notice that for a little over a year, almost all development has come to a halt. About 60 PRs have built up on the GitHub repository, many of which fix crucial issues, but are not getting any feedback and have no path forward to getting them merged. PRs that fix documentation will get merged in a day, but most PRs that touch code are left out to dry. Among these PRs include performance improvements, the validation vs. serialization split, my own fix for aliases, and much more. It's getting desperate enough that people are posting monkeypatches in the PRs.

I have spoken with Ninja's maintainer a bit about the issue and I think it's mostly just a split in priorities between him and myself. That's totally reasonable and respectable, its his project. But as a user of the library, I can't really say that I feel supported by this direction, and I would assume from the many repeated requests for review from the PR submitters that most in the community aren’t too happy either. Most of these existing issues aren’t complete showstoppers, but they are

/r/django
https://redd.it/1ion5cz
Need some guidance on creating a custom api endpoint for my Haystack search query

Hello guys, I'm trying to finish the \`apiview\` of my django-haystack search query. Right now I am using drf-haystack, instead of vanilla django-haystack, because I'm not using templates.


Rather I'm using VueJS as my frontend, so traditional django-haystack won't work in this case. I'm not seeing any errors and I haven't run automated tests yet for the search query api endpoint.


I'm also running my backend on Linux (Fedora) locally, that is I'm not using Docker or containers. I have some api calls in my frontend VueJS project including a search engine page that needs to communicate with this api endpoint, in particular the \`CompanySearch\` model instance. Please I need some advice for this. Let me know if there are specific files/further details you need from me. The Github repo for this project is set to private, otherwise I'd post the link here.


Anyway here are some important files that I will paste here:


[seriailizers.py](http://seriailizers.py)

\`\`\`

from rest_framework import serializers
from django.contrib.auth import authenticate
from .models import User, HomeownerUser
from .search_indexes import ArboristCompanyIndex, ServiceTypeIndex
from drf_haystack.serializers import HaystackSerializer


/r/djangolearning
https://redd.it/1io3v48
Making an ERP from scratch.

Hello.

How would you develop a mortgage loan business ERP? with the following conditions:

1. No experience or knowledge on programming or ERP development.

2. Your current ERP provider is shitty and ineffective. So you are done hiring someone else and want to learn to develop it yourself since depending on somebody else is frustrating.

Eager to listen your answers!

Javier.




/r/djangolearning
https://redd.it/1inwzc7
Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1ioxgi9
Python Developers: How Are You Finding Jobs in 2025?

Hey everyone,

I’ve been curious about the current job market for Python developers. With AI tools changing the landscape, how are you all finding work?

* Freelancing platforms Upwork and Fiverr still viable?
* How important is having a GitHub portfolio (personal projects)?
* What strategies have worked for landing clients or job offers?

I have already tried Fiverr and Upwork with no luck, so I’m looking for alternative ways to land work. Would love to hear your experiences, especially if you’ve recently landed a role or struggled in the process. Let’s help each other out!

/r/Python
https://redd.it/1ip3pvd
MagicPrompt: Stupid simple (and powerful) CLI user interaction

# What My Project Does

MagicPrompt is a powerful one line solution for collecting CLI user input with absolutely zero boilerplate. No more writing input()loops, or learning an overly complicated library. This abstracts looping, validations, terminal cleanup, type casting and formatting, while still allowing full control over any of these when needed.

https://github.com/austinmpask/pymagicprompt

Features:

Full lifecycle abstraction, by default looping until valid input
Automatic terminal cleanup for subsequent prompts/answers
Type inference & casting for answer submissions
Customizable boolean conversion for common English words
Built in common validators
Support for custom validation functions
Fully customizable prompt formatting & colors
Customizable answer sanitization & formatting
Obscured text for password inputs
Options can be specified by both kwargs and options dict

# Target Audience

This can be used as a quality of life improvement to replace any CLI application currently using input()

# Comparison

Ordinarily when collecting user input in the terminal, one must wrap logic in loops and usually validate input. Most often, you will also have to eventually cast responses to a more sensible type than str. This abstracts all of that, leaving you just one line of code to write, while still retaining the ability to apply any customizations you need. There are similar packages for this,

/r/Python
https://redd.it/1ioscee
pyatomix, a tiny atomics library for Python 3.13t

* What My Project Does

it provides an AtomicInt and AtomicFlag class from std::atomic<int64_t> and std::atomic_flag, and exposes the same API. AtomicInt also overloads math operators so += for instance is an atomic increment.

https://github.com/0xDEADFED5/pyatomix

* Target Audience

Anyone who wants an easy to use atomic int or atomic flag. I don't see why it couldn't be used in production.

* Comparison

I was having trouble a while back finding a simple atomics library for Python 3.13t that either had wheels for Windows, or would build easily without fuss on Windows, so I made one. Wheels are available for the main platforms, but it builds easily on Windows and Linux. (C++ 20 required to build)

/r/Python
https://redd.it/1ip73nx
DRF application boilerplate

I have a couple of new rest service required to be setup using DRF. This services will communicate with each other via REST and webhooks. I'm looking for some boilerplate like cookie cutter for DRF. My apps will use celery with production ready configuration and postgres as DB. since both apps will use postgres so I need some sort of docker and compose.yml which will start both apps with these dependencies after dockerfile is built.

Any suggestions for a boilerplate code for above requirements?

/r/django
https://redd.it/1ip8woh
What are some components you build into your base flask application?

I am working on a template I can recycle for all my flask applications going forward to help speed up projects I am working on. So far what I have is user authentication and a "base" sql module that can do CRUD tasks on different tables of a database. The SQL module also handles connecting to the database engine in my docker stack.

This got me wondering what else, if at all, you all do anything similar?



/r/flask
https://redd.it/1ipfb5s
memfile: Python library to store files in RAM

[memfile](https://github.com/LIZARD-OFFICIAL-77/memfile)

- **What My Project Does**
memfile wraps the built-in open() function for a new one, named memoryopen()
It is a fully drop-in replacement. It will work exactly like open() but the contents of the file will be in RAM and removed on reboot.

- **Target audience**
Probably embedded programming. The reason I made it is because of the project I'm working on where I need to use RAM instead of persistent storage as much as possible.

- **Comparison**
Well there is no alternatives that do specifically this.

IMPORTANT NOTICE: ONLY WORKS ON *Nix systems (Windows unsupported)
READ README BEFORE USE TO PREVENT MEMORY LEAKS / DANGLING SYMLINKS

/r/Python
https://redd.it/1ipei7z
Help with django

Ive started django recently
Im studying from Django for Beginners by WS vincent

Is it okay? or does anybody know sth better?

/r/djangolearning
https://redd.it/1ipb8i8
D We built GenAI at Google and Apple, then left to build an open source AI lab, to enable the open community to collaborate and build the next DeepSeek. Ask us anything on Friday, Feb 14 from 9am-12pm PT!

Proof: https://imgur.com/a/kxiTTXP

TL;DR: Hi 👋 we’re Oumi, an AI lab that believes in an unconditionally open source approach–code, weights, training data, infrastructure, and collaboration—so the entire community can collectively push AI forward. We built a platform for anyone to contribute research in AI. Ask us anything about open source, scaling large models, DeepSeek, and what it takes to build frontier models, both inside and outside of big tech companies. Tell us what is working well in open source AI or what challenges you are facing. What should we work on together to improve AI in the open?

\-------------

For years, we worked at big tech (Google, Apple, Microsoft) leading efforts on GenAI models like Google Cloud PaLM, Gemini, and Apple’s health foundation models. We were working in silos and knew there had to be a better way to develop these models openly and collaboratively. So, we built a truly open source AI platform that makes it possible for tens of thousands of AI researchers, scientists, and developers around the world to collaborate, working together to advance frontier AI in a collective way that leads to more efficient, transparent and responsible development. The Oumi platform (fully open-source, Apache 2.0 license) supports pre-training, tuning, data

/r/MachineLearning
https://redd.it/1ioxatq
PostgreSQL & BeyondTrust Zero-Days Exploited in Coordinated Attacks

Relevant to Django Devs Using PostgreSQL:

Threat actors exploited a newly discovered PostgreSQL vulnerability (CVE-2025-1094) alongside a BeyondTrust zero-day (CVE-2024-12356), allowing them to achieve remote code execution. The PostgreSQL flaw enables attackers to execute arbitrary shell commands through SQL injection, significantly raising security risks for affected systems.  (View Details on PwnHub)

/r/django
https://redd.it/1ipfnkf
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/1ipornd
Docullim: AI-Powered Python Documentation

Hey r/Python ! I just released docullim, a Python library that helps auto-generate documentation using LLMs—but with a twist. Instead of processing your entire codebase, docullim lets you selectively document functions and classes by adding a simple @docullim annotation.

# What My Project Does

Add @`docullim` any function or class, and it generates documentation for just that part of your code.
Supports custom tags: @docullim("custom_tag") lets you customise prompts.
Flexible CLI: Process individual files, directories, or even glob patterns like docullim "src/\*/*.py".
Outputs structured JSON so you can use it however you want.
Caches results locally to avoid redundant API calls and speed up future runs.
Works with custom models & configs: docullim --config docullim.json --model gpt-4 "src/\*/*.py"
It supports multiple different LLMs

# Target Audience

Developers & teams who want AI-generated documentation without bloating their entire repo.
Maintainers of large projects who need a structured, incremental approach to documentation.
Tooling enthusiasts looking for LLM-powered doc generation that integrates into their workflow.

# Comparison

Unlike other AI documentation tools, Docullim doesn’t generate docs for everything—it only runs where you tell it to. This makes it:
Faster (fewer API calls, less processing)
More controllable (no irrelevant or low-quality docstrings)
Easier

/r/Python
https://redd.it/1ipfgme
All-in-one DevKit ("Github in a box"). A robust dev kit you can run in docker to power up your coding workflows

Hey all, I'd gotten some requests from my colleagues and peers to make a tutorial on my local dev setup that I use, primarily for flask and such. I put together a youtube playlist that lines out my so-called "Github in a box" setup. It includes the following features:

* SCM
* Remote, sandboxed development environments
* CICD
* Dependency management
* Gists
* Static site hosting
* Static code analysis
* Pypi caching
* Docker registry caching

Essentially, what I use at home is a freebie version github where I self host it all to keep my data in-house. The main goal was to make it ultra portable and lightweight/flexible to my per-project needs. It's relatively easy to set up and use and very quick to spin up and tear down. Hope the community finds this useful.

Youtube playlist: [https://youtube.com/playlist?list=PLIS2XlWhBbX\_wz\_BsD-TYrZEUrUVCm1IO&si=OIs9ZorhUAPYle4U](https://youtube.com/playlist?list=PLIS2XlWhBbX_wz_BsD-TYrZEUrUVCm1IO&si=OIs9ZorhUAPYle4U)

Project files: [https://github.com/crono782/aio-devkit](https://github.com/crono782/aio-devkit)

/r/flask
https://redd.it/1iptmld