Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels
Django 5.2 released
https://www.djangoproject.com/weblog/2025/apr/02/django-52-released/
/r/django
https://redd.it/1jpom84
Jupyter MCP.: AI to control Jupyter Notebooks
https://www.youtube.com/watch?v=qkoEsqiWDOU
/r/JupyterNotebooks
https://redd.it/1jqbjy7
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/1jq3vwj
Trying a Spring Boot style project structure in Django
I've been working with Django for the last 3–4 years. One thing I’ve always struggled with is keeping things clean and modular as the project grows.
Django’s flexibility is great, but I’ve often found myself mixing business logic in views, duplicating structure across apps, and losing track of where certain responsibilities live. So I’ve been trying a new approach lately borrowing ideas from Spring Boot (Java), which I used briefly and really liked for its structure.
What I tried:
Created a /apps/ directory where each app is treated as a self-contained module
Split responsibilities into:
controllers/ → class-based views
services/ → business logic
dtos/ → Pydantic v2 for request/response validation
Added a few management commands to generate apps + CRUD automatically:
python manage.py generateapp blog
python manage.py generatecrud blog Post
The goal is to keep things clean and explicit, especially for larger projects or when working with a team.
Here is Repo Link 🔗
It’s not trying to be a full framework, just a structured way to get up and running faster with good practices baked in. Eventual goal is to teach Django in meaningful way
Would love your thoughts on:
Is this too much structure for Django?
Does separating logic this way actually help in the long run?
What would you improve if you
/r/djangolearning
https://redd.it/1jor713
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/1jpavl3
Django security releases issued: 5.1.8 and 5.0.14
https://www.djangoproject.com/weblog/2025/apr/02/security-releases/
/r/django
https://redd.it/1jpmqns
SaaS App created with Django
Hi all, I built and launched this SaaS app https://sweepzyapp.com/ with Django. It's still in a commercial market fit stage of development. It would be great to get some feedback from the Django experts but also welcome any questions from newer Django developers like myself?
/r/django
https://redd.it/1jpl1qz
Created my first COPYWRITING TOOL software with the help of Flask
Hey everyone,
A project I've been working on for the past 7 months is the following: Geniusgate.ai V1
It's an AI-powered copywriting tool, and it's been something I've been working on for a while.
I'd figure it would be pretty cool to show everyone here as it's my first SaaS.
Honestly, as I've made it temporarily free for 7 days. If you do decide to try it out, please let me know what you do and do not like, as I am trying to get as much feedback as possible. I'll be making adjustments to the first version within a few months as I gather feedback.
https://preview.redd.it/9uvswc6hacse1.jpg?width=1200&format=pjpg&auto=webp&s=b3f1e80aca15ca0f36bd1b7ce9b523d01cd3396d
We made this with the following:
React, Next.js, and Flask.
One of the biggest obstacles was that I had to differentiate it from regular GPT, as you may know, ChatGPT can do some form of copywriting. To overcome that problem, I had this tool run on GPT, but it was trained by countless professional copywriters with multiple successful high-converting copy input examples.
The other issue was that initially, we had the website designed with React, such as the landing page, and each blog post was manually added.
We had
/r/flask
https://redd.it/1jpf4ox
Heroku Procfile/Dynos Issue
Hello. Before anything else, I'd like to emphasize that I am very new and very ignorant to coding, so please don't be TOO hard on me.
I'm having a problem with my Procfile in connecting it to Heroku. When I try to run my app, I keep getting an error message saying that heroku can't read my Procfile.
The code that I currently have in my Procfile is web: gunicorn app:app - yes, gunicorn is installed, yes it's in the requirements and no it's not saved a a .txt.
the error code that I keep getting is heroku ps:scale web=1
» Warning: heroku update available from 8.7.1 to 10.4.0.
Scaling dynos... !
! Couldn't find that process type (web).
The contents of my-app-folder is
app,py - generate_report.py - requirements.txt - .gitignore - .env
there is also a venv folder, static, src, data and reports folder saved within the root directory.
ChatGPT isn't being very helpful so I'm coming to the humans instead. I promise I'm not stupid (I never studied coding and I know nothing). I appreciate your help, patience and kindness in advance.
/r/flask
https://redd.it/1jpd05v
Trending Django apps in March
https://django.wtf/trending/?trending=30
/r/django
https://redd.it/1jofa0k
Trying a Spring Boot style project structure in Django
I've been working with Django for the last 3–4 years. One thing I’ve always struggled with is keeping things clean and modular as the project grows.
Django’s flexibility is great, but I’ve often found myself mixing business logic in views, duplicating structure across apps, and losing track of where certain responsibilities live. So I’ve been trying a new approach lately borrowing ideas from Spring Boot (Java), which I used briefly and really liked for its structure.
What I tried:
Created a /apps/ directory where each app is treated as a self-contained module
Split responsibilities into:
controllers/ → class-based views
services/ → business logic
dtos/ → Pydantic v2 for request/response validation
Added a few management commands to generate apps + CRUD automatically:
python manage.py generateapp blog
python manage.py generatecrud blog Post
The goal is to keep things clean and explicit, especially for larger projects or when working with a team.
Here is the Repo Link 🖇️
It’s not trying to be a full framework, just a structured way to get up and running faster with good practices baked in. Eventual goal is to teach Django in meaningful way
Would love your thoughts on:
Is this too much structure for Django?
Does separating logic this way actually help in the long run?
What would you improve if
/r/django
https://redd.it/1jor6v2
docdog: open source generating docs using claude
Hi everyone, gonna just go straight to the point.
What my project does: Creates docs for you by chunking then summarising it. Remember to set up your own api key and put it in a .env file.
Target audience: anyone
Why did I do it? sometimes i write all my code and then i forget what i was writing a day ago. and then i have to relook at my codebase all over again ..
Comparison: claude itself?
How to use Docdog: Just run pip install docdog
then run docdog
Future enhancements: May add new features like more models etc.
Note: This is NOT a tool to replace writing docs. Ultimately you should still write your own docs but this will help you to save some time.
Link: https://github.com/duriantaco/docdog
For any bug or feature please raise an issue in my github page. Please leave a star if you found it useful. If you didn't find it useful, having a bad day, had a breakup or whatever, you can use this post as a punching bag. Thats all. Thanks
/r/Python
https://redd.it/1joq5x3
Flask API Tutorial: Build, Document, and Secure a REST API
https://zuplo.com/blog/2025/03/29/flask-api-tutorial
/r/flask
https://redd.it/1jod40k
Django Project
Hello guys, I am a beginner in Django web development. Previously, I completed Django projects with help, but now I want to create them by myself.
I just started a basic Django project with a PostgreSQL connection. Now I have to design the database, and I am currently stuck on whether to create a simple design and expand it later or to create an advanced design of the database from the start.
Please give suggestions for further steps in Django web development.
/r/djangolearning
https://redd.it/1jo9nq9
PEP 751 (a standardized lockfile for Python) is accepted!
https://peps.python.org/pep-0751/
https://discuss.python.org/t/pep-751-one-last-time/77293/150
After multiple years of work (and many hundreds of posts on the Python discuss forum), the proposal to add a standard for a lockfile format has been accepted!
Maintainers for pretty much all of the packaging workflow tools were involved in the discussions and as far as I can tell, they are all planning on adding support for the format as either their primary format (replacing things like poetry.lock or uv.lock) or at least as a supported export format.
This should allow a much nicer deployment experience than relying on a variety of requirements.txt
files.
/r/Python
https://redd.it/1jo8gvx
Real-Time Speech-to-Speech Chatbot: Whisper, Llama 3.1, Kokoro, and Silero VAD
Hi everyone, Please have a look at the Cascading S2S Vocal-Agent, a real-time speech-to-speech chatbot that integrates Whisper for speech recognition, Silero VAD for voice activity detection, Llama 3.1 for reasoning, and Kokoro ONNX for natural voice synthesis.
🔗 GitHub Repo: https://github.com/tarun7r/Vocal-Agent
# 🚀 What My Project Does
Vocal-Agent enables seamless real-time spoken conversations with an AI assistant. It processes speech input with low latency, understands queries using LLMs, and generates human-like speech in response. The system also supports web integration (Google Search, Wikipedia, Arxiv) and is extensible through an agent framework.
# 🎯 Target Audience
AI researchers & developers: Experiment with real-time S2S AI interactions.
Voice-based AI enthusiasts: Build and extend a natural voice-based chatbot.
Accessibility-focused applications: Enhance spoken communication tools.
Open-source contributors: Collaborate on an evolving project.
# 🔍 How It Differs from Existing Alternatives
Unlike existing voice assistants, Vocal-Agent offers:
✅ Fully open-source implementation with an extensible framework.
✅ LLM-powered reasoning (Llama 3.1 8B) via Agno instead of rule-based responses.
✅ ONNX-optimized TTS for efficient voice synthesis.
✅ Low-latency pipeline for real-time interactivity.
✅ Web search capabilities integrated into the agent system.
# ✨ Key Features
🎙 Speech Recognition: Whisper (large-v1) + Silero VAD
🤖 Multimodal Reasoning: Llama 3.1 8B
/r/Python
https://redd.it/1jqf5zq
UPDATE safe-result 4.0: Better memory usage, chain operations, 100% test coverage
Hi Peeps,
The previous version introduced pattern matching and type guards.
## Target Audience
Anybody.
## Comparison
This new version takes everything one step further by reducing the Result
class to a simple union type and employing __slots__
for reduced memory usage.
The automatic traceback capture has also been decoupled from Err
and now works as a separate utility function.
Methods for transforming and chaining results were also added: map
, map_async
, and_then
, and_then_async
, and flatten
.
I only ported from Rust's Result what I thought would make sense in the context of Python. Also, one of the main goals of this library has always been to be as lightweight as possible, while still providing all the necessary features to work safely and elegantly with errors.
As always, you can check the examples on the project's page.
Thank you again for your support and continuous feedback.
/r/Python
https://redd.it/1jqe33f
Lookin out for any course
I need to do a MVC project with flask and react any recommendations?
/r/flask
https://redd.it/1jq8oj9
I built an open-source AI-powered library for web testing
Hey r/Python,
My name is Alex Rodionov and I'm a tech lead and Ruby (and a bit of Python) maintainer of the Selenium project. For the last few months, I’ve been working on Alumnium.
What My Project Does
It's an open-source Python library that automates testing for web applications by leveraging Selenium or Playwright, AI, and natural language commands.
Target Audience
Test automation engineers or anyone writing tests for web applications. It’s an early-stage project, not ready for production use in complex web applications.
Comparison
The closest project I am aware of is LaVague-QA, but it's a test generator (i.e. it generates Selenium+pytest tests from Gherkin specification), while Alumnium is just a library you can use in tests. It uses AI during test execution runtime to figure out Selenium interactions based on what's present in the browser.
Docs: https://alumnium.ai/
Repository: https://github.com/alumnium-hq/alumnium
Discord: https://discord.gg/VDnPg6Ta
/r/Python
https://redd.it/1jpo96u
Static site to Django templates
So I am trying to learn more templating by turning a static site into a Django site with generic views. Is this a good approach or should I start from scratch? I am doing it because I am trying to learn about templating and though it would be cool to see how easy it would be to turn this static site into something I can use Django models and DB with.
/r/djangolearning
https://redd.it/1jpcdbp
Django e-commerce hosting
Hi all!
Context:
I created my first e-commerce with Django, right now I am hosting it with render ( free tier) and the project uses SQLite. The problem right now is that the free tier does not hold the project on all the time, after 10-15 minutes of inactivity it goes idle and takes around 1 minute to become active again, when it becomes active again all the new products that were added through admin panel (while the website was live ) disappear , as they were never there and I understand the reason.
Questions : if I upgrade to the standard tier ( the one that cost 7-9euro /month ) would that solve the problem with the new added products?( as the app won’t have downtime)
Do I have to purchase from render the postgreSQL as well? ( but then it becomes a bit costly with the standard version as well ( total of 14 euro or something like this)
Extra: I am using Cloudinary for the images uploaded via admin panel.
Or if someone knows better cost-eficient option for hosting or some workarounds that may work I would very much appreciate!
Thank you!
/r/django
https://redd.it/1jpkuo4
migrate many-to-one models
I tried to create a many-to-one relationship in my model, but when I migrated the model, I encountered an error.
https://preview.redd.it/zs59lv8htdse1.png?width=1010&format=png&auto=webp&s=18f11cf49d6515cd48f624648aa81b3b69db7354
i create two class in the names category and product and they are very simple but i don't know that should use specific properties for ForeignKey fild or no . Does anyone know how to properly define models with a ForeignKey? Also, if I want to delete some migration files, can I remove them manually, or must I use the terminal?"
/r/django
https://redd.it/1jpjoay
Looking for a Pageant Tabulation System – Buy, Rent, or Subscribe
Hello,
We’re looking for a reliable tabulation system specifically for pageants. Our company is open to subscribing, buying, or renting a system that fits our needs. If you have a working solution, please reach out so we can review its features and discuss potential opportunities.
Looking forward to your recommendations!
Thanks.
/r/django
https://redd.it/1jpi41a
Breaking news: Guido van Rossum back as Python's Benevolent Dictator for Life (BDFL)!
If you don't trust me, see for yourself here: https://www.youtube.com/watch?v=wgxBHuUOmjA 😱
/r/Python
https://redd.it/1jowzs2
MOT viewer, early release for kicking it!
It started as a mad idea when my son was looking for his first car. The UK GOV site is ok but it's hard to see the underlying figures so I decided why not make a prettier site?
Certainly not original, nor particularly pretty but it's all mine!
[https://cargeezer.co.uk/](https://cargeezer.co.uk/)
SSL self hosted, using Django, pico-css and no JavaScript as far as I can remember.
Soon going to extend the interface using HTMX so you can filter stuff etc etc and maybe enjoy it a simpler way, currently pico-css has been most excellent to work with.
The feedback page needs a captcha, nothing appears unless vetted by me anyway.
Not sure what else to say other than, any questions?
asgiref==3.8.1
certifi==2024.12.14
charset-normalizer==3.4.1
Django==5.1.4
django-htmx==1.21.0
idna==3.10
importlib_metadata==8.5.0
pygal==3.0.5
requests==2.32.3
ruff==0.8.6
sqlparse==0.5.3
urllib3==2.3.0
zipp==3.21.0
/r/django
https://redd.it/1jovqf2
Speeding up api request.
Hi everyone.
For the last 8 months or so (lost track abit!) I’ve been building a meal planning platform, but what I haven’t been able to speed up is the response of my backends api
The stack is nuxt3, drf, Postgres, nginx in a docker compose digitaloceon droplet. I have tampered with putting the highest of specs on the droplet and it doesn’t have any notable effects
The part I’m struggling with is when you browse recipes, they take ages (2-4seconds). I’m loading 12 a time, with a fair bit of information being sent but limited as much as I can. It’s only sending thumbnail size images condensed. I have redis but as each request is quite unique I’m unsure how to use it here.
If anyone’s experienced this it would be fantastic to hear your experiences!
The link to the page is www.mealmatcher.co.uk/recipes
Really hope this doesn’t come across as shilling
Thank you!
/r/django
https://redd.it/1jon7zr
[Code Review Request] Capstone Project - Streamlit App for Box Office Prediction
Hey everyone!
I'm working on my master’s capstone project and need a code review by Wednesday as part of my requirements. My project is a Streamlit-based data science app that predicts box office revenue using machine learning. It includes:
• Role-based access control (executive, finance, data science team)
• Data upload, cleaning, and feature engineering
• Model training, evaluation, and predictions
• Report generation & Google Drive integration
I’d really appreciate any feedback on bugs, coding best practices, or optimizations. You can find my code here:
https://github.com/ashcris12/streamlit_project/tree/main
If you have time, even a quick review would be super helpful! Thanks in advance!
/r/Python
https://redd.it/1jojd8e
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/1joi4lc
Wi-Fi Controlled Robot Using Python
* **What My Project Does**
I've built a robot that can be controlled via Wifi and has a camera feed so you can see where you are going. The big idea is to have this autominusly controlled by a computer that can use computer vision to analyse the camera feed, so that it can retrieve the trash cans.
This fist iteration is just to get it controlled over WiFi. The robot has Raspberry Pi Zero on it which handles the camera feed and exposes it via a web server and a Raspberry Pi Pico which has a webserver and can contol the servo motors. There is a basic API on the Pico to allow for commands to be sent to it.
I have another Pi with a Python simple server which displays a page which combines the camera feed and the controls of the robot.
I realise I could have done this all on one Pi!
Video : [https://youtu.be/pU6xzsQAeKs](https://youtu.be/pU6xzsQAeKs)
Code: [https://github.com/btb331/binbot](https://github.com/btb331/binbot)
* **Target Audience**
100% a toy project
* **Comparison**
There's quiet a few of these projects around but thought I'd add my custom spin on them
/r/Python
https://redd.it/1jobaz3
Flask not recognised as name of cmdlet
/r/flask
https://redd.it/1jnigyq