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
Built an Event Booking platform with Django + HTMX + Docker (looking for critiques and advice)

Hii guys,

I recently finished a portfolio project called Event Book. It’s a ticketing platform where users can generate and validate tickets with unique QR codes, download tickets as PDFs and also get real-time updates (via HTMX).

Some features:
- QR based ticket validation
- Downloadable PDF ticket (xhtml2pdf)
- Email delivery qwith django.core.mail
- Partial page updates with HTMX
- Admin dashboard for attendee logs
- Cloudinary integration for media uploading
- Containerized with Docker + docker-compose


Tech stack:
Django, HTMX, tailwind, With Dockerfile + docker-compose.yml
Media: Cloudinary, Pillow
PDF & QR: xhtml2pdf, qrcode


What I learned:
- Integrating Django + HTMX for partial updates and modals
- QR code generation and validation
- Generating PDFs from HTML templates
- Managing media with Cloudinary
- Using Docker
- access controls


Repo: https://github.com/Tarvel/event-booking

I’d like honest critiques; what could I have done better over all and suggestions for features or real world improvements?


/r/django
https://redd.it/1nrrb77
Is there a way to hide all code inputs?

Currently working through some .ipynb workbooks in vs code to study and gather some notes. I have produced some code to exemplify some of my learnings. However, I don't actually care about the code, I just care about the visuals or outputs they produce. I would therefore like a way which enables me to hide all the input code blocks. If anybody has any suggestions that would be appreciated.

/r/IPython
https://redd.it/1ns8jvx
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/1nsa5ae
PySide vs. Avalonia: Which for a Solo Dev Building an Electrical Panel Designer ?

Hey,

I'm a solo dev dipping into desktop app territory for the first time, and I'm torn between PySide (Python + Qt) and Avalonia (.NET/C#). The app? A tool for designing electrical panels: users drag-drop hierarchical elements (panels → racks → components) on a canvas, then auto-generate invoices (PDFs with BOMs). I'd like a modern UI—dark mode, smooth animations, rounded edges, the works.

Priorities: Cross Platform(MacOS and Windows), high stability/perf (esp. canvas), and minimal new learning juggling other projects.

I know Python and C# basics, but MVVM/XAML trips me up hard (can grind through it, but ugh). Want to stick to *one* language I can reuse for scripting/automation. No commercial license fees—proprietary means closed-source binaries I can sell without drama.

Quick Project Fit

\- Core Needs: Interactive 2D canvas for diagramming (drag-drop hierarchies, snapping/zooming), invoice gen (e.g., ReportLab in Python or PdfSharp in C#), SQLite for component catalogs.

\- Modern UI Goal: aim for Fluent/Material-inspired polish.

\- Deployment: Standalone .app/.exe bundles, no web bloat.

Current Tilt: PySide

It checks every box—canvas strength, macOS native, Python scripting, easy modernity, and LGPL for sales—without the MVVM wall. Avalonia tempts with .NET ecosystem and MIT simplicity, but the learning hump + diagramming tweaks feel riskier for solo.



What do you guys think? Built

/r/Python
https://redd.it/1nruwa7
Choosing a C++ to Python wrapper: Boost.Python vs pybind11?

I've built a code search tool as a terminal application in C++, and I'm now working on packaging it as a Python library. I need to create a Python wrapper for the C++ core.

My project already uses Boost, which has its own Python wrapper (Boost.Python). However, from what I've read, most people seem to be using pybind11.

For those who have experience with this, what are the pros and cons of the different options?

The search tool: https://github.com/perghosh/Data-oriented-design/releases/tag/cleaner.1.0.6

/r/Python
https://redd.it/1nsceni
NiceGUI Component-Based Boilerplate: A scalable architecture for complex Python web UIs

Hello r/Python,

I'm sharing my project, the **NiceGUI Component-Based Boilerplate**. I'm actively looking for feedback from experienced Python developers on its design and architecture.

This is a complete application boilerplate built using the **NiceGUI** framework, which allows the creation of web-based UIs using **pure Python & HTML/CSS/JS**. My project provides a structure for a larger, multi-page NiceGUI application.

**What My Project Does:**

This template introduces a modern structure to simplify building and maintaining complex NiceGUI apps, moving beyond single-file examples.

Key structural features:

* **Modular Component System:** UI pages and major elements are reusable Python classes/functions, managing their own layout and logic.
* **Service Layer:** Business logic (e.g., data handling, API calls) is strictly separated into a dedicated `services/` directory, keeping UI code clean.
* **Clean Starter Layout:** Provides a production-ready, responsive layout with a collapsible sidebar and consistent routing.

**Target Audience:**

This is aimed at **experienced Python developers** and **teams** who need a structured foundation for building production-grade or highly-functional internal tools with NiceGUI. It's ideal for those focused on **scalability and maintainability**.

**Comparison:**

Standard NiceGUI documentation often focuses on simple, single-file scripts. This boilerplate differs by offering a full-scale, opinionated structure similar to what is used in modern web development frameworks.

**Source Code:**

**GitHub Repository:** [`https://github.com/frycodelab/nicegui-component-based`](https://github.com/frycodelab/nicegui-component-based)

I welcome all feedback on the architectural

/r/Python
https://redd.it/1nsi5sh
How do guys land developer roles

Guys I have been unemployed now for 2 years going to three years .I have skills in Python-Django and can also do Technical writing.what can I do to overcome this ?any connections would be really appreciated
I have been going alot just experienced suicidal thought today morning.

/r/django
https://redd.it/1ns07kh
Django Foreign Keys nuances(why explicit db_index?), migrations and more

Good Talk, lot to learn

[http://youtube.com/watch?v=l1xi\_yKnhbE](http://youtube.com/watch?v=l1xi_yKnhbE)

/r/django
https://redd.it/1nssddm
Stop uploading your code to sketchy “online obfuscators” like freecodingtools.org

So I googled one of those “free online Python obfuscor things” (say, freecodingtools.org) and oh boy… I have to rant for a minute.

You sell pitch is just “just paste your code in this box and we’ll keep it for you.” Right. Because clearly the best way to keep your intellectual property is to deposit it on a who-knows-what site you’ve never ever known, owned and operated people you’ll never ever meet, with no idea anywhere your source goes. Completely secure.

Even if you think the site will not retain a copy of your code, the real “obfuscation” is going to be farcical. We discuss base64, XOR, hex encoding, perhaps zlib compression, in a few spaghetti exec function calls. This isn’t security, painting and crafts. It can be unwritten anybody who possesses a ten-minute-half-decent Google. But geez, at least it does look menacing from a first glance, doesn’t it?

You actually experience a false sense of security and the true probability of having just opened your complete codebase to a dodgy server somewhere. And if you’re particularly unlucky, they’ll mail back to you a “protected” file that not only includes a delicious little backdoor but also one you’ll eagerly send off to your

/r/Python
https://redd.it/1nstje8
Beginner: How to start a CRM project in Django (forms, reports, PDFs)

Hi all,

I started working in a company to build an internal CRM app, and I'm lost af. I'm using Django, that's why I'm posting here. ¯\\_(ツ)_/¯

First of all, I'm a software development student who usually works with C/C++ and makes simple videogames in his free time with Unity or Godot. A few weeks ago, I was hired to cover a sick leave in a non-dev department of a big company that needs a new reporting system. The interview was weird because I specifically said I had never made this type of software. At first, they promised me that I didn’t need to be the best developer since the person who built the current system used no-code tools and isn’t a “technical developer like me” (in their words). So I accepted. The vibes were nice, and after two hours of confusion, I got a call confirming that I was on the team. A team of one, cuz Im alone. :/

The sick guy was trying to build the successor of the current system with AI, without really knowing what he was doing. I can’t access his code because he refuses to share “his” work. I saw that he used Streamlit, and even

/r/django
https://redd.it/1nspnv8
Any course or resource (free or paid) for an experienced FastAPI dev?

I got hired by as a fullstack dev (5 yoe) at a manufacturing company. I've worked with Python and FastAPI for 3 years but my role has been 70% frontend, 30% backend. This new role will be more backend focused. I've very briefly used Django over 4 years ago so I need a refresher. I was given a 50 dollar stipend to purchase learning material, so are there any suggestions for people like me?

/r/djangolearning
https://redd.it/1nqllun
Doubts about static and templates folder

Hello django people!

I'm new in web development and just started the development of a simple CRM (probably, will use to build my portfolio). For now i'm having this problem: I can't get the static folder of the project to "be found". I can use the CSS code i'm building with common HTML code but not with django jinja.

The current structure of the folder looks like this

myproject/
├── manage.py
├── settings.py
├── urls.py
├── wsgi.py
├── static/
│ ├── css/
│ │ ├── components/
│ │ └── main.css
│ ├── js/
│ └── img/
├── templates/ # Project-level templates
│ └── header.html
│ └── footer.html
├── myapp1/
│ ├── models.py
│ ├── views.py
│ ├── urls.py


/r/django
https://redd.it/1nt8swc
Experienced Django & Software Developer Seeking New Role

Hi everyone,

I’m currently looking for new opportunities related to Django development. I have 5 years of experience with Django (backend) and over 7 years in software development overall.

Beyond Django, I’ve worked with Vue, Nuxt, Golang, PHP (Laravel), PostgreSQL, MongoDB, and more. I also bring DevOps experience, including provisioning AWS (EKS, EC2, S3, CloudFront, Route53), managing Kubernetes, and setting up monitoring tools like Prometheus and Grafana.

If you know of any opportunities, please feel free to reach out at **mcong.1994@gmail.com** — I’ll be happy to share my resume and more details.

Thank you! 🙏



/r/django
https://redd.it/1ntan1x
Celebrating the first corporate sponsor for django-components 🎉

We've got sponsored by Ohne-Makler to reach v1 for django-components and help bring Laravel Livewire on top of django-components.

This means that I will be able to work on django-components full-time for the next \~6-9 months. Dream come true! ❤️

So with that, I invite everyone to give django-components a try. We now also have a Discord server.

For those who don't know, django-components is a frontend framework for Django. It combines the best of both the Django and JS (Vue, React) worlds.

Unlike other libraries, django-components is more of a meta framework - it extends almost every aspect of Django templates:

Richer template syntax
Automatically managing JS / CSS dependencies
Component-level caching
Support for HTMX - Serving HTML either as whole pages or as HTLM fragments
Extension system that allows us to integrate with many other [libraries or tools](https://github.com/orgs/django-components/projects/1/views/1?query=sort%3Aupdated-desc+is%3Aopen&sliceBy%5Bvalue%5D=topic--ext)

There's still lots to build, here's our [roadmap for v1](
https://github.com/orgs/django-components/projects/1/views/1?query=sort%3Aupdated-desc+is%3Aopen&sliceBy%5Bvalue%5D=milestone--v1). Appreciate any feedback / ideas.

This also means I will have the capacity to mentor a few people. So if you're in need of professional experience or just love challenges, this is a project for you. DM me on Discord or email me.

Altho it's a frontend framework, we do have to count references, or

/r/django
https://redd.it/1ntlal8
Monday Daily Thread: Project ideas!

# Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

## How it Works:

1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.

## Guidelines:

* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.

# Example Submissions:

## Project Idea: Chatbot

**Difficulty**: Intermediate

**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar

**Description**: Create a chatbot that can answer FAQs for a website.

**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)

# Project Idea: Weather Dashboard

**Difficulty**: Beginner

**Tech Stack**: HTML, CSS, JavaScript, API

**Description**: Build a dashboard that displays real-time weather information using a weather API.

**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)

## Project Idea: File Organizer

**Difficulty**: Beginner

**Tech Stack**: Python, File I/O

**Description**: Create a script that organizes files in a directory into sub-folders based on file type.

**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)

Let's help each other grow. Happy

/r/Python
https://redd.it/1nt3lqa
Instead jinja using pure python to generate html makes life easier.

Jinja templating becomes unmanagable for complex templating, maybe i am using it wrong. I find it easier to use regular python functions to generate html. And then expose that function to jinja context to use it in a extended template, like {{my_post_renderer()}}.

But remember to use Markup or escape to make safe html.


/r/flask
https://redd.it/1nt1z2e
R No Prompt Left Behind: Exploiting Zero-Variance Prompts in LLM Reinforcement Learning via Entropy-Guided Advantage Shaping

Arxiv: https://arxiv.org/pdf/2509.21880

Huggingface paper: https://huggingface.co/papers/2509.21880

I’ve been working on improving the reasoning abilities of large language models, and I wanted to share something I’m really excited about. Reinforcement Learning with Verifiable Rewards (RLVR) is already a powerful framework, but I noticed a gap: current methods like GRPO only use problems where model responses differ in correctness. They completely ignore the so-called “zero-variance prompts” — cases where all responses receive the same reward.

At first glance, these prompts look useless, but I started wondering if they actually contain valuable learning signals. That led me to develop RL with Zero-Variance Prompts (RL-ZVP). Instead of discarding those prompts, RL-ZVP extracts meaningful feedback from them. It directly rewards correctness and penalizes errors without needing contrasting responses, and it uses token-level entropy to guide the advantage shaping.

We evaluated RL-ZVP on six math reasoning benchmarks, and it delivered some really promising results — up to 8.61 points higher accuracy and 7.77 points higher pass rates compared to GRPO. It also consistently outperformed other baselines that just filter out zero-variance prompts.

I am happy to take comments in this sub and the HuggingFace paper.

/r/MachineLearning
https://redd.it/1ntm0pf
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/1nty93i