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
Dynamic Forms builder for admins

Hi! It's my first time developing a personal project using Flask and MySQL to manage medical records for patients, and I'm using HTML, CSS with Bootstrap for the frontend. Here's what I thought:

* An administrator creates dynamic forms with custom fields and makes them available to the doctors. Then, the doctors can use these forms for their patients in the future. For example: Create a new form → question 1 title → type of answer (number, text, date, etc.) → add as many questions as needed → save the form → it becomes available for doctors to use.
* Doctors will be able to select which form to use for each patient.
* When a patient returns, doctors should be able to **edit** the records associated with that form.

I already have the database tables (I can share them if that helps you understand the structure).
I’ve seen some React projects that look interesting, but I’ve never used React before. That’s why I’d prefer to stick with Flask if it’s the best option for now.

What do you recommend? Is there a plugin for Flask or another technology I should consider?

Thank you!

/r/flask
https://redd.it/1kr3kze
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/1krk3ef
Why even use Flask when FastAPI exists?

Why still use Flask when FastAPI can do everything Flask does and more with less effort?

FastAPI gives you modern Python features by default: async support without hacks, automatic request validation using type hints, and OpenAPI documentation generated instantly. You don’t need to reach for third-party libraries to get input validation, serialization, or proper HTTP error handling they're first-class citizens. You get data parsing, input constraints, and clear API contracts with almost no boilerplate.

Flask, on the other hand, makes you build all of that yourself. It’s flexible, yes, but that flexibility often means reinventing wheels that FastAPI gives you for free. Want JSON schema validation in Flask? You choose and integrate a library. Want async? Be careful Flask's async support is still evolving and lacks the maturity of FastAPI’s. Want type safety and editor support? Good luck.

So for new projects, what’s the argument in favor of Flask? Legacy familiarity? A massive plugin ecosystem that you now have to glue together yourself? Isn’t it time we stop treating Flask’s simplicity as a strength when it just leads to more work?

If you’re still choosing Flask in 2025, what’s the compelling reason? What does it actually do better?

/r/flask
https://redd.it/1kr317a
Modern Python Boilerplate - good package basic structure

*TL;DR: Python Boilerplate repo for fast package building with all best practices* 

Hello,

I wanted to share a small repository I made named “Modern Python Boilerplate”. I created it because I saw in multiple projects including in professional environnement, the lack of good structure and practice, leading to ugly code or even non-functional, environnement mess…

* **What My Project Does**

The goal is to provide a python repository setup that provides all the best good-practices tool available and pre-configure them. It makes it easy to build and publish python package !

**The link is here** [**https://github.com/lambda-science/modern-python-boilerplate**](https://github.com/lambda-science/modern-python-boilerplate)

* **Comparison** (A brief comparison explaining how it differs from existing alternatives.)

It include modern python management (structure, packaging, version and deps w/ UV), modern CI (listing, formatting, type checking, testing, coverage, pre-commit hooks w/ Ruff/Ty), documentation (automatic API Reference building and publishing on Github/Gitlab w/ Mkdocs) and running (basic Dockerfile, Makefile, DevContainer tested on Pycharm, module running as a terminal command…)

* **Target Audience** (e.g., Is it meant for production, just a toy project, etc.)

Anyone building anything in Python that is starting a new project or try to modernize an existing one


Don’t hesitate to share feedback or comments on this, what could be improved.

I heard for example that some people

/r/Python
https://redd.it/1krsxut
Django tip Customize Your Django Admin with django-unfold

/r/django
https://redd.it/1kruwht
Meet OctaProbe - Yet another security assessment tool

Hey guys, I made this tool for my final year computer science project!

Built entirely using Python, and Streamlit

What My Project Does:

Enables even a layman to use advanced security toolset, like generating file checksums, verifying file integrity, chat with a tailored AI assistant, interact with external APIs, perform security scanning on networked devices, etc.

Target Audience:

Designed for students, computer security enthusiasts and cybersecurity analysts

Check out the presentation on Youtube: https://youtu.be/r6W2UaIsYzw?si=EzCQ3B71sSZpZT14

Link to source: https://github.com/NONAN23x/Octaprobe.git

Try out the demo app: https://octaprobe.streamlit.app/

/r/Python
https://redd.it/1ks0gs4
Django Admin/YouNameIt for frontend development?

Hi all,

As sysadmin and freelancer I am trying to find something that makes my life easier in the development of applications while having a nice look and feel for the application's frontend but also flexible to fullfill any project requirement.

Despite I know angular, I want to keep myself as far as possible from any "pure frontend framework" (react, angular, svelte, vue, etc).

I had a look to django unfold, jazzmin, jet, grapelly, adminlte, and some others but even when they usually fit most of the standard application usages, seems there is a consensous that use them as the frontend of your applications a very bad idea (eventhough I am using carefully the standard user/group/perms to restrict usage).

There is anything out there like those admin/templates that can be used confidently as a framework for my applications and help me improve my delivery times?

As an extra I would like to understand what are those good reasons why them are not recommended for frontend usage.

/r/django
https://redd.it/1ks1skr
Just launched Davia — like Lovable, but wired straight into your Python FastAPI backend

Hello,

I wanted to share a project I've working on that's called davia ai. I created it because I build all kinds of things with Python : functions, algorithms, bits of logic that do something useful. But then comes the hard part as a Python dev: letting other people actually use them - creating a frontend.

* **What My Project Does**

davia empowers developers to transform their Python applications—especially AI agents and internal tools—into interactive web apps with a dev mode on your local machine made for Python folks like us. The package integrates seamlessly with FastAPI, so all your existing endpoints, middleware, and practices still apply.

**The link is here** [https://github.com/davialabs/davia](https://github.com/davialabs/davia)

* **Comparison** (A brief comparison explaining how it differs from existing alternatives.)

**Streamlit / Gradio:** Great for quick ML demos but limited in flexibility—Davia gives you real FastAPI power with just as much ease.
**Flask / Django:** Powerful but heavy; Davia offers a lighter, faster path from Python script to full app without boilerplate.

* **Target Audience** (e.g., Is it meant for production, just a toy project, etc.)

Anyone building in Python that wants to create an appealing frontend.

Would love your feedbacks or comments on this, what could be improved.


Best,

/r/Python
https://redd.it/1ks1gck
I published my first official Python package RIDE-CLI that lets you analyze your CSV in the terminal

Hey everyone,

Recently, I published my first-ever Python package, and it's open source. It's called ride-cli - command-line tool for data analysis that lets you perform data preprocessing, exploration, and machine learning without writing any code.

### What my project does
- Menu Driven Interactive Interface: User-friendly terminal interface for data analysis
- Data Loading: Support for CSV, Excel, and Parquet files
- Data Exploration: Comprehensive statistical analysis and visualization
- Data Preprocessing: Missing value imputation, feature scaling, encoding
- AutoML: Automatic model selection and evaluation
- Visualization: Terminal-based histogram and scatter plots
- Export Options: Save processed data in multiple formats

### Why Did I create it?

In 2023, I took a statistical investigation class in my university and part of the course was to test multiple CSV files to basic info such as metadata, Descriptive stats, Summary stats, and perform Data Preprocessing for further analysis. I was tired of writing redundant code that's when I decided to write the code where I can just plug the csv files and get all the info displayed directly to me from the terminal. Suddenly most of my classmates wanted to use the same code. That's when I decided to write a package where I can use terminal flags to interact with the

/r/Python
https://redd.it/1kri32f
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/1ksd1ba
Flask app gives HTTP 403

Flask app gives HTTP 403 Forbidden on localhost (127.0.0.1:5000) – why?

I'm running a simple Flask app on my Mac using:

bashKopiérRedigerpython app.py


It starts normally, no errors in terminal. But when I open `http://127.0.0.1:5000` in my browser (Chrome or Safari), I get:

403 Forbidden – You don’t have permission to view this page.

I've disabled macOS firewall and checked that Bitdefender is not blocking anything. The app uses app.run(debug=True) and has worked before.

Why would a local Flask app return a 403 error like this? What else could block access to localhost?

/r/flask
https://redd.it/1ks2l81
D Google already out with a Text- Diffusion Model

Not sure if anyone was able to give it a test but Google released Gemeni Diffusion, I wonder how different it is from traditional (can't believe we're calling them that now) transformer based LLMs, especially when it comes to reasoning. Here's the announcement:

https://blog.google/technology/google-deepmind/gemini-diffusion/


/r/MachineLearning
https://redd.it/1ksdn9b
doc2dict: parse documents into dictionaries fast

What my project does

Converts html and pdf files into dictionaries preserving the human visible hierarchy. For example, here's an excerpt from Microsoft's 10-K.

"37": {
            "title": "PART I",
            "standardizedtitle": "parti",
            "class": "part",
            "contents": {
                "38": {
                    "title": "ITEM 1. BUSINESS",
                    "standardized
title": "item1",
                    "class": "item",
                    "contents": {
                        "39": {
                            "title": "GENERAL",
                         

/r/Python
https://redd.it/1ksgnmb
Computer for app development

Appreciating any recommendation/insights on buying a computer that is suitable for developing an app. This is a new area for me. I tried using Dell XPS with 16 GB RAM and WSL2. It was not workable. At one point, I was able to install a Android virtual device (AVD) on the Android Emulator using Android Studio, but it was way too slow to do anything. My app won't even load up. My computer does meet the recommended specs for such task, at least based on my research. Not sure the problem was on my setup or the computer. Has anyone used MacBook with 16GB RAM to do something similar? Want to get a computer that will work. Thanks.

/r/flask
https://redd.it/1krzeul
How do I annotate the results of a Django query set before filters are applied?

I have a table. I want to annotate each value in the table with a relative ordering based on a \`created\` field. I then want to further filter the table, but I want to \*preserve\* the original annotation. So for example, if something is created second, it should remain annotated as second even if additional filters are applied.

The desired SQL I want to produce is something like the following:

SELECT
"my_table"."id",
numbered_subquery.number
FROM
"my_table"
INNER JOIN (
SELECT
id,
ROW_NUMBER() OVER (ORDER BY U0."created") AS "number"
FROM "app_test" U0
WHERE (
AND U0."org" = 'xxx'
)


/r/django
https://redd.it/1ksgofq
Do you really use redis-py seriously?

I’m working on a small app in Python that talks to Redis, and I’m using redis-py, what I assume is the de facto standard library for this. But the typing is honestly a mess. So many return types are just Any, Unknown, or Awaitable[T] | T. Makes it pretty frustrating to work with in a type-safe codebase.

Python has such a strong ecosystem overall that I’m surprised this is the best we’ve got. Is redis-py actually the most widely used Redis library? Are there better typed or more modern alternatives out there that people actually use in production?

/r/Python
https://redd.it/1ksicim
I made Model Version Control Protocol for AI agents

I've been working on MVCP (Model Version Control Protocol), inspired by the Model Context Protocol (MCP), a lightweight Git-compatible tool designed specifically for AI agents to track their progress during code transformations, built using Python.

What my project does?

MVCP creates a unified, human-readable system for AI agents to save, restore, and diff checkpoints as they transform code. Think of it as specialized version control that works alongside Git, optimized for LLM-based coding assistants.

Key features:

Save checkpoints with metadata like which tools were used

Restore to previous checkpoints when things go wrong

Compare diffs between agent steps

MCP-compatible API for direct AI agent tool calling

What makes it special:

MVCP enables multiple AI agents to collaborate on the same codebase while maintaining a clear audit trail of who did what. This is particularly useful for autonomous development workflows where multiple specialized agents (coders, testers, reviewers, etc.) work toward building a repo together.All feedback welcome! The repo is open for contributions too and its under the MIT license

Target Audience:

AI agents and developers who use them

Its very early in development so please take it easy on me haha :D

Link To Repository: https://github.com/evangelosmeklis/mvcp

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