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
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/1k2jc12
I finished Automate The Boring Stuff, what now ?

I finished (or almost finished) this introductory book, I love it (thanks u/AlSweigart), now what is the logical step for deeper understanding of python ? my goal is to get a decent knowledge I can use in AI projects, thanks in advance.

/r/Python
https://redd.it/1k2vgx9
A simple app that lets you visualise and analyse pip packages installed on your system

I wanted to share a little tool I've been working on called ViperView. It's a desktop application that helps you visualize and manage your Python package installations in a clean, user-friendly interface.

Key Features:
* Lists all installed pip packages with version, size, and location
* Interactive bar chart showing the top 20 largest packages
* Real-time search/filtering
* Export package data to CSV
* Dark theme with a modern PyQt5 interface

it's just a simple GUI that makes it easy to understand your Python environment's disk usage.

Check it out on [GitHub: https://github.com/ExoFi-Labs/ViperView](https://github.com/ExoFi-Labs/ViperView)

Would love to hear your feedback and suggestions for improvements!

/r/Python
https://redd.it/1k2w14y
Startle: Instantly start a CLI from a function, functions, or a class

Hi! I have been working on **Startle**, which lets you transform a function, functions or a (data)class into a command-line entry point. It is heavily inspired by Fire and Typer, but I wanted to address some pain points I have personally experienced as a user of both projects, and approach some things differently.

* [Github](https://github.com/oir/startle/)
* [Docs](https://oir.github.io/startle/)

# What My Project Does

* Transform a function into a command-line entry point. This is done by inspecting the given function and defining the command-line arguments and options based on the function arguments (with their type hints and default values) and the docstring.
* Transform a *list* of functions into an entry point. In this case, functions are made available as commands with their own arguments and options in your CLI.
* Use a class (possibly a dataclass) to define an entry point, where command line arguments are automatically parsed into your config object (instead of invoking a function).

# Target Audience

Devs building command line interfaces, who want to translate existing functions or config classes into argparsers automatically.

I consider the project to be alpha and unstable, despite having a usable MVP for parsing with functions and classes, until it gets some active use for a while and API is

/r/Python
https://redd.it/1k2kxgv
Is Django better for monolithic or microservices if I want low latency and high performance?

I'm using Django (multi tenant) for my current project and trying to decide whether to keep it monolithic or split it into microservices. My main goals are reducing latency, improving performance, and ensuring scalability as the app grows.

Django is great for rapid development, but I’m not sure if it’s the best fit for a high-performance architecture in the long run.

Has anyone here achieved low-latency performance with Django in either setup? What worked best for you — monolith or microservices?

/r/django
https://redd.it/1k2y12q
Is Django better for monolithic or microservices if I want low latency and high performance?

I'm using Django for my current project (multi tenant) and trying to decide whether to keep it monolithic or split it into microservices. My main goals are reducing latency, improving performance, and ensuring scalability as the app grows.

Django is great for rapid development, but I’m not sure if it’s the best fit for a high-performance architecture in the long run.

Has anyone here achieved low-latency performance with Django in either setup? What worked best for you — monolith or microservices?

/r/Python
https://redd.it/1k2y3l8
Just Launched My First Django Website – Feedback & Suggestions

Hey everyone,

I just launched my first website for my business: https://graysontowncar.com/. It’s built with Django, and I’m constantly working to improve it.

Right now, users can:

Make reservations through the site,
Choose to pay upfront or save their card on file to pay later (secured through Stripe),
Receive automatic email confirmations after booking.

On the backend, I can view, edit, and manage reservations through the Django admin dashboard. So far, everything driver-related is still manual. I don’t have a separate app or dashboard for drivers yet.

My next big goals:

Implement driver assignment for reservations,
Let drivers filter and view their upcoming pickups by date,
Build a dispatcher dashboard to help manage all of this in a more automated way.

If you know of any open source projects with similar features users assignments, dispatch systems, etc., I’d really appreciate any recommendations. I’m also open to any feedback on the site itself or the code (GitHub repo: https://github.com/AbdallaXO/grayson-towncar.

Thanks!

/r/django
https://redd.it/1k37fro
Should there be a convention for documenting whether method mutates object?

I believe that it would be a good thing if some conventions were established to indicate in documentation whether a method mutates the object. It would be nice if it were something easy to add to docstrings, and would be easily visible in the resulting docs without being verbose or distracting.

While one could organize the documention in something like Sphinx to list methods separately, that doesn't help for those seeing the method docs within an IDE, which is typically more useful.

Naming convensions as we see in sort v sorted and reverse v reversed based on verb v participle/adjective is not something we can expect people to follow except where they have pairs of method.

There will be a high correleation between return type of None and mutation, and perhaps that will have to suffice. But I think it is worth discussing whether we can do better.

If I better understood the doctring processing and how flags can be added to restructedText, I might be able to offer a more concrete proposal as a starting point for discussion. But I don't so I can't.

/r/Python
https://redd.it/1k34dtv
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/1k39vt8
What do you think of version 2.0 of my Django portfolio?

Hey everyone!

I just finished version 2.0 of my personal portfolio using Django -> eriktaveras.com

I'm a backend dev and wanted something simple but functional to show my Python/Django skills. The project has several apps:

blog: For articles and content
cobros: Payment management system
core: Central utilities and shared functionality
resources: Additional resource management

I implemented custom authentication, REST APIs for some components, and a couple of middlewares for specific features. I also had fun working with templates and the admin system.

Would you take a look and let me know what you think? I'm especially interested in:

Is it easy to navigate?
Is anything important missing?
What would you add to better showcase Django skills?
Should I show more code or internal structure?

This is the second version of my site and I wanted to improve a lot from the first one. Any advice or feedback is greatly appreciated.

Thanks!

/r/django
https://redd.it/1k3chha
Notes running Python in production

I have been using Python since the days of Python 2.7.

Here are some of my detailed notes and actionable ideas on how to run Python in production in 2025, ranging from package managers, linters, Docker setup, and security.

/r/Python
https://redd.it/1k3fase
[P] F1 Race Prediction Model for the 2025 Saudi Arabian GP – Building on My Shanghai & Suzuka Forecasts

Over the past few weeks, I’ve been working on a small project to predict Formula 1 race results using real-world data and simple, interpretable models. I started with the **2025 Shanghai GP**, refined it for **Suzuka**, and now I’ve built out predictions for the **Saudi Arabian GP in Jeddah**.

The idea has been to stay consistent and improve week by week — refining features, visuals, and prediction logic based on what I learn.

# How It Works:

The model uses:

* **FastF1** to pull real 2022–2025 data (including qualifying)
* Driver form: average position, pace, recent results
* **Saudi-specific metrics**: past performance at Jeddah, grid/finish delta
* Custom features like average position change and experience at the track

No deep learning here — I opted for a **hand-crafted weighted formula** over a Random Forest baseline for transparency and speed. It’s been a fun exercise in feature engineering and understanding what actually predicts performance.

# Visualizations:

* Predicted finishing order with expected points
* Podium probability for top drivers
* Grid vs predicted finish (gain/loss analysis)
* Team performance and driver consistency
* Simple Jeddah circuit map showing predicted top 5

# Why I’m Doing This:

I wanted to learn ML, and combining it with my love for F1 made the process way more enjoyable. Turns out,

/r/MachineLearning
https://redd.it/1k3hcnp
Are there any startups that use flask on the backend and react on the frontend?

Was wondering if this stack along with db and other tech needed as I go would suffice for an mvp of an idea I have. What companies are using flask primarily as their backend? When will it be time to upgrade? How comparable is flask performance in comparison to the alternatives?

/r/flask
https://redd.it/1k3jqdq
Your thoughts on continuation backslashes? Best practices?

I've got sort of a stylistic-conventions question here. I've been trying to eliminate uses of backslashes as line-continuances wherever my lines of code are too long to fit in my preferred width, but sometimes I'm not sure what to do.

For example, instead of writing:

foo = long line of stuff + \
more stuff + \
yay more stuff

Python lets us write:

foo = (long line of stuff +
more stuff +
yay more stuff)

or:

foo = (
long line of stuff +
more stuff +
yay more stuff
)

so I've been trying to do that, per PEP 8 recommendations, and the parentheses trick works for all sorts of expressions from summations to concatenated string literals to ternary operators.

But what if something is just a simple assignment that's too

/r/Python
https://redd.it/1k376gg
Live Website Deployment

I'm doing a chatbot for a certain hackathon, and they said they want the site live. So I fully developed it alone using, Bootstrap, CSS, JavaScript, Python and of course HTML. Its working on my machine fine, using a MySQL local server, and everything is working properly with each other. Integration is fine. My question is how do I deploy this website. I've never done anything of the sort before, outside of a simple static github page. Please HELP.

/r/flask
https://redd.it/1k3oqlu
GhostHub – Flask media server with real-time chat, swipe nav, and one-click sharing

GhostHub is a self-hosted, mobile-first media server built with Flask. It’s designed to be super easy to spin up, either via Docker or a standalone Windows .exe, with no account system, database, or config files needed.

What It Does

You point it at a media folder and go. It gives you:

• A TikTok-style swipe interface for browsing media
• Real-time chat via WebSockets
• Optional sync mode (the host controls what’s being viewed)
• Lazy loading, intelligent caching, and smooth performance even on mobile

Great for quickly sharing a folder with friends via Cloudflare Tunnel or LAN, especially on mobile.

Target Audience

This isn’t meant for production — it’s more of a “boot it, use it, lose it” tool. Ideal for devs, tinkerers, or anyone who wants to share videos or photos without uploading them to the cloud or managing a heavy server setup.

Comparison

Compared to something like Jellyfin or Plex, GhostHub is:

• Way more lightweight
• Requires zero setup or user accounts
• Built for short-term, throwaway use
• Optimized for mobile and single-user simplicity, not full-featured media libraries

Here’s the repo: https://github.com/BleedingXiko/GhostHub
Feedback, suggestions, or ideas are always welcome.

/r/Python
https://redd.it/1k3t942
The Complete Flask Rest Api Python Guide

Hey, I have made a guide about building rest apis in python with flask, it starts from the basics and covers the crud operations.

In the guide we use Sql with Postgres, and threading is also involved.

I would love to share it in case any one is interested.

The link is: https://youtu.be/QYhxntIScxI?si=6VDCriYEDBjOYzc4

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