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
This week Everybody Codes has started (challange similar to Advent Of Code)
Hi everybody!
This week Everybody Codes has started (challenge similar to Advent Of Code). You can practice Python solving algorithmic puzzles. This is also good warm-up before AoC ;)
This is second edition of EC. It consists of twenty days (three parts of puzzles each day).
Web: Everybody.codes \- there is also reddit forum for EC problems.
I encourage everyone to participatre and compete!
/r/Python
https://redd.it/1oqbg2q
Hi everybody!
This week Everybody Codes has started (challenge similar to Advent Of Code). You can practice Python solving algorithmic puzzles. This is also good warm-up before AoC ;)
This is second edition of EC. It consists of twenty days (three parts of puzzles each day).
Web: Everybody.codes \- there is also reddit forum for EC problems.
I encourage everyone to participatre and compete!
/r/Python
https://redd.it/1oqbg2q
everybody.codes
Everybody Codes
Everybody Codes is platform much like Advent of Code, where you and your friends can participate in a variety of exciting quests. Join people from all around the globe tackling the same challenges, because, as we all know, in one way or another, everybody…
How to Run Jupyter Notebooks and Generate HTML Reports with Python Scripts
Whole article here: https://medium.com/p/48e0d96a30ed
/r/JupyterNotebooks
https://redd.it/1oq1bwd
Whole article here: https://medium.com/p/48e0d96a30ed
/r/JupyterNotebooks
https://redd.it/1oq1bwd
Medium
How to Run Jupyter Notebooks and Generate HTML Reports with Python Scripts
A step-by-step guide to automating Jupyter Notebook execution and report generation using Python
Best books to be a good Python Dev?
Got a new offer where I will be doing Python for backend work. I wanted to know what good books there are good for making good Python code and more advance concepts?
/r/Python
https://redd.it/1oqbwtg
Got a new offer where I will be doing Python for backend work. I wanted to know what good books there are good for making good Python code and more advance concepts?
/r/Python
https://redd.it/1oqbwtg
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How would you suggest learning Django-Rest-Framework the proper way?
If you all were to start again, what would be your approach? I am having interest in drf but doesnot properly know how to learn it. Give me some advice.
/r/django
https://redd.it/1oq5m27
If you all were to start again, what would be your approach? I am having interest in drf but doesnot properly know how to learn it. Give me some advice.
/r/django
https://redd.it/1oq5m27
Reddit
From the django community on Reddit
Explore this post and more from the django community
Business problem to Code
Hi,
Question: With which name should I search on Google to learn about these things.
Translating a business problem into code.
Context:
I am kinda new to development. It's been like 8 months now.
There are many buzz words I have came across like system design, design principles ,design patterns, UML, BRD.
System design is most prominent among those, but when I see about it, it more seems on the deployment side rather then coding side.
For us fault tolerance, availability, load balancers , cdns, read and write only databases are not that much of a concern because we have really like just 20 users. Coolify is sufficient for us, we containerise and then directly deploy.
What really is things that I need help with is:
1. Logging issues, if some part / feature of code is not working.
2. Searching efficiently in the data. ( Eg: elasticsearch, postgres full text search)
3. Converting business scenario/ problem into database schema and then coding.
4. Be confident for updates ( recently started writing tests, which makes me more confident in my code).
5. Making short lived branches and having strategy for git, automatic tests and builds.
6. Organizing code into
/r/django
https://redd.it/1oqjn0z
Hi,
Question: With which name should I search on Google to learn about these things.
Translating a business problem into code.
Context:
I am kinda new to development. It's been like 8 months now.
There are many buzz words I have came across like system design, design principles ,design patterns, UML, BRD.
System design is most prominent among those, but when I see about it, it more seems on the deployment side rather then coding side.
For us fault tolerance, availability, load balancers , cdns, read and write only databases are not that much of a concern because we have really like just 20 users. Coolify is sufficient for us, we containerise and then directly deploy.
What really is things that I need help with is:
1. Logging issues, if some part / feature of code is not working.
2. Searching efficiently in the data. ( Eg: elasticsearch, postgres full text search)
3. Converting business scenario/ problem into database schema and then coding.
4. Be confident for updates ( recently started writing tests, which makes me more confident in my code).
5. Making short lived branches and having strategy for git, automatic tests and builds.
6. Organizing code into
/r/django
https://redd.it/1oqjn0z
Reddit
From the django community on Reddit
Explore this post and more from the django community
💻 Django + React Developer | Built www.retailhubpro.com
| Open for freelance projects & collaborations
Hey everyone 👋
I’m a full-stack developer specializing in Django (backend) and React (frontend).
I recently launched **www.retailhubpro.com** — a modern Point of Sale and inventory management web app built with Django REST Framework, React, and M-Pesa integration for payments.
Now that the project is live, I’m open to freelance work and collaborations on:
SaaS or dashboard-based web apps
APIs and payment integrations (M-Pesa, Stripe, etc.)
Django REST + React or Next.js builds
System redesigns or feature upgrades
I love working on practical, business-focused software and enjoy turning ideas into polished, scalable products.
If you’re looking to build something or need an extra hand on your team, feel free to reach out or check out my work at **www.retailhubpro.com**.
Let’s build something great 🚀
/r/django
https://redd.it/1opxx55
| Open for freelance projects & collaborations
Hey everyone 👋
I’m a full-stack developer specializing in Django (backend) and React (frontend).
I recently launched **www.retailhubpro.com** — a modern Point of Sale and inventory management web app built with Django REST Framework, React, and M-Pesa integration for payments.
Now that the project is live, I’m open to freelance work and collaborations on:
SaaS or dashboard-based web apps
APIs and payment integrations (M-Pesa, Stripe, etc.)
Django REST + React or Next.js builds
System redesigns or feature upgrades
I love working on practical, business-focused software and enjoy turning ideas into polished, scalable products.
If you’re looking to build something or need an extra hand on your team, feel free to reach out or check out my work at **www.retailhubpro.com**.
Let’s build something great 🚀
/r/django
https://redd.it/1opxx55
Retailhubpro
RetailHub Pro - Point of Sale System
RetailHub Pro - Professional Point of Sale System for Business Management