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
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 description 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

**Description**: 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

**Description**: 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

**Description**: Create a script 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/1j25eaj
What Are Your Favorite Python Repositories?

Hey r/Python!

I’m always on the lookout for interesting and useful Python repositories, whether they’re libraries, tools, or just fun projects to explore. There are so many gems out there that make development easier, more efficient, or just more fun.

I'd love to hear what repositories you use the most or have found particularly interesting. Whether it's a library you can't live without, an underappreciated project, or something just for fun, let your suggestions be heard below!

Looking forward to your recommendations!


/r/Python
https://redd.it/1j2ev5f
Why is there no standard implementation of a disjoint set in python?

We have all sorts of data structure implemented as part of the standard library. However disjoint set or union find is totally missing. It's super useful for bunch of things - especially detecting relationships, cycles in graph etc.

Why isn't there an implementation of it? Seems fairly straightforward to write one in python - but having a platform backed implementation would do wonders for performance? Especially if the set becomes huge.


Edit - the contributing guidelines - Adding to the stdlib

/r/Python
https://redd.it/1j20l34
I need help on deploying Django Channels

I wanted to deploy django channels Asgi on a server that has a free tier like pythonanywhere and I don't know one.

and Deploying Django channels requires Redis that is also a problem.
I appreciate any help on this

/r/django
https://redd.it/1j2qs5j
How to enable reCAPTCHA v3 in Flask? I've been working on this literally for days... please help.

I'm at my wits end. The process seem so obvious, but it never works.

I have google cloud set up with keys. I've tried to set it up with the Python backend prebuild... which for some reason was deprecated in 2018 and they haven't updated the code. I've tried to set it the HTML button with their REST API, but that seems to only bet integrated for the non-button format.

I just want to stop bots from creating thousands of fake users on my database... please help.

/r/flask
https://redd.it/1j2zjje
R Had a paper accepted at CVPR, should I put it in arvix first ?

Hello,
So my first paper was accepted at CVPR.
Apparently the paper will be made available by the Computer Vision Foundation around the first of June. So I’m wondering if I should put it in arvix first !


/r/MachineLearning
https://redd.it/1j2epr9
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/1j2xevt
The first thing I wish someone told me before building a Django product.

Since I started with a lot of docs, blogs and tutorials to learn Django, I was never able to prioritize this.

But please put more focus on the authentication and permissions part, especially JWT if you are using a separate front-end. Else you will have to do a major restructure.

/r/django
https://redd.it/1j34pis
Do you use runtime type checking in Python?

Recently, I was surprised to see the following output from a Python program that uses type annotations:

> tail -3 unnacceptable.py
a: int = f()
b: int = g()
print(f'{a} + {b} = {a + b}')

> mypy --strict unnacceptable.py
Success: no issues found in 1 source file

> pyright unnacceptable.py
0 errors, 0 warnings, 0 informations

> python unnacceptable.py
1 + 2 = 12

The cause of this behaviour is the Any type:

def f() -> Any:
return '1'

def g() -> Any:
return '2'

Of course, the static type checkers have to allow the conversion from Any to int at compile-time (because the return values of f and g could indeed be ints), and they don't do anything to check the types of those return values at runtime.

This is in contrast to a statically-typed language (e.g. C# or Dart) which have a type equivalent to Python's Any (named dynamic), but

/r/Python
https://redd.it/1j318u1
Is flask with react ideal for a startup mvp?

Find Flask to be a bit more simplistic than Django or FastAPI. Want to use to it to build CRUD web app.

/r/flask
https://redd.it/1j3353q
Where to put custom form attributes that are not fields?

If I have a ModelForm with some fields and want to add an attribute to it that's not a field, should I put it in the "Meta" inner-class or should I put it directly inside the ModelForm class itself, so right beside the other fields?

In the same way, is an ok thing to do to add an inner Meta class to forms that are not ModelForms when I want to add attributes to them that are not fields?

/r/django
https://redd.it/1j34pfq
I Got Tired of "AI Shorts" Scams - So I Built My Own Free & Local Shorts Creator Tool!🎬

I love watching YouTube Shorts. What I don’t love? Seeing a flood of YouTubers claiming,
*"You can make easy AI Shorts in seconds!"* or "*Create your own automated YouTube channel*", .etc

Just to sell you their overpriced AI tools, subscriptions, or video editors.

So, out of sheer spite, I built [ShortsMaker](https://github.com/rajathjn/shorts_maker) \- a completely **free, open-source, local** Shorts automation tool that doesn’t try to upsell you anything. No subscriptions, no cloud nonsense - just Python, AI, and automation running entirely on your machine.

# What My Project Does

[ShortsMaker](https://github.com/rajathjn/shorts_maker) is a Python package that automates the creation of YouTube Shorts - entirely on your local machine. No cloud-based services, no subscriptions, no hidden paywalls, fully customizable short-video generation.

# ShortsMaker is built around four core classes:

* **ShortsMaker** – Handles multiple tasks, such as fetching posts from subreddits, generating audio, transcribing audio, and even fixing spelling & grammar in scripts.
* **MoviepyCreateVideo** – The engine that creates the short video by combining video clips, music, audio, and transcripts.
* **AskLLM** – Uses an AI LLM to extract the best possible **title, description, tags, and thumbnail description** for your script.
* **GenerateImage** – Uses FLUX to generate high-quality AI images for your Shorts.

# Target Audience

This project is for:

*

/r/Python
https://redd.it/1j36d7a
Made a Tool That Tracks & Downloads Every Song you Hear

I’m excited to share a project I’ve been working on called MusicCollector! It’s a Python based tool that helps you identify, track, and even download songs you listen to in real-time. Whether you’re a music enthusiast, a developer, or just someone who loves automating cool stuff, this might be right up your alley!

Have you ever heard a song while scrolling through Instagram, YouTube, or while traveling, only for it to get stuck in your head, but you completely forget what it was later?

I found myself in this situation way too often, whether I was in a cafe, walking through a city, or just mindlessly scrolling instagram/yt late at night. I'd hear a song, love it, but then totally forget what it was called when I wanted to find it again.

I wanted a tool that could passively listen while I go about my day, automatically recognize songs, and store them in a history that I could check later, complete with a downloaded copy so I wouldn’t have to search again to download it. Over time, I realized this could also act as a musical memory log, a collection of every track I’ve discovered, tied to different moments and places in my life.

Eventually, I even thought about adding a geolocation

/r/Python
https://redd.it/1j38x4r
What is the best resource to learn Flask in 2025?

Most of the popular tutorials are 4 or 5 years old now, should i follow Corey Scafer?



/r/flask
https://redd.it/1j3c3zs
Session cookies over HTTP

I have a misunderstanding over the "SESSION_COOKIE_SECURE" flask config element. If I understand correctly, it is supposed to ensure cookies are only sent over HTTPS. However, when I run my flask app in HTTP (unsecure), my session cookies are still sent to my browser and maked as "Secure: true".

What am I not understanding here?

/r/flask
https://redd.it/1j2xfle
Hot to have pretty frontend w/o Vue/react separate frontend. Just using Django itself.

Hi, pretty much everything in title. I wonder if it's possible to have modern and good looking frontend with just Django. Using htmx? I don't want to add another level of complication to my work but all my Django systems (I've developed few of them) look ugly like a old woman without teeth. It works but look like yahoo from 90'. I use crispy form, bootstrap and some custom .js but maybe someone could give a hint to a single hobby developer.

/r/django
https://redd.it/1j3bvda
Why can't I access "Meta" inner class of model?

class MyObjects(models.Model):
field1 = models.CharField(max_length=20)

class Meta:
verbose_name_plural = "MyObjects"

With a model like the one above, why is it then impossible for me to do something like this in a view let's say:

from app.models import MyObjects
print(MyObjects.Meta.verbose_name_plural)

/r/django
https://redd.it/1j3mxoz
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/1j3plxg