Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
A Full-Stack Django Multi-Tenant Betting & Casino Platform in Django + React

🚀 I built a multi-tenant betting & casino platform in Django that covers everything I’d want to see in a production-grade system!

Thought I’d share with the community my project — Qbetpro, a multi-tenant Django REST API for managing casino-style games, shops, and operators with advanced background processing, caching, and observability built in.

---

### 🌐 Demo
**GitHub Repo**
**Watch the Demo**

---

### 🧱 System Overview

The Qbetpro ecosystem consists of multiple interconnected apps working together under one multi-tenant architecture:

- 🏢 Operator Portal (Tenant Web) – React + Material UI dashboard for operators to manage their casino, shops, and games
- 🏪 Shop Web (Retail Website) – React + Redux front-end for shop owners to manage tickets, players, and transactions
- 🎮 Games – Web games built using React (and other JS frameworks) that communicate with the Django game engine via REST APIs or WebSocket connections. These games handle UI, animations, and timers, while the backend handles logic, results, and validation.
- 🧩 Game Engine (API) – Django REST backend responsible for authentication, result generation, game logic, and transactions
- 📡 Worker Layer – Celery workers handle background game result generation, leaderboard updates, and periodic reporting
- 📊

/r/django
https://redd.it/1o9rwvx
Which language is similar to Python?

I’ve been using Python for almost 5 years now.
For work and for personal projects.

Recently I thought about expanding programming skills and trying new language.

Which language would you recommend (for backend, APIs, simple UI)? Did you have experience switching from Python to another language and how it turned out?

/r/Python
https://redd.it/1o9tvtc
How to make one dropdown field depend upon another dropdown field in django admin?

I have a model like this:

class CourseSection(TimeStampedModel):
course = models.ForeignKey(Course, relatedname='sections')
title = models.CharField(max
length=1000)

I need to make another django model and I want that in my django admin for that model, there should be a dropdown field that shows all the Course objects. Once the course has been selected the second dropdown field shows CourseSection titles, but only for those CourseSections whose course I selected in the first dropdown field.

I can not update the javascript since I am using the default django admin for this. Is this possible? If not then what would be the best way to do something similar?

/r/djangolearning
https://redd.it/1o82h31
I've written an article series about SQLAlchemy, hopefully it can benefit some of you

You can read it here https://fullstack.rocks/article/sqlalchemy/brewing\_with\_sqlalchemy
I'm really attempting to go deep into the framework with this one. Obviously, the first few articles are not going to provide too many new insights to experienced SQLAlchemy users, but I'm also going into some advanced topics, such as:

Custom data types
Polymorphic tables
Hybrid declarative approach (next week)
JSON and JSONb (week after that)

In the coming weeks, I'll be continuing to add articles to this series, so if you see anything that is missing that might benefit other developers (or yourself), let me know.

/r/Python
https://redd.it/1o9zow6
Saving Memory with Polars (over Pandas)

You can save some memory by moving to Polars from Pandas but watch out for a subtle difference in the quantile's different default interpolation methods.

Read more here:
https://wedgworth.dev/polars-vs-pandas-quantile-method/

Are there any other major differences between Polars and Pandas that could sneak up on you like this?

/r/Python
https://redd.it/1oa4r54
I was wrong: SQL is still the best database for Python Flask Apps in 2025 (free friend link)

Back in May 2023 I argued in another tutorial article that you don’t (always) need SQL for building your own content portfolio website. Airtable’s point-and-click UI is nice, but its API integration with Flask still requires plenty of setup — effectively landing you in a weird no-code/full-code hybrid that satisfies neither camp.

https://preview.redd.it/ch7u4t7twovf1.png?width=2464&format=png&auto=webp&s=55dd613223c01be90c6289f3b66c29a1fcc43821

In reality, setting up a PostgreSQL database on Render takes about the same time as wiring up Airtable’s API — and it scales much better. More importantly, if you ever plan to add Stripe payments (especially for subscriptions), SQL is probably the best option. It’s the most reliable way to guarantee transactional integrity and reconcile your records with Stripe’s.

Finally, SQL databases like PostgreSQL and MySQL are open source — meaning no company can suddenly hike up the prices or shut down your backend overnight. That’s why I’ve changed my stance: it’s better to start with SQL early, take the small learning curve hit, and build on solid, open foundations that keep you in control.

I just published an article on Medium with a clear step-by-step guide on how to build your own Flask admin database with Flask-SQLAlchemy, Flask-Migrate, Flask-Admin and Render for Postgres hosting. Here’s the **free friend link** to the article

/r/flask
https://redd.it/1o94dyt
Sunday Daily Thread: What's everyone working on this week?

# Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

## How it Works:

1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.

## Guidelines:

Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

## Example Shares:

1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

/r/Python
https://redd.it/1oabdtm
Showcase: I wrote a GitHub Action to Summarize uv.lock Changes

What My Project Does

I have been loving everything about uv but reviewing changes as git diffs is always a chore.
I wrote this action to summarize the changes and provide a simple report via PR comment.

Target Audience

This is intended for anyone building or maintaining Python projects with uv in Github.

Comparison
I could not find any other similar actions out there.

URL: https://github.com/mw-root/uv-lock-report

Example PR Comments:
https://github.com/mw-root/uv-lock-report/raw/main/images/uv-lock-report-simple-comment.png

https://github.com/mw-root/uv-lock-report/raw/main/images/uv-lock-report-table-comment.png

/r/Python
https://redd.it/1oa9e3c
Google Tasks TUI

What My Project Does:

This project is a TUI(terminal user interface) that hooks up with the Google Tasks Api, allowing you to edit and view your tasks straight from your terminal.

Target Audience:

This is just a toy project and for everyone. It is also open source so feel free to make any contributions.

Comparison:

I'm sure there are other TUIs out there similar to this that allows you to keep track of your tasks/notes. I guess this application is nice because it hooks up with your Google Tasks which allows for cross platform use.

Source:

https://github.com/huiiy/GTask

/r/Python
https://redd.it/1oaaddg
Course and book recommendations

**Hey everyone**

I’ve been learning Django for a while and already understand the basics — like how the file system works, setting up views, models, templates, etc. But I feel like my knowledge isn’t solid enough yet to build a **real-world web app from scratch** confidently.

Can anyone recommend:

* **Video courses** (free appreciated)
* **Books**
* Any **other helpful resources** (tutorial series, blogs, open-source projects to study, etc.)

I’m aiming to reach a **medium to advanced level**, where I can build complete production-ready Django apps on my own.

Thanks for any suggestions! 🙏

/r/django
https://redd.it/1oa08sx
For those who miss terminal animations...

Just for ease, the repo is also posted up here.

https://github.com/DaSettingsPNGN/PNGN-Terminal-Animator

What my project does: animates text in Discord to look like a terminal output!

Target audience: other nostalgic gamers who enjoy Fallout and Pokémon, and who are interested in animation in Discord using Python.

Comparison: to my knowledge, there's not another Discord bot that generates on-demand custom responses, animated in a terminal style, and uploaded to Discord as a 60 frame, 5 second 12 FPS GIF. I do this to respect Discord rate limits. It only counts as one message. I also use neon as the human eye has a neon reaction biologically similar to a phosphor glow. The colors persist longer with higher saturation on the human retina, and we interpolate to smooth the motion.

I'm new to Python, but I absolutely love it. I designed an animated Discord bot that has Pokémon/Fallout style creatures. I was thinking of adding battling, but for now it is more an interactive guide.

I used accurate visual width calculations to get the text art wrapping correct. Rendered and then scaled so it fits any device. And then vectorized the rendering. Visual width is expensive, but it lines up in nice columns allowing vectorized rendering.

/r/Python
https://redd.it/1oalj6u
Fun project UV scripts, but for functions.

What My Project Does

I recently created **uv-func**, a small tool that brings the dependency-isolation concept of tools like uv scripts down to the level of individual Python functions. Instead of managing dependencies per module or script, uv-func lets you run discrete functions in a contained environment so they can run, communicate with each other, and manage their dependencies cleanly and separately.

Target Audience

Python developers working with scripts or functions that need to be isolated or decoupled in terms of dependencies.
Hobbyists or maintainers who appreciate minimal tooling (uv-func has only three dependencies: cloudpickle, portalocker and rich).

Note: This isn’t a full framework for large applications — it’s intended to be lightweight and easy to embed or integrate as needed.

Comparison

There are other tools that handle dependency isolation or function-level execution (for example, using containers, virtual environments per script, or Function-as-a-Service frameworks like Ray, etc...).

What sets uv-func apart in my opinion:

1. Minimal footprint: only three external dependencies.
2. Focused on the function-level rather than full modules or services.
3. Lightweight and easy to drop into existing Python codebases without heavy platform or infrastructure requirements.

I see many AWS lambdas using requirements.txt then needing to run `pip install` somewhere in their app or infra code, and

/r/Python
https://redd.it/1oavf1l
Trio - Should I move to a more popular async framework?

I'm new-ish to python but come from a systems and embedded programming background and want to use python and pytest to automate testing with IoT devices through BLE, serial or other transports in the future. I started prototyping with Trio as that was the library I saw being used in a reference pytest plugin, I checked out Trio and was very pleased on the emphasis of the concept of structured concurrency (Swift has this concept with the same name in-grained so I knew what it meant and love it) and started writing a prototype to get something working.

It was quick for me to notice the lack of IO library that support Trio natively and this was bummer at first but no big deal as I could manage to find a small wrapper library for serial communication with Trio and wrote my own. However now that I'm having to prototype the BLE side of things I've found zero library, examples or material that uses Trio. Bleak which is the prime library I see pop-up when I look for BLE and python is written with the asyncio backend. I haven't done a lot of research into asyncio or anyio

/r/Python
https://redd.it/1oah08y
Is it possible to get a referral (india)?

I am 29F have 11 months of experience as Django developer and I'm still working but I need to switch the company for some reason
Is it possible to get a referral?

/r/django
https://redd.it/1oafscc
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/1odomzr
Flask SaaS Starter with Stripe + PayPal + email automation

I was trying to build a product that sadly didn't take of but realized the infrastructure was solid through my iterations of my SaaS. It is tried, tested and currently used in production for clarq.ai but I thought I would drop it to Gumroad and see if others found it as a shortcut to save development for back end.

The starter template includes

\- stripe subscriptions with webhooks

\- aypal integration

\- mailgun email automation

\- PostgreSQL user managment

\- Admin dash

\- production-ready deployment config

800+ lines of clean documented Python. Selling at gum road for $79 (MIT license) and would love some feedback from the flask community. Everyone thinks they have a great idea until you find out you don't. Always striving to create and love Reddit to keep me grounded.



/r/flask
https://redd.it/1oe2tcw
Maintained fork of filterpy (Bayesian/Kalman filters)

# What My Project Does

I forked filterpy and got it working with modern Python tooling. It's a library for Kalman filters and other Bayesian filtering algorithms - basically state estimation stuff for robotics, tracking, navigation etc.

The fork (bayesian\_filters) has all the original filterpy functionality but with proper packaging, tests, and docs.

# Target Audience

Anyone who needs Bayesian filtering in Python - whether that's production systems, research, or learning. It's not a toy project - filterpy is/was used all over the place in robotics and computer vision.

# Comparison

The original filterpy hasn't been updated since 2018 and broke with newer setuptools versions. This caused us (and apparently many others) real problems in production.

Since the original seems abandoned, I cleaned it up:

Fixed the setuptools incompatibility
Added proper tests
Updated to modern Python packaging
Actually maintaining it

You can install it with:

uv pip install bayesian-filters

GitHub: https://github.com/GeorgePearse/bayesian\_filters

This should help anyone else who's been stuck with the broken original package. It's one of those libraries that's simultaneously everywhere and completely unmaintained.

Literally just aiming to be a steward, I work in object detection so I might setup some benchmarks to test how well they improve object tracking (which has been my main use-case so

/r/Python
https://redd.it/1oe6mu7
Autoreload

I'm on ipython 9.4. I can't really upgrade for reasons I won't go into. Anyway, autoreload used to be great. I could debug by editing files in real time and retrying in my ipython session. Somewhere along the way it became much less usable. For example, if I put a pdb breakpoint someplace, it doesn't seem to know where it is in the file and variables aren't visible that should be at that point. Is this a known issue or just the new normal? Or maybe newer ipython versions already fixed it?

/r/IPython
https://redd.it/1obo5jx