Need some help with developing an algorithm with python
Hey guy's I've written a pseudocode which outline the factors + weightings for a basic algorithm which pairs an audio file with others that sound similar in terms of popularity, mood, genre etc...
Problem is I don't know python. I'm a front end dev.
Happy to pay up to $4000+ for it to get done and I'm also happy to increase my budget if you have the right experience.
The finished product needs to be near PERFECT though. Pls shoot me an email - admin@outreachaddict.com but make sure to share your past experience. Show off some of the other algorithms you've written.
/r/django
https://redd.it/1kq6fcy
Hey guy's I've written a pseudocode which outline the factors + weightings for a basic algorithm which pairs an audio file with others that sound similar in terms of popularity, mood, genre etc...
Problem is I don't know python. I'm a front end dev.
Happy to pay up to $4000+ for it to get done and I'm also happy to increase my budget if you have the right experience.
The finished product needs to be near PERFECT though. Pls shoot me an email - admin@outreachaddict.com but make sure to share your past experience. Show off some of the other algorithms you've written.
/r/django
https://redd.it/1kq6fcy
Reddit
From the django community on Reddit
Explore this post and more from the django community
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/1kqr53x
# 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/1kqr53x
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
R Q Why does RoPE need to be decoupled in DeepSeek V2/V3's MLA? I don't get why it prevents prefix key reuse
TL;DR: I'm trying to understand why RoPE needs to be decoupled in DeepSeek V2/V3's MLA architecture. The paper says standard RoPE is incompatible with low-rank KV compression because it prevents “absorbing” certain projection matrices and forces recomputation of prefix keys during inference. I don’t fully understand what "absorption" means here or why RoPE prevents reuse of those keys. Can someone explain what's going on under the hood?
I've been digging through the DeepSeek papers for a couple of days now and keep getting stuck on this part of the architecture. Specifically, in the V2 paper, there's a paragraph that says:
>However, RoPE is incompatible with low-rank KV compression. To be specific, RoPE is position-sensitive for both keys and queries. If we apply RoPE for the keys
I kind of get that RoPE ties query/key vectors to specific positions, and that it has to be
/r/MachineLearning
https://redd.it/1kqq26d
TL;DR: I'm trying to understand why RoPE needs to be decoupled in DeepSeek V2/V3's MLA architecture. The paper says standard RoPE is incompatible with low-rank KV compression because it prevents “absorbing” certain projection matrices and forces recomputation of prefix keys during inference. I don’t fully understand what "absorption" means here or why RoPE prevents reuse of those keys. Can someone explain what's going on under the hood?
I've been digging through the DeepSeek papers for a couple of days now and keep getting stuck on this part of the architecture. Specifically, in the V2 paper, there's a paragraph that says:
>However, RoPE is incompatible with low-rank KV compression. To be specific, RoPE is position-sensitive for both keys and queries. If we apply RoPE for the keys
k_Ct, W_UK in Equation 10 will be coupled with a position-sensitive RoPE matrix. In this way, W_UK cannot be absorbed into W_Q any more during inference, since a RoPE matrix related to the currently generating token will lie between W_Q and W_UK and matrix multiplication does not obey a commutative law. As a result, we must recompute the keys for all the prefix tokens during inference, which will significantly hinder the inference efficiency.I kind of get that RoPE ties query/key vectors to specific positions, and that it has to be
/r/MachineLearning
https://redd.it/1kqq26d
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Why does the mysqldb shows error in flask but not in the terminal?
I am trying to run a piece of code that is already functioning in a server for a very long time. I have to make some updates to the code so I was trying to make the program work in my PC.
But I tried many things, including reinstalling packages and even making a local DB in my PC instead of connecting to the cloud DB but it still shows the same cursor error.
cursor = mysql.connection.cursor()
AttributeError: 'NoneType' object has no attribute 'cursor'
The flask application is pretty small
from flask import Flask
from flask_mysqldb import MySQL
app = Flask(__name__)
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = 'my_password'
app.config['MYSQL_DB'] = 'flask_app'
mysql = MySQL(app)
@app.route('/login')
def login_page():
cursor = mysql.connection.cursor()
print(cursor)
The version of packages and python is
Python 3.9.6
Name: Flask
Version: 2.0.2
Name: Flask-MySQLdb
Version: 2.0.0
mysql_config --version
9.3.0
Any help on fixing this is appreciated.
/r/flask
https://redd.it/1kqkg2w
I am trying to run a piece of code that is already functioning in a server for a very long time. I have to make some updates to the code so I was trying to make the program work in my PC.
But I tried many things, including reinstalling packages and even making a local DB in my PC instead of connecting to the cloud DB but it still shows the same cursor error.
cursor = mysql.connection.cursor()
AttributeError: 'NoneType' object has no attribute 'cursor'
The flask application is pretty small
from flask import Flask
from flask_mysqldb import MySQL
app = Flask(__name__)
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = 'my_password'
app.config['MYSQL_DB'] = 'flask_app'
mysql = MySQL(app)
@app.route('/login')
def login_page():
cursor = mysql.connection.cursor()
print(cursor)
The version of packages and python is
Python 3.9.6
Name: Flask
Version: 2.0.2
Name: Flask-MySQLdb
Version: 2.0.0
mysql_config --version
9.3.0
Any help on fixing this is appreciated.
/r/flask
https://redd.it/1kqkg2w
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
PEP 791 – imath — module for integer-specific mathematics functions
# PEP 791 – imath — module for integer-specific mathematics functions
https://peps.python.org/pep-0791/
# Abstract
This PEP proposes a new module for number-theoretical, combinatorial and other functions defined for integer arguments, like `math.gcd()` or `math.isqrt()`.
# Motivation
The `math` documentation says: “This module provides access to the mathematical functions defined by the C standard.” But, over time the module was populated with functions that aren’t related to the C standard or floating-point arithmetics. Now it’s much harder to describe module scope, content and interfaces (returned values or accepted arguments).
For example, the `math` module documentation says: “Except when explicitly noted otherwise, all return values are floats.” This is no longer true: None of the functions listed in the Number-theoretic functions subsection of the documentation return a float, but the documentation doesn’t say so. In the documentation for the proposed
Apparently, the `math` module can’t serve as a catch-all place for mathematical functions since we also have the `cmath` and `statistics` modules. Let’s do the same for integer-related functions. It provides shared context, which
/r/Python
https://redd.it/1kqrqgb
# PEP 791 – imath — module for integer-specific mathematics functions
https://peps.python.org/pep-0791/
# Abstract
This PEP proposes a new module for number-theoretical, combinatorial and other functions defined for integer arguments, like `math.gcd()` or `math.isqrt()`.
# Motivation
The `math` documentation says: “This module provides access to the mathematical functions defined by the C standard.” But, over time the module was populated with functions that aren’t related to the C standard or floating-point arithmetics. Now it’s much harder to describe module scope, content and interfaces (returned values or accepted arguments).
For example, the `math` module documentation says: “Except when explicitly noted otherwise, all return values are floats.” This is no longer true: None of the functions listed in the Number-theoretic functions subsection of the documentation return a float, but the documentation doesn’t say so. In the documentation for the proposed
imath module the sentence “All return values are integers.” would be accurate. In a similar way we can simplify the description of the accepted arguments for functions in both the `math` and the new module.Apparently, the `math` module can’t serve as a catch-all place for mathematical functions since we also have the `cmath` and `statistics` modules. Let’s do the same for integer-related functions. It provides shared context, which
/r/Python
https://redd.it/1kqrqgb
Python Enhancement Proposals (PEPs)
PEP 791 – intmath — module for integer-specific mathematics functions | peps.python.org
This PEP proposes a new module for number-theoretical, combinatorial and other functions defined for integer arguments, like math.gcd() or math.isqrt().
Django CMS vs Django Wagtail?
We're building a headless API using Django. Most of our application doesn't require a CMS — it's primarily about managing structured data via the Django admin. However, for marketing and sales pages, we need to give non-technical users (like marketers or content creators) the ability to:
Create custom pages for products
Move and reorder content blocks (flexible layouts)
Duplicate pages or sections
Reuse existing structured data like testimonials, teacher bios, product metadata, etc.
The idea is:
1. We create a Product in the Django admin, filling out all necessary metadata (e.g. delivery info, pricing, etc.).
2. Then, we want to create sales/landing pages for that product, possibly multiple variations, that can pull in and reuse the structured metadata.
# The Question:
Given the above, which CMS is a better fit: Django CMS or Wagtail?
/r/django
https://redd.it/1kqubqw
We're building a headless API using Django. Most of our application doesn't require a CMS — it's primarily about managing structured data via the Django admin. However, for marketing and sales pages, we need to give non-technical users (like marketers or content creators) the ability to:
Create custom pages for products
Move and reorder content blocks (flexible layouts)
Duplicate pages or sections
Reuse existing structured data like testimonials, teacher bios, product metadata, etc.
The idea is:
1. We create a Product in the Django admin, filling out all necessary metadata (e.g. delivery info, pricing, etc.).
2. Then, we want to create sales/landing pages for that product, possibly multiple variations, that can pull in and reuse the structured metadata.
# The Question:
Given the above, which CMS is a better fit: Django CMS or Wagtail?
/r/django
https://redd.it/1kqubqw
Reddit
From the django community on Reddit
Explore this post and more from the django community
PostGres connections running out with Azure
I am using AzureStorage for the backend of my django app. I thus have the following settings:
DATABASES = {
"default": {
"NAME": "compliancebotdbdjango",
"ENGINE": "django.db.backends.postgresql",
"TOKEN": DefaultAzureCredential().gettoken("https://database.windows.net/.default"),
"USER": os.environ"POSTGRES_USER",
"PASSWORD": os.environ"POSTGRES_PASSWORD",
"HOST": os.environ"POSTGRES_SERVER",
"PORT": "5432",
"CONNMAXAGE": 10,
"CONNHEALTHCHECKS": True,
/r/djangolearning
https://redd.it/1kqfz8u
I am using AzureStorage for the backend of my django app. I thus have the following settings:
DATABASES = {
"default": {
"NAME": "compliancebotdbdjango",
"ENGINE": "django.db.backends.postgresql",
"TOKEN": DefaultAzureCredential().gettoken("https://database.windows.net/.default"),
"USER": os.environ"POSTGRES_USER",
"PASSWORD": os.environ"POSTGRES_PASSWORD",
"HOST": os.environ"POSTGRES_SERVER",
"PORT": "5432",
"CONNMAXAGE": 10,
"CONNHEALTHCHECKS": True,
/r/djangolearning
https://redd.it/1kqfz8u
Django Multi Language
Hi Everyone,
need suggestion for https://rohanyeole.com for translating entire site in multi languages.
I'm looking into URL
likedomain-url/en/
domain-url/vi/blog-slug
and so on.
is there way to do it without po files.
/r/djangolearning
https://redd.it/1kojekc
Hi Everyone,
need suggestion for https://rohanyeole.com for translating entire site in multi languages.
I'm looking into URL
likedomain-url/en/
domain-url/vi/blog-slug
and so on.
is there way to do it without po files.
/r/djangolearning
https://redd.it/1kojekc
https://rohanyeole.com
Freelance Python Coder & Django Coder – Remote/Full-Time Roles
I’m a skilled Python & Django coder ready for freelance or remote full-time projects. Check
out my work and let’s discuss your next web app!
out my work and let’s discuss your next web app!
Frontend
I need a frontend for my drf project, want to try react, but I'll have to learn JS, is there any other framework which is easier to learn or I can nitpick on the JS fundamental to work with react? I have no intention of being a full stack dev.
/r/django
https://redd.it/1kra4bx
I need a frontend for my drf project, want to try react, but I'll have to learn JS, is there any other framework which is easier to learn or I can nitpick on the JS fundamental to work with react? I have no intention of being a full stack dev.
/r/django
https://redd.it/1kra4bx
Reddit
From the django community on Reddit
Explore this post and more from the django community
What Feature Do You Wish Python Had?
What feature do you wish Python had that it doesn’t support today?
Here’s mine:
I’d love for Enums to support payloads natively.
For example:
from enum import Enum
from datetime import datetime, timedelta
class TimeInForce(Enum):
GTC = "GTC"
DAY = "DAY"
IOC = "IOC"
GTD(d: datetime) = d
d = datetime.now() + timedelta(minutes=10)
tif = TimeInForce.GTD(d)
So then the TimeInForce.GTD variant would hold the datetime.
This would make pattern matching with variant data feel more natural like in Rust or Swift.
Right now you can emulate this with class variables or overloads, but it’s clunky.
What’s a feature you want?
/r/Python
https://redd.it/1kr0dnr
What feature do you wish Python had that it doesn’t support today?
Here’s mine:
I’d love for Enums to support payloads natively.
For example:
from enum import Enum
from datetime import datetime, timedelta
class TimeInForce(Enum):
GTC = "GTC"
DAY = "DAY"
IOC = "IOC"
GTD(d: datetime) = d
d = datetime.now() + timedelta(minutes=10)
tif = TimeInForce.GTD(d)
So then the TimeInForce.GTD variant would hold the datetime.
This would make pattern matching with variant data feel more natural like in Rust or Swift.
Right now you can emulate this with class variables or overloads, but it’s clunky.
What’s a feature you want?
/r/Python
https://redd.it/1kr0dnr
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Learning Machine Learning and Data Science? Let’s Learn Together!
I’m currently diving into the exciting world of machine learning and data science. If you’re someone who’s also learning or interested in starting, let’s team up!
We can:
Share resources and tips
Work on projects together
Help each other with challenges
Doesn’t matter if you’re a complete beginner or already have some experience. Let’s make this journey more fun and collaborative. Drop a comment or DM me if you’re in!
/r/Python
https://redd.it/1kr8cvg
I’m currently diving into the exciting world of machine learning and data science. If you’re someone who’s also learning or interested in starting, let’s team up!
We can:
Share resources and tips
Work on projects together
Help each other with challenges
Doesn’t matter if you’re a complete beginner or already have some experience. Let’s make this journey more fun and collaborative. Drop a comment or DM me if you’re in!
/r/Python
https://redd.it/1kr8cvg
Reddit
From the Python community on Reddit: Learning Machine Learning and Data Science? Let’s Learn Together!
Posted by Rockykumarmahato - 29 votes and 13 comments
Updated from 3.x to 5.2, now I'm getting "Obj matching query does not exist"
I'm using Django in a non-Django project purely to make my unit tests easier. I've defined all my models like this:
class Bar(models.Model):
internaltype = models.TextField(...)
...
class Meta:
managed = False
dbtable = 'myschema\".\"bar'
class Foo(models.Model):
...
bar = models.ForeignKey('Bar', models.DONOTHING, dbcolumn='bar', blank=True, null=True)
class Meta:
managed = False
dbtable = 'myschema\".\"foo'
This looks funky, but it was working perfectly fine on Django 3.2. It allowed me to write tests like this:
def testfoo(self):
/r/django
https://redd.it/1krjrck
I'm using Django in a non-Django project purely to make my unit tests easier. I've defined all my models like this:
class Bar(models.Model):
internaltype = models.TextField(...)
...
class Meta:
managed = False
dbtable = 'myschema\".\"bar'
class Foo(models.Model):
...
bar = models.ForeignKey('Bar', models.DONOTHING, dbcolumn='bar', blank=True, null=True)
class Meta:
managed = False
dbtable = 'myschema\".\"foo'
This looks funky, but it was working perfectly fine on Django 3.2. It allowed me to write tests like this:
def testfoo(self):
/r/django
https://redd.it/1krjrck
Reddit
From the django community on Reddit
Explore this post and more from the django community
Speeding up testing with cursor
I have been building in django since before cursor / co-pilot days. The speed I can now develop and deploy is insane compared to the "old" days. The only area that still feels slow and clunky is writing test scripts. Even when I write really long contexts and attach endless files, the output is pretty crap. What am I missing? All tips and tricks much appreciated
/r/django
https://redd.it/1krajqu
I have been building in django since before cursor / co-pilot days. The speed I can now develop and deploy is insane compared to the "old" days. The only area that still feels slow and clunky is writing test scripts. Even when I write really long contexts and attach endless files, the output is pretty crap. What am I missing? All tips and tricks much appreciated
/r/django
https://redd.it/1krajqu
Reddit
From the django community on Reddit
Explore this post and more from the django community
I'm Building With Flask. It's Pretty Good.
I just wanted to share my experience building with Flask. I only remember using it from tutorials at my High School, so I only knew the basics of what it did.
Now a few years into college with a plan to freelance. I wanted to make a simple app that would help me get potential clients because I thought it would be fun to develop and I was too lazy to go through the process of finding clients. I usually use django in these projects, but I figured it would be much simpler developing with Flask and I gave it a try.
It turns out it was much easier than I thought. While things aren't as straightforward with django, implementing things felt much more simple. I'm almost done with my app, but I'm likely going to add more features to it as I develop it.
TLDR ; Made project with Flask, Flask cool, Flask simple
/r/flask
https://redd.it/1kr84wc
I just wanted to share my experience building with Flask. I only remember using it from tutorials at my High School, so I only knew the basics of what it did.
Now a few years into college with a plan to freelance. I wanted to make a simple app that would help me get potential clients because I thought it would be fun to develop and I was too lazy to go through the process of finding clients. I usually use django in these projects, but I figured it would be much simpler developing with Flask and I gave it a try.
It turns out it was much easier than I thought. While things aren't as straightforward with django, implementing things felt much more simple. I'm almost done with my app, but I'm likely going to add more features to it as I develop it.
TLDR ; Made project with Flask, Flask cool, Flask simple
/r/flask
https://redd.it/1kr84wc
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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
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
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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
# 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
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
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
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
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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
*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