What is the point of CSRF for form validation?
Hello,
I am currently in the process of building a small app aiming to localy train small AI models. I keep seeing on the internet that desactivating the CSRF in forms is super dangerous, but is it if the app will be run localy only, and not have "sensitive" (ie account management) informations uploaded?
Right now I have forms to upload a project name and training files, I don't think I need CSRF for these?
Thanks in advance
/r/flask
https://redd.it/1oo94xx
Hello,
I am currently in the process of building a small app aiming to localy train small AI models. I keep seeing on the internet that desactivating the CSRF in forms is super dangerous, but is it if the app will be run localy only, and not have "sensitive" (ie account management) informations uploaded?
Right now I have forms to upload a project name and training files, I don't think I need CSRF for these?
Thanks in advance
/r/flask
https://redd.it/1oo94xx
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Free Introductory Python Book (amongst others)
I recently discovered the wonderful collection of free textbooks made available by the openstax organisation (https://openstax.org/). There are many books available covering a wide range of disciplines but there’s one in particular that may be of interest to redditors here, namely Introduction to Python Programming: https://openstax.org/details/books/introduction-python-programming
Another notable example is Principles of Data Science: https://openstax.org/details/books/principles-data-science
There are many others including texts on mathematics and computer science.
/r/Python
https://redd.it/1op1ghd
I recently discovered the wonderful collection of free textbooks made available by the openstax organisation (https://openstax.org/). There are many books available covering a wide range of disciplines but there’s one in particular that may be of interest to redditors here, namely Introduction to Python Programming: https://openstax.org/details/books/introduction-python-programming
Another notable example is Principles of Data Science: https://openstax.org/details/books/principles-data-science
There are many others including texts on mathematics and computer science.
/r/Python
https://redd.it/1op1ghd
openstax.org
OpenStax | Free Textbooks Online with No Catch
OpenStax offers free college textbooks for all types of students, making education accessible & affordable for everyone. Browse our list of available subjects!
Django security releases issued: 5.2.8, 5.1.14, and 4.2.26
https://www.djangoproject.com/weblog/2025/nov/05/security-releases/
/r/django
https://redd.it/1op4sb0
https://www.djangoproject.com/weblog/2025/nov/05/security-releases/
/r/django
https://redd.it/1op4sb0
Django Project
Django security releases issued: 5.2.8, 5.1.14, and 4.2.26
Posted by Natalia Bidart on Nov. 5, 2025
First event Django Day India is here - November 8, 2025
We’re excited to invite you to Django Day India 2025, the biggest Django community event in the country!
The schedule is now live, featuring talks on Django, Python, architecture, scalability, and open source from some of the most active contributors in the ecosystem.
Keynote Speakers:
Thibaud Colas — President, Django Software Foundation & Tech Lead at Torchbox
Sarah Abderemane — Vice President, Django Software Foundation & Software Engineer at Kraken Tech
Whether you’re building with Django daily or just passionate about web development, this is a great chance to learn, connect, and be part of India’s growing Django community
Tickets are closing tomorrow , so grab yours before they sell out!
tickets: https://konfhub.com/djangoday-india-2025
Official website: djangoday.in
Come for the code, stay for the community!
/r/django
https://redd.it/1op14p2
We’re excited to invite you to Django Day India 2025, the biggest Django community event in the country!
The schedule is now live, featuring talks on Django, Python, architecture, scalability, and open source from some of the most active contributors in the ecosystem.
Keynote Speakers:
Thibaud Colas — President, Django Software Foundation & Tech Lead at Torchbox
Sarah Abderemane — Vice President, Django Software Foundation & Software Engineer at Kraken Tech
Whether you’re building with Django daily or just passionate about web development, this is a great chance to learn, connect, and be part of India’s growing Django community
Tickets are closing tomorrow , so grab yours before they sell out!
tickets: https://konfhub.com/djangoday-india-2025
Official website: djangoday.in
Come for the code, stay for the community!
/r/django
https://redd.it/1op14p2
KonfHub
DjangoDay India 2025
DjangoDay India 2025 — The Premier Conference for Django Enthusiasts 🇮🇳Dates: 8th November 2025Venue: Scaler School of Technology, 14, 3rd cross, Para...
Looking for a Mentor
Hello Everyone,
I started learning Django today, I need a mentor, who can guide me in this Journey.
TIA.
/r/djangolearning
https://redd.it/1ooqqdb
Hello Everyone,
I started learning Django today, I need a mentor, who can guide me in this Journey.
TIA.
/r/djangolearning
https://redd.it/1ooqqdb
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Can anyone suggest me resources to learn django, need to make an ai chat ap with semantic search on chats
/r/djangolearning
https://redd.it/1oms8o8
/r/djangolearning
https://redd.it/1oms8o8
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Flask-Compress 1.22 released
2 releases were made recently to add support for streaming responses.
No more buffering the entire response to compress it, it now happens on the fly
/r/flask
https://redd.it/1op4w9f
2 releases were made recently to add support for streaming responses.
No more buffering the entire response to compress it, it now happens on the fly
/r/flask
https://redd.it/1op4w9f
GitHub
flask-compress/CHANGELOG.md at master · colour-science/flask-compress
Compress responses of your Flask application. Contribute to colour-science/flask-compress development by creating an account on GitHub.
Looking for Junior Backend Developer / Internship Opportunities (No Professional Experience Yet)
https://github.com/DimitarITZankov
/r/flask
https://redd.it/1oo5qwd
https://github.com/DimitarITZankov
/r/flask
https://redd.it/1oo5qwd
GitHub
DimitarITZankov - Overview
DimitarITZankov has 5 repositories available. Follow their code on GitHub.
Create a Flask app-website
Hi I am learning python and I would like to create a website using Flask like a personal page. How does it work? Do you know useful materials? How do I buy a domain? Should I buy it?
/r/flask
https://redd.it/1ondv3r
Hi I am learning python and I would like to create a website using Flask like a personal page. How does it work? Do you know useful materials? How do I buy a domain? Should I buy it?
/r/flask
https://redd.it/1ondv3r
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Best practice for Django PKs in 2025 - Auto-Incrementing or UUIDField?
I am wondering what the consensus is for a public website and if you should use Django's default auto-incrementing IDs or switch to using UUID4 as the primary key.
I've read arguments of both sides and am still not able to draw a conclusion.
I'm slowly settling on keep the PK as the Django auto-incrementing and adding separate UUID field that is a generated UUID4 value.
Thoughts?
import uuid
from django.db import models
from nanoid import generate
class Product(models.Model):
# Keep the default original Django auto-incrementing PK
# uuid4 for internal use and for distributed databases to work together
uuid = models.UUIDField(
default=uuid.uuid4,
editable=False,
db_index=True,
)
#
/r/django
https://redd.it/1opi4xl
I am wondering what the consensus is for a public website and if you should use Django's default auto-incrementing IDs or switch to using UUID4 as the primary key.
I've read arguments of both sides and am still not able to draw a conclusion.
I'm slowly settling on keep the PK as the Django auto-incrementing and adding separate UUID field that is a generated UUID4 value.
Thoughts?
import uuid
from django.db import models
from nanoid import generate
class Product(models.Model):
# Keep the default original Django auto-incrementing PK
# uuid4 for internal use and for distributed databases to work together
uuid = models.UUIDField(
default=uuid.uuid4,
editable=False,
db_index=True,
)
#
/r/django
https://redd.it/1opi4xl
Reddit
From the django community on Reddit
Explore this post and more from the django community
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/1opjo5c
# 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/1opjo5c
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
FastAPI’s creator on the framework’s popularity, FastAPI Cloud, self-taught developers, and more
Hi there! I’m a huge fan of FastAPI for its focus on developer experience. This year it became the most popular Python framework, which comes as no surprise.
Recently I had the chance to chat with Sebastián Ramírez, the creator of FastAPI. We talked about why it became so popular since its launch seven years ago, what’s next on the roadmap, FastAPI Cloud, the impact of the faster CPython initiative, and being a self-taught developer (yes, he’s self-taught!). We also talked about that famous tweet about companies asking for more years of experience with a framework than it’s even existed.
Sebastián was super nice, kind and humble. I didn't expect someone so popular to be so down-to-earth.
I think there are some useful takeaways here for other devs in this community, so I'm sharing the link below. I welcome any feedback for how I can make these interviews better.
https://youtu.be/iaDRYUQ0OMM
/r/Python
https://redd.it/1op2dut
Hi there! I’m a huge fan of FastAPI for its focus on developer experience. This year it became the most popular Python framework, which comes as no surprise.
Recently I had the chance to chat with Sebastián Ramírez, the creator of FastAPI. We talked about why it became so popular since its launch seven years ago, what’s next on the roadmap, FastAPI Cloud, the impact of the faster CPython initiative, and being a self-taught developer (yes, he’s self-taught!). We also talked about that famous tweet about companies asking for more years of experience with a framework than it’s even existed.
Sebastián was super nice, kind and humble. I didn't expect someone so popular to be so down-to-earth.
I think there are some useful takeaways here for other devs in this community, so I'm sharing the link below. I welcome any feedback for how I can make these interviews better.
https://youtu.be/iaDRYUQ0OMM
/r/Python
https://redd.it/1op2dut
The JetBrains Blog
The State of Python 2025: Trends and Survey Insights | The PyCharm Blog
Learn what 30,000 developers say about Python in 2025. Discover the latest survey stats, usage trends, and predictions to stay ahead in the Python world.
Cleanest way to handle a dummy or no-op async call with the return value already known?
Since there doesn't appear to be an async lambda, what's the cleanest way you've found to handle a batch of async calls where the number of calls are variable?
An example use case is that I have a variable passed into a function and if it's true, then I do an additional database look-up.
Real world code:
emails, confirmed = await asyncio.gather(
self._get_emails_for_notifications(),
(
self._get_notification_email_confirmed()
if exclude_unconfirmed_email
else asyncio.sleep(0, True)
),
)
if not emails or not confirmed:
raise NoPrimaryNotificationEmailError(self.user_id)
return emails[0]
Using a sleep feels icky. Is this really the best approach?
/r/Python
https://redd.it/1opdok1
Since there doesn't appear to be an async lambda, what's the cleanest way you've found to handle a batch of async calls where the number of calls are variable?
An example use case is that I have a variable passed into a function and if it's true, then I do an additional database look-up.
Real world code:
emails, confirmed = await asyncio.gather(
self._get_emails_for_notifications(),
(
self._get_notification_email_confirmed()
if exclude_unconfirmed_email
else asyncio.sleep(0, True)
),
)
if not emails or not confirmed:
raise NoPrimaryNotificationEmailError(self.user_id)
return emails[0]
Using a sleep feels icky. Is this really the best approach?
/r/Python
https://redd.it/1opdok1
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Nuttiest 1 Line of Code You have Seen?
Quality over quantity with chained methods, but yeah I'm interested in the maximum set up for the most concise pull of the trigger that you've encountered
/r/Python
https://redd.it/1ooysmw
Quality over quantity with chained methods, but yeah I'm interested in the maximum set up for the most concise pull of the trigger that you've encountered
/r/Python
https://redd.it/1ooysmw
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Is This Really a Jupyter Notebook? — Customizing Jupyter Notebook Appearance with CSS
Whole article here: https://medium.com/data-science-collective/this-is-really-a-jupyter-notebook-customizing-jupyter-notebook-appearance-with-css-b04d71ccd0a8
Learn how to convert this:
https://preview.redd.it/j1x00854knzf1.png?width=720&format=png&auto=webp&s=198dee2023ca4b8793e2586992325710b8f10369
into this:
https://preview.redd.it/uzavzyg5knzf1.png?width=720&format=png&auto=webp&s=2bd5296dda0f0fda2ea74106373fe95e52508745
/r/JupyterNotebooks
https://redd.it/1oq1ei7
Whole article here: https://medium.com/data-science-collective/this-is-really-a-jupyter-notebook-customizing-jupyter-notebook-appearance-with-css-b04d71ccd0a8
Learn how to convert this:
https://preview.redd.it/j1x00854knzf1.png?width=720&format=png&auto=webp&s=198dee2023ca4b8793e2586992325710b8f10369
into this:
https://preview.redd.it/uzavzyg5knzf1.png?width=720&format=png&auto=webp&s=2bd5296dda0f0fda2ea74106373fe95e52508745
/r/JupyterNotebooks
https://redd.it/1oq1ei7
Medium
Is This Really a Jupyter Notebook? — Customizing Jupyter Notebook Appearance with CSS
Make your Jupyter Notebooks stand out by customizing their appearance with CSS
htmx is back with version 4.0 - the fetch()ening
So even though Carson said that 2.0 is the final version and there will not be version 3.0, he didn’t lie - it's version 4.0.
https://preview.redd.it/f15rokhuvmzf1.png?width=577&format=png&auto=webp&s=925c3c3689333134a1f2dcb5aaee737f1dc0f7bd
There are some cool backstage enhancements and also some breaking changes if you want to use the new version. But some really fix the annoying quirks.
I know lots of Django folks use the library, so I thought I’ll post it here. I know I use it today almost on all my new projects when fit.
Official announcement here: https://htmx.org/essays/the-fetchening/
I wrote a short migration piece with some extra unneeded info on Medium here: https://medium.com/@alonwo/htmx-4-0-the-fetchening-a-developers-guide-to-what-s-actually-changing-28fb80b36bd9
/r/django
https://redd.it/1opy4yv
So even though Carson said that 2.0 is the final version and there will not be version 3.0, he didn’t lie - it's version 4.0.
https://preview.redd.it/f15rokhuvmzf1.png?width=577&format=png&auto=webp&s=925c3c3689333134a1f2dcb5aaee737f1dc0f7bd
There are some cool backstage enhancements and also some breaking changes if you want to use the new version. But some really fix the annoying quirks.
I know lots of Django folks use the library, so I thought I’ll post it here. I know I use it today almost on all my new projects when fit.
Official announcement here: https://htmx.org/essays/the-fetchening/
I wrote a short migration piece with some extra unneeded info on Medium here: https://medium.com/@alonwo/htmx-4-0-the-fetchening-a-developers-guide-to-what-s-actually-changing-28fb80b36bd9
/r/django
https://redd.it/1opy4yv
Realtime browser events for Django + PostgreSQL
https://github.com/usmanhalalit/DjangoRealtime
/r/django
https://redd.it/1opvw83
https://github.com/usmanhalalit/DjangoRealtime
/r/django
https://redd.it/1opvw83
GitHub
GitHub - usmanhalalit/DjangoRealtime: Realtime browser events, SSE for Django + PostgreSQL
Realtime browser events, SSE for Django + PostgreSQL - usmanhalalit/DjangoRealtime
Support for Python OCC
I have been trying to get accustomed to Python OCC, but it seems so complicated and feels like I am building my own library on top of that.
I have been trying to figure out and convert my CAD Step files into meaningful information like z
Counterbores, Fillets, etc. Even if I try to do it using the faces, cylinders, edges and other stuff I am not sure what I am doing is right or not.
Anybody over here, have any experience with Python OCC?
/r/Python
https://redd.it/1oq1isg
I have been trying to get accustomed to Python OCC, but it seems so complicated and feels like I am building my own library on top of that.
I have been trying to figure out and convert my CAD Step files into meaningful information like z
Counterbores, Fillets, etc. Even if I try to do it using the faces, cylinders, edges and other stuff I am not sure what I am doing is right or not.
Anybody over here, have any experience with Python OCC?
/r/Python
https://redd.it/1oq1isg
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
[R][N] TabPFN-2.5 is now available: Tabular foundation model for datasets up to 50k samples
TabPFN-2.5, a pretrained transformer that delivers SOTA predictions on tabular data without hyperparameter tuning is now available. It builds on TabPFN v2 that was released in the [Nature](https://www.nature.com/articles/s41586-024-08328-6) journal earlier this year.
Key highlights:
* 5x scale increase: Now handles 50,000 samples × 2,000 features (up from 10,000 × 500 in v2)
* SOTA performance: Achieves state-of-the-art results across classification and regression
* Rebuilt API: New REST interface & Python SDK with dedicated fit & predict endpoints, making deployment and integration significantly more developer-friendly
Want to try it out? TabPFN-2.5 is available via an [API](https://docs.priorlabs.ai/api-reference/getting-started) and via a package on [Hugging Face](https://huggingface.co/Prior-Labs).
We welcome your feedback and discussion! You can also join the discord [here](https://discord.com/invite/VJRuU3bSxt).
/r/MachineLearning
https://redd.it/1oq1gq1
TabPFN-2.5, a pretrained transformer that delivers SOTA predictions on tabular data without hyperparameter tuning is now available. It builds on TabPFN v2 that was released in the [Nature](https://www.nature.com/articles/s41586-024-08328-6) journal earlier this year.
Key highlights:
* 5x scale increase: Now handles 50,000 samples × 2,000 features (up from 10,000 × 500 in v2)
* SOTA performance: Achieves state-of-the-art results across classification and regression
* Rebuilt API: New REST interface & Python SDK with dedicated fit & predict endpoints, making deployment and integration significantly more developer-friendly
Want to try it out? TabPFN-2.5 is available via an [API](https://docs.priorlabs.ai/api-reference/getting-started) and via a package on [Hugging Face](https://huggingface.co/Prior-Labs).
We welcome your feedback and discussion! You can also join the discord [here](https://discord.com/invite/VJRuU3bSxt).
/r/MachineLearning
https://redd.it/1oq1gq1
Nature
Accurate predictions on small data with a tabular foundation model
Nature - Tabular Prior-data Fitted Network, a tabular foundation model, provides accurate predictions on small data and outperforms all previous methods on datasets with up to 10,000 samples by a...
edge-tts suddenly stopped working on Ubuntu (NoAudioReceived error), but works fine on Windows
Hey everyone,
I’ve been using the **edge-tts** Python library for text-to-speech for a while, and it has always worked fine. However, it has recently stopped working on **Ubuntu** machines — while it still works perfectly on **Windows,** using the same code, voices, and parameters.
Here’s the traceback I’m getting on Ubuntu:
NoAudioReceived Traceback (most recent call last)
/tmp/ipython-input-1654461638.py in <cell line: 0>()
13
14 if __name__ == "__main__":
---> 15 main()
10 frames
/usr/local/lib/python3.12/dist-packages/edge_tts/communicate.py in __stream(self)
539
540 if not audio_was_received:
--> 541 raise NoAudioReceived(
/r/Python
https://redd.it/1oq1hvw
Hey everyone,
I’ve been using the **edge-tts** Python library for text-to-speech for a while, and it has always worked fine. However, it has recently stopped working on **Ubuntu** machines — while it still works perfectly on **Windows,** using the same code, voices, and parameters.
Here’s the traceback I’m getting on Ubuntu:
NoAudioReceived Traceback (most recent call last)
/tmp/ipython-input-1654461638.py in <cell line: 0>()
13
14 if __name__ == "__main__":
---> 15 main()
10 frames
/usr/local/lib/python3.12/dist-packages/edge_tts/communicate.py in __stream(self)
539
540 if not audio_was_received:
--> 541 raise NoAudioReceived(
/r/Python
https://redd.it/1oq1hvw
Reddit
From the Python community on Reddit
Explore this post and more from the Python community