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
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
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
Reddit
From the django community on Reddit
Explore this post and more from the django community
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
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
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
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
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
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
Reddit
From the django community on Reddit
Explore this post and more from the django community
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
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
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
AI Pothole Detector LIVE – Testing on Varthur-Gunjur Road, Bangalore 🚧
https://www.youtube.com/watch?v=mJGvRONdpbI
/r/django
https://redd.it/1nsp6z4
https://www.youtube.com/watch?v=mJGvRONdpbI
/r/django
https://redd.it/1nsp6z4
YouTube
AI Pothole Detector LIVE – Bangalore Potholes 2025 | Testing on Varthur-Gunjur Road 🚧
Bangalore is once again in the news for its pothole crisis. The city claims to have repaired over 7,000 potholes, yet more than 5,000 are still pending. Citizens have even staged protests and human chains demanding safer roads.
In this video, I’m showcasing…
In this video, I’m showcasing…
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
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
Reddit
From the django community on Reddit
Explore this post and more from the django community
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
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
Reddit
From the django community on Reddit
Explore this post and more from the django community
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
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
www.ohne-makler.net
ohne-makler.net | Immobilien selbst verkaufen und vermieten
Größte Reichweite! Nur ein Mal inserieren, wir veröffentlichen Ihr Angebot automatisch mit allen Daten, Texten und Bildern auf den großen Portalen: immowelt, ImmoScout24, Immonet uvm.
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
# 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
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
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
But remember to use
/r/flask
https://redd.it/1nt1z2e
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
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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
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
# 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
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Why would I not use Visual Studio code
I’m doing a college project that wants me to use Mobaxterm for my terminal and WinSCP to transfer files and I’m using a college provided Linux server. In mobaxterm I use a code editor called nedit.
I’ve used VSC on a project before and it was so much easier , and everything was built in one. I told the professor and he said well you could but I think this is better.
I’m confused how this slow multi step process can be better than VSC?
(This is a bioinformatics project using biopython)
/r/Python
https://redd.it/1ntmao7
I’m doing a college project that wants me to use Mobaxterm for my terminal and WinSCP to transfer files and I’m using a college provided Linux server. In mobaxterm I use a code editor called nedit.
I’ve used VSC on a project before and it was so much easier , and everything was built in one. I told the professor and he said well you could but I think this is better.
I’m confused how this slow multi step process can be better than VSC?
(This is a bioinformatics project using biopython)
/r/Python
https://redd.it/1ntmao7
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
uv-ship: a CLI tool for shipping with uv
Hello r/Python.
I know, I know, there are several release-bumping tools out there, but none integrate with uv the way I would like them to. They also feel kind of bloated for what I need them to do. I simply wanted to use
If you're curious, please check out **uv-ship**
What My Project Does
>
>preflight checks: guard your release workflow by verifying branch, tags, and a clean working tree before shipping.
>changelog generation: auto-builds changelog sections from commits since the latest tag.
>one-shot release: stage, commit, tag, and push in a single step.
>dry-run mode: preview every action before making changes.
Target Audience
maintainers of uv-managed projects with strict release workflows.
Comparison
uv-ship is similar in scope to bump-my-version but it integrates with uv out-of-the-box. For example, if you use bump-my-version you need to set up the following workflow:
1. execute version bump with
2. include a pre-commit hook that runs
3. tell bump-my-version that pyproject.toml and uv.lock need to be committed
4. create the tag and push it manually
bump-my-version offers automation with pre- and post-commit hooks, but it does not evaluate if the tag is safe to
/r/Python
https://redd.it/1ntnbgn
Hello r/Python.
I know, I know, there are several release-bumping tools out there, but none integrate with uv the way I would like them to. They also feel kind of bloated for what I need them to do. I simply wanted to use
uv version to update my project metadata, paired with a small pipeline that safeguards the process and ships the changes + version tag to the repo.If you're curious, please check out **uv-ship**
What My Project Does
>
>preflight checks: guard your release workflow by verifying branch, tags, and a clean working tree before shipping.
>changelog generation: auto-builds changelog sections from commits since the latest tag.
>one-shot release: stage, commit, tag, and push in a single step.
>dry-run mode: preview every action before making changes.
Target Audience
maintainers of uv-managed projects with strict release workflows.
Comparison
uv-ship is similar in scope to bump-my-version but it integrates with uv out-of-the-box. For example, if you use bump-my-version you need to set up the following workflow:
1. execute version bump with
bump-my-version bump minor2. include a pre-commit hook that runs
uv sync3. tell bump-my-version that pyproject.toml and uv.lock need to be committed
4. create the tag and push it manually
bump-my-version offers automation with pre- and post-commit hooks, but it does not evaluate if the tag is safe to
/r/Python
https://redd.it/1ntnbgn
Reddit
Python
The official Python community for Reddit! Stay up to date with the latest news, packages, and meta information relating to the Python programming language.
---
If you have questions or are new to Python use r/LearnPython
---
If you have questions or are new to Python use r/LearnPython
sparkenforce: Type Annotations & Runtime Schema Validation for PySpark DataFrames
sparkenforce is a PySpark type annotation package that lets you specify and enforce DataFrame schemas using Python type hints.
## What My Project Does
Working with PySpark DataFrames can be frustrating when schemas don’t match what you expect, especially when they lead to runtime errors downstream.
sparkenforce solves this by:
* Adding type annotations for DataFrames (columns + types) using Python type hints.
* Providing a `@validate` decorator to enforce schemas at runtime for function arguments and return values.
* Offering clear error messages when mismatches occur (missing/extra columns, wrong types, etc.).
* Supporting flexible schemas with ..., optional columns, and even custom Python ↔ Spark type mappings.
Example:
```
from sparkenforce import validate
from pyspark.sql import DataFrame, functions as fn
@validate
def add_length(df: DataFrame["firstname": str]) -> DataFrame["name": str, "length": int]:
return df.select(
df.firstname.alias("name"),
fn.length("firstname").alias("length")
)
```
If the input DataFrame doesn’t contain "firstname", you’ll get a `DataFrameValidationError` immediately.
## Target Audience
* PySpark developers who want stronger contracts between DataFrame transformations.
* Data engineers maintaining ETL pipelines, where schema changes often breaks stuff.
* Teams that want to make their PySpark code more self-documenting and easier to understand.
## Comparison
* Inspired by [dataenforce](https://github.com/CedricFR/dataenforce) (Pandas-oriented), but extended for PySpark DataFrames.
*
/r/Python
https://redd.it/1nu118l
sparkenforce is a PySpark type annotation package that lets you specify and enforce DataFrame schemas using Python type hints.
## What My Project Does
Working with PySpark DataFrames can be frustrating when schemas don’t match what you expect, especially when they lead to runtime errors downstream.
sparkenforce solves this by:
* Adding type annotations for DataFrames (columns + types) using Python type hints.
* Providing a `@validate` decorator to enforce schemas at runtime for function arguments and return values.
* Offering clear error messages when mismatches occur (missing/extra columns, wrong types, etc.).
* Supporting flexible schemas with ..., optional columns, and even custom Python ↔ Spark type mappings.
Example:
```
from sparkenforce import validate
from pyspark.sql import DataFrame, functions as fn
@validate
def add_length(df: DataFrame["firstname": str]) -> DataFrame["name": str, "length": int]:
return df.select(
df.firstname.alias("name"),
fn.length("firstname").alias("length")
)
```
If the input DataFrame doesn’t contain "firstname", you’ll get a `DataFrameValidationError` immediately.
## Target Audience
* PySpark developers who want stronger contracts between DataFrame transformations.
* Data engineers maintaining ETL pipelines, where schema changes often breaks stuff.
* Teams that want to make their PySpark code more self-documenting and easier to understand.
## Comparison
* Inspired by [dataenforce](https://github.com/CedricFR/dataenforce) (Pandas-oriented), but extended for PySpark DataFrames.
*
/r/Python
https://redd.it/1nu118l
GitHub
GitHub - CedricFR/dataenforce: Python package to enforce column names & data types of pandas DataFrames
Python package to enforce column names & data types of pandas DataFrames - CedricFR/dataenforce
Would you use a low-code GUI tool to build and publish Django REST API project
Hi,
In the last 2 years, I built 3 web apps using Django REST framework for backend.
I realised that most of the work like defining models, auth, simple CRUD apis are repetitive. Also, having a GUI to do all this can be great to configure, visualise the database models and APIs.
This is how I imagine to use such a GUI based Django REST app generator
Define your project and apps
Define and visualise database models
Configure user auth (from various options like username-password / google / x etc.)
Add basic CRUD APIs by simply defining request response payload structure
Add custom APIs
Publish with CICD
Other benefits would be that the generator will use good quality refactored code keeping SOLID principles in mind.
Would you use such a tool to build Django REST based backend projects?
What other features would you need?
/r/django
https://redd.it/1nu4q5t
Hi,
In the last 2 years, I built 3 web apps using Django REST framework for backend.
I realised that most of the work like defining models, auth, simple CRUD apis are repetitive. Also, having a GUI to do all this can be great to configure, visualise the database models and APIs.
This is how I imagine to use such a GUI based Django REST app generator
Define your project and apps
Define and visualise database models
Configure user auth (from various options like username-password / google / x etc.)
Add basic CRUD APIs by simply defining request response payload structure
Add custom APIs
Publish with CICD
Other benefits would be that the generator will use good quality refactored code keeping SOLID principles in mind.
Would you use such a tool to build Django REST based backend projects?
What other features would you need?
/r/django
https://redd.it/1nu4q5t
Reddit
From the django community on Reddit
Explore this post and more from the django community
Crawlee for Python v1.0 is LIVE!
Hi everyone, our team just launched **Crawlee for Python 🐍** v1.0, an open source web scraping and automation library. We launched the beta version in Aug 2024 here, and got a lot of feedback. With new features like Adaptive crawler, unified storage client system, Impit HTTP client, and a lot of new things, the library is ready for its public launch.
What My Project Does
It's an open-source web scraping and automation library, which provides a unified interface for HTTP and browser-based scraping, using popular libraries like beautifulsoup4 and Playwright under the hood.
Target Audience
The target audience is developers who wants to try a scalable crawling and automation library which offers a suite of features that makes life easier than others. We launched the beta version a year ago, got a lot of feedback, worked on it with help of early adopters and launched Crawlee for Python v1.0.
New features
Unified storage client system: less duplication, better extensibility, and a cleaner developer experience. It also opens the door for the community to build and share their own storage client implementations.
Adaptive Playwright crawler: makes your crawls faster and cheaper, while still allowing you to reliably handle complex, dynamic websites. In practice, you get the best of both worlds: speed on simple
/r/Python
https://redd.it/1nu8tt6
Hi everyone, our team just launched **Crawlee for Python 🐍** v1.0, an open source web scraping and automation library. We launched the beta version in Aug 2024 here, and got a lot of feedback. With new features like Adaptive crawler, unified storage client system, Impit HTTP client, and a lot of new things, the library is ready for its public launch.
What My Project Does
It's an open-source web scraping and automation library, which provides a unified interface for HTTP and browser-based scraping, using popular libraries like beautifulsoup4 and Playwright under the hood.
Target Audience
The target audience is developers who wants to try a scalable crawling and automation library which offers a suite of features that makes life easier than others. We launched the beta version a year ago, got a lot of feedback, worked on it with help of early adopters and launched Crawlee for Python v1.0.
New features
Unified storage client system: less duplication, better extensibility, and a cleaner developer experience. It also opens the door for the community to build and share their own storage client implementations.
Adaptive Playwright crawler: makes your crawls faster and cheaper, while still allowing you to reliably handle complex, dynamic websites. In practice, you get the best of both worlds: speed on simple
/r/Python
https://redd.it/1nu8tt6
GitHub
GitHub - apify/crawlee-python: Crawlee—A web scraping and browser automation library for Python to build reliable crawlers. Extract…
Crawlee—A web scraping and browser automation library for Python to build reliable crawlers. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Wo...
WHAT is wrong with my static files?
Hello, all. I am trying to deploy my django app on Digital Ocean and I am having quite a bit of trouble doing so. I am following the How to Set Up a Scalable Django App with DigitalOcean Managed Databases and Spaces tutorial on the DO website, but I cannot seem to get my static files into my Spaces bucket. I have edited my settings.py file as follows:
With this, when i run the command
134 static files copied to '/home/<username>/<project_name>/<project_name>/<project_name>staticfiles' with nothing sent to my spaces bucket on DO. Can anyone see what I am doing wrong?
I have tried removing the STATIC_ROOT = 'static/' line, but that just causes the following error:
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
/r/djangolearning
https://redd.it/1ntyz88
Hello, all. I am trying to deploy my django app on Digital Ocean and I am having quite a bit of trouble doing so. I am following the How to Set Up a Scalable Django App with DigitalOcean Managed Databases and Spaces tutorial on the DO website, but I cannot seem to get my static files into my Spaces bucket. I have edited my settings.py file as follows:
AWS_ACCESS_KEY_ID = '<key_id>'AWS_SECRET_ACCESS_KEY = '<secret_key_id>'AWS_STORAGE_BUCKET_NAME = '<storage_bucket_name>'AWS_S3_ENDPOINT_URL = 'https://nyc3.digitaloceanspaces.com'AWS_S3_OBJECT_PARAMETERS = {'CacheControl': 'max-age=86400',}AWS_LOCATION = 'static'AWS_DEFAULT_ACL = 'public-read'#Static files configurationSTATICFILES_STORAGE = '<app_name>.storage_backends.StaticStorage'#STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'STATIC_URL = f"https://{AWS_STORAGE_BUCKET_NAME}.nyc3.digitaloceanspaces.com/static/"STATIC_ROOT = 'static/' With this, when i run the command
python manage.py collectstatic, I get the following output: 134 static files copied to '/home/<username>/<project_name>/<project_name>/<project_name>staticfiles' with nothing sent to my spaces bucket on DO. Can anyone see what I am doing wrong?
I have tried removing the STATIC_ROOT = 'static/' line, but that just causes the following error:
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
/r/djangolearning
https://redd.it/1ntyz88
Digitalocean
How to Set Up a Scalable Django App with DigitalOcean Managed Databases and Spaces | DigitalOcean
Django is a powerful web framework that can help you get your Python application or website off the ground quickly. It includes several convenient features l…