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/1i00vbq
# 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/1i00vbq
I made a Blood Analysis Tool because I'm a True Crime junkie
I made this project with OpenCV and Streamlit. Let me know what you think?
https://youtu.be/SGF-PqMpctY
GitHub (please watch the video): https://github.com/saifaldin14/BloodSplatterAnalysis
What My Project Does: This is a small 2D Blood Analysis App inspired by the True Crime videos I like watching!
Target Audience: Programmers and YouTube enthusiasts who like seeing cool projects
Comparison: This is a simplified version of real-world forensic analysis tools. It uses a lot of the same computer vision techniques in other projects but its idea is far more unique. I think the techniques showed in this video are really useful for people trying to learn image analysis and computer vision.
/r/Python
https://redd.it/1hzqc40
I made this project with OpenCV and Streamlit. Let me know what you think?
https://youtu.be/SGF-PqMpctY
GitHub (please watch the video): https://github.com/saifaldin14/BloodSplatterAnalysis
What My Project Does: This is a small 2D Blood Analysis App inspired by the True Crime videos I like watching!
Target Audience: Programmers and YouTube enthusiasts who like seeing cool projects
Comparison: This is a simplified version of real-world forensic analysis tools. It uses a lot of the same computer vision techniques in other projects but its idea is far more unique. I think the techniques showed in this video are really useful for people trying to learn image analysis and computer vision.
/r/Python
https://redd.it/1hzqc40
YouTube
I Made a Blood Splatter Analysis Tool Because I'm a True Crime Junkie
I made a Blood Splatter Analysis app inspired by all the True Crime videos I like watching. If you enjoy these types of projects, like, comment, subscribe and let me know what you think!
GitHub Repo: https://github.com/saifaldin14/BloodSplatterAnalysis
GitHub Repo: https://github.com/saifaldin14/BloodSplatterAnalysis
Doubts about deleting elements
I'm creating a website where you can register and thus get a warehouse where you can store your wav and mp3 files, listen to them from there and maybe download them later.
I finished implementing the functionality to allow the user to delete his songs. There is a problem, or rather, perhaps it is more of a fear of mine, so tell me if what I say doesn't make sense.
I first delete the song in the directory and then in the database (where the file name is stored). I would like to make sure that these two instructions are connected, that is, if for some strange reason the db.session.commit() fails and therefore does not save the changes to the database, I would then like the directory not to be modified either.
This is my code piece:
db.session.query(Sound).filter(Sound.body == sound_to_delete, Sound.user_id == current_user.id).delete()
sound_path = os.path.join('app', 'static', 'uploads', f'{current_user.username[0].upper()}', f'{current_user.username}', f'{sound_to_delete[0].upper()}', sound_to_delete)
if os.path.isfile(sound_path):
os.remove(sound_path)
db.session.commit()
/r/flask
https://redd.it/1hzmwac
I'm creating a website where you can register and thus get a warehouse where you can store your wav and mp3 files, listen to them from there and maybe download them later.
I finished implementing the functionality to allow the user to delete his songs. There is a problem, or rather, perhaps it is more of a fear of mine, so tell me if what I say doesn't make sense.
I first delete the song in the directory and then in the database (where the file name is stored). I would like to make sure that these two instructions are connected, that is, if for some strange reason the db.session.commit() fails and therefore does not save the changes to the database, I would then like the directory not to be modified either.
This is my code piece:
db.session.query(Sound).filter(Sound.body == sound_to_delete, Sound.user_id == current_user.id).delete()
sound_path = os.path.join('app', 'static', 'uploads', f'{current_user.username[0].upper()}', f'{current_user.username}', f'{sound_to_delete[0].upper()}', sound_to_delete)
if os.path.isfile(sound_path):
os.remove(sound_path)
db.session.commit()
/r/flask
https://redd.it/1hzmwac
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
spss syntax to pandas
does anyone have a good resource showing spss syntax to python pandas, a crosswalk showing the code? i am aware that not everything is a 1 to 1 match. but most of the tabular data wrangling the methodology is the same. thanks western watts
/r/Python
https://redd.it/1hzszu4
does anyone have a good resource showing spss syntax to python pandas, a crosswalk showing the code? i am aware that not everything is a 1 to 1 match. but most of the tabular data wrangling the methodology is the same. thanks western watts
/r/Python
https://redd.it/1hzszu4
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
MFA in flask web app
I would like to set up email and /or phone number verification for users on a web app. I'm finding it so hard . Any help and assistance will be much appreciated
/r/flask
https://redd.it/1hxujfg
I would like to set up email and /or phone number verification for users on a web app. I'm finding it so hard . Any help and assistance will be much appreciated
/r/flask
https://redd.it/1hxujfg
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I Made Search Engine Using Python And Flask.
https://youtu.be/Wy6j7EiuyLY
/r/flask
https://redd.it/1i0axr7
https://youtu.be/Wy6j7EiuyLY
/r/flask
https://redd.it/1i0axr7
YouTube
Create Your Own Search Engine in just 5 min (Or Suffer)
A Very Quick Tutorial To Create Custom Search Engines.
Github: https://github.com/mharrish7/Custom-Search-BM25
Chapters
00:00 Introduction
00:10 Web Crawlers
02:41 Indexing
03:20 Ranking
04:18 Result
Github: https://github.com/mharrish7/Custom-Search-BM25
Chapters
00:00 Introduction
00:10 Web Crawlers
02:41 Indexing
03:20 Ranking
04:18 Result
DataBridge: Open-source local multimodal modular RAG system using Python
Hey r/Python! I'm excited to share [DataBridge](https://github.com/databridge-org/databridge-core) \- a multimodal, modular fully local RAG system I've been working on.
**What makes it different:**
* Truly self-hosted - uses Postgres for vector storage (no cloud vector DBs), Local LLMs and embeddings through Ollama integration
* Handles multiple document types (PDFs, Word docs, images, etc.)
* Modular architecture - swap components as needed
* Clean Python SDK for easy integration
* Perfect for sensitive documents or air-gapped environments
Everything runs locally without external API dependencies.
**Looking for:**
* 🤝 Early adopters and feedback
* 💡 Feature requests and use cases
* 🐛 Bug reports
* 🌟 Any contributors welcome!
I'd love to hear your thoughts and suggestions!
Links:
* GitHub: [https://github.com/databridge-org/databridge-core](https://github.com/databridge-org/databridge-core)
* Docs: [https://databridge.gitbook.io/databridge-docs](https://databridge.gitbook.io/databridge-docs)
/r/Python
https://redd.it/1i07szz
Hey r/Python! I'm excited to share [DataBridge](https://github.com/databridge-org/databridge-core) \- a multimodal, modular fully local RAG system I've been working on.
**What makes it different:**
* Truly self-hosted - uses Postgres for vector storage (no cloud vector DBs), Local LLMs and embeddings through Ollama integration
* Handles multiple document types (PDFs, Word docs, images, etc.)
* Modular architecture - swap components as needed
* Clean Python SDK for easy integration
* Perfect for sensitive documents or air-gapped environments
Everything runs locally without external API dependencies.
**Looking for:**
* 🤝 Early adopters and feedback
* 💡 Feature requests and use cases
* 🐛 Bug reports
* 🌟 Any contributors welcome!
I'd love to hear your thoughts and suggestions!
Links:
* GitHub: [https://github.com/databridge-org/databridge-core](https://github.com/databridge-org/databridge-core)
* Docs: [https://databridge.gitbook.io/databridge-docs](https://databridge.gitbook.io/databridge-docs)
/r/Python
https://redd.it/1i07szz
GitHub
GitHub - morphik-org/morphik-core: The most accurate document search and store for building AI apps
The most accurate document search and store for building AI apps - morphik-org/morphik-core
Never Knew You Could Do That!😭 Pretty sure i am working in a fresh Venv
/r/django
https://redd.it/1i09fkp
/r/django
https://redd.it/1i09fkp
R Cosine Similarity Isn't the Silver Bullet We Thought It Was
Netflix and Cornell University researchers have exposed significant flaws in cosine similarity. Their study reveals that regularization in linear matrix factorization models introduces arbitrary scaling, leading to unreliable or meaningless cosine similarity results. These issues stem from the flexibility of embedding rescaling, affecting downstream tasks like recommendation systems. The research highlights the need for alternatives, such as Euclidean distance, dot products, or normalization techniques, and suggests task-specific evaluations to ensure robustness.
Read the full paper review of 'Is Cosine-Similarity of Embeddings Really About Similarity?' here: https://www.shaped.ai/blog/cosine-similarity-not-the-silver-bullet-we-thought-it-was
/r/MachineLearning
https://redd.it/1i0hfsd
Netflix and Cornell University researchers have exposed significant flaws in cosine similarity. Their study reveals that regularization in linear matrix factorization models introduces arbitrary scaling, leading to unreliable or meaningless cosine similarity results. These issues stem from the flexibility of embedding rescaling, affecting downstream tasks like recommendation systems. The research highlights the need for alternatives, such as Euclidean distance, dot products, or normalization techniques, and suggests task-specific evaluations to ensure robustness.
Read the full paper review of 'Is Cosine-Similarity of Embeddings Really About Similarity?' here: https://www.shaped.ai/blog/cosine-similarity-not-the-silver-bullet-we-thought-it-was
/r/MachineLearning
https://redd.it/1i0hfsd
www.shaped.ai
Cosine Similarity: Not the Silver Bullet We Thought It Was | Shaped Blog
In the world of machine learning and data science, cosine similarity has long been a go-to metric for measuring the semantic similarity between high-dimensional objects. However, a new study by researchers at Netflix and Cornell University challenges our…
RichChk: Edit StarCraft maps in Python
# What My Project Does
My project, RichChk, allows directly editing all aspects of a StarCraft Brood War map in Python. This is to allow those who make StarCraft custom games / maps (they can be thought of as "mods") a powerful way to use modern software practices to maintain and iterate on their maps, without using clunky GUIs. I initially made this library for myself, as my own custom maps became too complicated to maintain using text macros and having to copy+paste script output to update the map each time I made changes to test it. I named my project RichChk from the binary file format maps are stored in called Scenario.chk and my library making it much richer and easier for a human to read/edit.
Some examples of custom StarCraft maps are Battle of Helms Deep or even a re-creation of Elder Scrolls IV Oblivion RPG. My library was not used to make those maps, but the idea is that going forward it is better to maintain and create such maps using this library.
RichChk is a fully statically typed codebase with 200+ unit tests. I use GitHub actions to automatically run
/r/Python
https://redd.it/1i0lwjo
# What My Project Does
My project, RichChk, allows directly editing all aspects of a StarCraft Brood War map in Python. This is to allow those who make StarCraft custom games / maps (they can be thought of as "mods") a powerful way to use modern software practices to maintain and iterate on their maps, without using clunky GUIs. I initially made this library for myself, as my own custom maps became too complicated to maintain using text macros and having to copy+paste script output to update the map each time I made changes to test it. I named my project RichChk from the binary file format maps are stored in called Scenario.chk and my library making it much richer and easier for a human to read/edit.
Some examples of custom StarCraft maps are Battle of Helms Deep or even a re-creation of Elder Scrolls IV Oblivion RPG. My library was not used to make those maps, but the idea is that going forward it is better to maintain and create such maps using this library.
RichChk is a fully statically typed codebase with 200+ unit tests. I use GitHub actions to automatically run
/r/Python
https://redd.it/1i0lwjo
GitHub
GitHub - sethmachine/richchk: Edit StarCraft maps in Python
Edit StarCraft maps in Python. Contribute to sethmachine/richchk development by creating an account on GitHub.
Indentation-based syntax for Clojure
Indentation-based syntax for Clojure
What My Project Does
Provides indentation-based, Python-like syntax for Clojure.
Target Audience
Developers who want to try Clojure, but its syntax looks weird for them. It can be a starting point to dive into Clojure and its ecosystem. Due its indentation-based nature it can be interesting for Python developers. Also it can be interesting for programming languages designers and developers.
Comparison
Compared to Clojure syntax the project provides more familiar and traditional non-lisp syntax: C-style function call, infix notation for math operations, less parentheses.
Compared to Python the project provides more functional programming, Clojure/Java ecosystem.
/r/Python
https://redd.it/1i0k96j
Indentation-based syntax for Clojure
What My Project Does
Provides indentation-based, Python-like syntax for Clojure.
Target Audience
Developers who want to try Clojure, but its syntax looks weird for them. It can be a starting point to dive into Clojure and its ecosystem. Due its indentation-based nature it can be interesting for Python developers. Also it can be interesting for programming languages designers and developers.
Comparison
Compared to Clojure syntax the project provides more familiar and traditional non-lisp syntax: C-style function call, infix notation for math operations, less parentheses.
Compared to Python the project provides more functional programming, Clojure/Java ecosystem.
/r/Python
https://redd.it/1i0k96j
GitHub
GitHub - ilevd/cwp: Indentation-based syntax for Clojure
Indentation-based syntax for Clojure. Contribute to ilevd/cwp development by creating an account on GitHub.
Niquests 3.12 — What's new in 2025
The Requests fork http client is growing rapidly and soon to hit his 1st million pulls.
Since last time we published in this subreddit, we are proud to announce that:
- Made SSE (Server side event) consumption natively integrated.
- Brought HTTP/2+ WebSocket as a mainstream client.
- Within our Python ecosystem, we're the only one! Chrome & Firefox were capable ages ago!
- Upgraded our Kyber768Draft post quantum implementation to standard Module Lattice 768 (ML-KEM-768).
- Ensured free threaded support!
- Requests, and Niquests are the only trustworthy clients that can run on the experimental build.
- httpx was already crashing randomly when the GIL is enabled (mostly with http2). In the free threaded build, it crashes every single time (http1 or http2). Thus confirming the unsafe aspect of sharing httpx.Client between threads.
- Allowed caching of the OCSP revocation status, via pickling your Session.
- Using ping frames to keep alive (discretly) your HTTP/2+ connections perfectly, without ever leafting a finger.
- Wrote guides on how to get the smoothest upgrade between Requests and Niquests while keeping all your plugins (e.g. betamax, requests-mock, responses, requests-oauthlib, ...).
The project reached 1,1k+ stars thanks to you all.
I receive a lot of positive feedback either pivately (mostly
/r/Python
https://redd.it/1i09ip9
The Requests fork http client is growing rapidly and soon to hit his 1st million pulls.
Since last time we published in this subreddit, we are proud to announce that:
- Made SSE (Server side event) consumption natively integrated.
- Brought HTTP/2+ WebSocket as a mainstream client.
- Within our Python ecosystem, we're the only one! Chrome & Firefox were capable ages ago!
- Upgraded our Kyber768Draft post quantum implementation to standard Module Lattice 768 (ML-KEM-768).
- Ensured free threaded support!
- Requests, and Niquests are the only trustworthy clients that can run on the experimental build.
- httpx was already crashing randomly when the GIL is enabled (mostly with http2). In the free threaded build, it crashes every single time (http1 or http2). Thus confirming the unsafe aspect of sharing httpx.Client between threads.
- Allowed caching of the OCSP revocation status, via pickling your Session.
- Using ping frames to keep alive (discretly) your HTTP/2+ connections perfectly, without ever leafting a finger.
- Wrote guides on how to get the smoothest upgrade between Requests and Niquests while keeping all your plugins (e.g. betamax, requests-mock, responses, requests-oauthlib, ...).
The project reached 1,1k+ stars thanks to you all.
I receive a lot of positive feedback either pivately (mostly
/r/Python
https://redd.it/1i09ip9
Reddit
From the Python community on Reddit: Niquests 3.12 — What's new in 2025
Explore this post and more from the Python community
Questions about launching first public-facing django project
Hi all,
A few questions:
1. I'm about to launch a product in the next few months. I'm a blind developer, and want to make sure that my UI looks okay. Is there an easy way to give my django templates to someone I pay to make them look better without sharing the entire repo of code? I'm under a couple license restrictions and don't know how to handle that.
Finally, Are there reasonable t&c/ToS templates that are useful for copying without paying a lawyer $250/h? Anything else I should be concerned about in that realm when launching? Any pitfalls you ran into when launching a service?
Thanks,
/r/django
https://redd.it/1i0qqlq
Hi all,
A few questions:
1. I'm about to launch a product in the next few months. I'm a blind developer, and want to make sure that my UI looks okay. Is there an easy way to give my django templates to someone I pay to make them look better without sharing the entire repo of code? I'm under a couple license restrictions and don't know how to handle that.
Finally, Are there reasonable t&c/ToS templates that are useful for copying without paying a lawyer $250/h? Anything else I should be concerned about in that realm when launching? Any pitfalls you ran into when launching a service?
Thanks,
/r/django
https://redd.it/1i0qqlq
Reddit
From the django community on Reddit
Explore this post and more from the django community
drf-oauth-toolkit: a set of tools to simplify Oauth
# [drf-oauth-toolkit](https://github.com/basola21/drf-oauth-toolkit) – Pre-Demo Release
hello everyone
I’ve just released the **pre-demo version** of `drf-oauth-toolkit`, a Django REST Framework library aimed at simplifying **OAuth2 token management** and making authentication workflows more flexible for modern APIs.
# Why I Built This
OAuth integration has become a standard need in most modern projects, especially when working with providers like Google or Facebook. While there are already great libraries for Django such as:
* `django-oauth-toolkit` – A complete OAuth2 provider.
* `social-auth-app-django` – Powerful social authentication for multiple providers.
* `dj-rest-auth` – A convenient drop-in solution for registration and social auth.
I built `drf-oauth-toolkit` to solve **flexibility issues** I've encountered in real-world projects. Many existing libraries assume a fixed way of handling tokens and user management, which can be challenging when working with Django Rest Framework or non-standard token workflows.
# ✅ Key Problems I'm Addressing:
* **Complex Setup:** Some libraries require extensive boilerplate with limited flexibility.
* **Token Management Assumptions:** Fixed token storage strategies that may not fit every project.
* **DRF Optimization:** Some packages aren't designed for DRF-first workflows.
# ✅ What's Ready Now:
* Core token management and structure implemented.
* Built following DRF best practices for security and scalability.
* Designed for easy integration and extension.
# What's Next:
The foundation is ready, and I’m currently
/r/django
https://redd.it/1i0ikmf
# [drf-oauth-toolkit](https://github.com/basola21/drf-oauth-toolkit) – Pre-Demo Release
hello everyone
I’ve just released the **pre-demo version** of `drf-oauth-toolkit`, a Django REST Framework library aimed at simplifying **OAuth2 token management** and making authentication workflows more flexible for modern APIs.
# Why I Built This
OAuth integration has become a standard need in most modern projects, especially when working with providers like Google or Facebook. While there are already great libraries for Django such as:
* `django-oauth-toolkit` – A complete OAuth2 provider.
* `social-auth-app-django` – Powerful social authentication for multiple providers.
* `dj-rest-auth` – A convenient drop-in solution for registration and social auth.
I built `drf-oauth-toolkit` to solve **flexibility issues** I've encountered in real-world projects. Many existing libraries assume a fixed way of handling tokens and user management, which can be challenging when working with Django Rest Framework or non-standard token workflows.
# ✅ Key Problems I'm Addressing:
* **Complex Setup:** Some libraries require extensive boilerplate with limited flexibility.
* **Token Management Assumptions:** Fixed token storage strategies that may not fit every project.
* **DRF Optimization:** Some packages aren't designed for DRF-first workflows.
# ✅ What's Ready Now:
* Core token management and structure implemented.
* Built following DRF best practices for security and scalability.
* Designed for easy integration and extension.
# What's Next:
The foundation is ready, and I’m currently
/r/django
https://redd.it/1i0ikmf
GitHub
GitHub - basola21/drf-oauth-toolkit: A toolkit for handling OAuth with Django Rest Framework
A toolkit for handling OAuth with Django Rest Framework - basola21/drf-oauth-toolkit
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/1i0snf0
# 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/1i0snf0
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
Introducing Notebook Intelligence!
https://blog.jupyter.org/introducing-notebook-intelligence-3648c306b91a
/r/IPython
https://redd.it/1i0lzq5
https://blog.jupyter.org/introducing-notebook-intelligence-3648c306b91a
/r/IPython
https://redd.it/1i0lzq5
Medium
Introducing Notebook Intelligence!
I am thrilled to announce the release of Notebook Intelligence! NBI is an AI coding assistant for JupyterLab powered by GitHub Copilot…
Keyboard shortcut to clear code shell output in Jupyter notebook not working
Hi everyone!
Can anyone help with the keyboard shortcut to clear the cell output in Jupyter notebook v7.2.2?
A simple Google search yields the shortcut as "O" / "Shift+O" as per different articles, but none of them works in v7.2.2 and the only way to go about it now seems as "right click -> clear cell output", which isn't optimal.
#jupyternotebook #python
/r/IPython
https://redd.it/1i0zwrk
Hi everyone!
Can anyone help with the keyboard shortcut to clear the cell output in Jupyter notebook v7.2.2?
A simple Google search yields the shortcut as "O" / "Shift+O" as per different articles, but none of them works in v7.2.2 and the only way to go about it now seems as "right click -> clear cell output", which isn't optimal.
#jupyternotebook #python
/r/IPython
https://redd.it/1i0zwrk
Reddit
From the IPython community on Reddit
Explore this post and more from the IPython community
djapy needs your Django wisdom: Help shape the testing infrastructure of this type-safe REST framework
Hey Django devs! I'm excited to share djapy - a framework I've built to simplify Django REST APIs with type safety. Now I need your expertise to make it production-grade.
Quick demo of what djapy does:
Why Django devs might care:
- Native Django patterns - no new concepts to learn
- Pydantic validation + Django ORM = ❤️
- Endpoints feature and IDE autocompletion that actually works (PyCharm)
- OpenAPI/Swagger docs generated automatically, with a touch of dark mode
- Just pip install djapy and start coding
Now for the hard part - I need help setting up a proper testing infrastructure. Some questions keeping me up at night:
1. Testing Strategy:
- How do you test type hints in a Django package?
- Best practices for testing Pydantic models with Django?
- Integration tests vs Unit tests ratio?
2. Development Workflow:
- Which pre-commit hooks are must-haves?
- pytest vs unittest for a Django package?
/r/django
https://redd.it/1i0yljq
Hey Django devs! I'm excited to share djapy - a framework I've built to simplify Django REST APIs with type safety. Now I need your expertise to make it production-grade.
Quick demo of what djapy does:
# Regular Django views but with superpowers
@djapify
def get_user(request) -> {200: UserSchema, 404: str}:
return request.user
@djapify
def create_post(request, data: BlogPostSchema) -> BlogPostSchema:
post = Post.objects.create(**data.model_dump())
return post # That's it! Fully typed, validated, and documented
Why Django devs might care:
- Native Django patterns - no new concepts to learn
- Pydantic validation + Django ORM = ❤️
- Endpoints feature and IDE autocompletion that actually works (PyCharm)
- OpenAPI/Swagger docs generated automatically, with a touch of dark mode
- Just pip install djapy and start coding
Now for the hard part - I need help setting up a proper testing infrastructure. Some questions keeping me up at night:
1. Testing Strategy:
- How do you test type hints in a Django package?
- Best practices for testing Pydantic models with Django?
- Integration tests vs Unit tests ratio?
2. Development Workflow:
- Which pre-commit hooks are must-haves?
- pytest vs unittest for a Django package?
/r/django
https://redd.it/1i0yljq
GitHub
GitHub - Bishwas-py/djapy: No bullshit, Django Rest API Framework
No bullshit, Django Rest API Framework. Contribute to Bishwas-py/djapy development by creating an account on GitHub.
Leviathan: A Simple, Ultra-Fast EventLoop for Python asyncio
Hello Python community!
I’d like to introduce Leviathan, a custom EventLoop for Python’s asyncio built in Zig.
What My Project Does
Leviathan is designed to be:
- Simple: A lightweight alternative for Python’s asyncio EventLoop.
- Ultra-fast: Benchmarked to outperform existing EventLoops.
- Flexible: Although it’s still in early development, it’s functional and can already be used in Python projects.
Target Audience
Leviathan is ideal for:
- Developers who need high-performance asyncio-based applications.
- Experimenters and contributors interested in alternative EventLoops or performance improvements in Python.
Comparison
Compared to Python’s default EventLoop (or alternatives like uvloop), Leviathan is written in Zig and focuses on:
1. Simplicity: A minimalistic codebase for easier debugging and understanding.
2. Speed: Initial benchmarks show improved performance, though more testing is needed.
3. Modern architecture: Leveraging Zig’s performance and safety features.
It’s still a work in progress, so some features and integrations are missing, but feedback is welcome as it evolves!
Feel free to check it out and share your thoughts: https://github.com/kython28/leviathan
/r/Python
https://redd.it/1i0yb1m
Hello Python community!
I’d like to introduce Leviathan, a custom EventLoop for Python’s asyncio built in Zig.
What My Project Does
Leviathan is designed to be:
- Simple: A lightweight alternative for Python’s asyncio EventLoop.
- Ultra-fast: Benchmarked to outperform existing EventLoops.
- Flexible: Although it’s still in early development, it’s functional and can already be used in Python projects.
Target Audience
Leviathan is ideal for:
- Developers who need high-performance asyncio-based applications.
- Experimenters and contributors interested in alternative EventLoops or performance improvements in Python.
Comparison
Compared to Python’s default EventLoop (or alternatives like uvloop), Leviathan is written in Zig and focuses on:
1. Simplicity: A minimalistic codebase for easier debugging and understanding.
2. Speed: Initial benchmarks show improved performance, though more testing is needed.
3. Modern architecture: Leveraging Zig’s performance and safety features.
It’s still a work in progress, so some features and integrations are missing, but feedback is welcome as it evolves!
Feel free to check it out and share your thoughts: https://github.com/kython28/leviathan
/r/Python
https://redd.it/1i0yb1m
GitHub
GitHub - kython28/leviathan: A lightning-fast Zig-powered event loop for Python's asyncio.
A lightning-fast Zig-powered event loop for Python's asyncio. - kython28/leviathan
How Russian hackers nearly killed my Django based business
My wife and I were hiking through the scenic hills of Belgium when I received a concerning email from Amazon Web Services (AWS). The email, titled "Amazon SES Complaint Review Period for AWS Account [\]", contained the following warning:
>Your current complaint rate is 0.5%. We measured this rate over the last 10,351 eligible emails you sent. We recommend that you maintain a complaint rate below 0.1%. If your complaint rate exceeds 0.5%, we might pause your ability to send additional email.
I use AWS Simple Email Service (SES) to send emails for my nonprofit organization, and this warning came as a shock. It indicated that recipients had flagged emails from my system as spam. This was unexpected because I only send emails to individuals who actively subscribe to the service. I never send unsolicited messages.
I run a small nonprofit, TheLifeSigns, which helps people living alone stay safe. Through my website, users can sign up with their email address and provide the email addresses of their chosen "buddies," such as friends or family members. The service sends daily emails with a “lifesign” button. If the user clicks the button, nothing happens. However, if they fail to respond, the system automatically alerts
/r/django
https://redd.it/1i15n7a
My wife and I were hiking through the scenic hills of Belgium when I received a concerning email from Amazon Web Services (AWS). The email, titled "Amazon SES Complaint Review Period for AWS Account [\]", contained the following warning:
>Your current complaint rate is 0.5%. We measured this rate over the last 10,351 eligible emails you sent. We recommend that you maintain a complaint rate below 0.1%. If your complaint rate exceeds 0.5%, we might pause your ability to send additional email.
I use AWS Simple Email Service (SES) to send emails for my nonprofit organization, and this warning came as a shock. It indicated that recipients had flagged emails from my system as spam. This was unexpected because I only send emails to individuals who actively subscribe to the service. I never send unsolicited messages.
I run a small nonprofit, TheLifeSigns, which helps people living alone stay safe. Through my website, users can sign up with their email address and provide the email addresses of their chosen "buddies," such as friends or family members. The service sends daily emails with a “lifesign” button. If the user clicks the button, nothing happens. However, if they fail to respond, the system automatically alerts
/r/django
https://redd.it/1i15n7a
Thelifesigns
TheLifeSigns: Living alone safer
LifeSigns is a simple and free service for people living alone. To make sure you are still okay, our service sends you a daily email with a simple one-click LifeSign button. If one day you cannot press the LifeSign button, an email is automatically sent to…