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/1gdoyr5
# 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/1gdoyr5
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…
SmartProfiler: The All-in-One Solution for Python Performance Insights
# What My Project Does
SmartProfiler is a lightweight Python library that simplifies profiling your code by providing insights into execution time, memory usage, CPU time, and function call counts. Whether you’re optimizing performance, debugging, or monitoring function calls in multithreaded applications, SmartProfiler has you covered with minimal setup and overhead.
# Target Audience
SmartProfiler is perfect for:
Data Scientists who need to optimize data processing tasks.
Developers looking to enhance the performance of their applications.
Researchers who require detailed profiling for simulations or computations.
Anyone working with Python who wants to gain insights into their code's performance.
# Comparison
While many profiling tools focus on specific metrics, such as memory or execution time, SmartProfiler uniquely combines:
Unified Profiling: All-in-one solution for profiling time, memory, CPU, and function calls.
Thread-Safe: Specifically designed for multithreaded environments, avoiding race conditions.
Minimal Overhead: Provides accurate profiling with little impact on application performance.
# Key Features
Function-Level Profiling: Easily profile functions with decorators.
Code Block and Line Profiling: Profile specific blocks or lines using context managers.
Multithreaded Profiling: Supports profiling in concurrent applications.
Flexible Logging: Integrates with Python's logging framework for detailed insights.
Function Call Tracking: Count function calls efficiently in a thread-safe manner.
# Example Usage
# Time Profiling for Functions
/r/Python
https://redd.it/1gdjz16
# What My Project Does
SmartProfiler is a lightweight Python library that simplifies profiling your code by providing insights into execution time, memory usage, CPU time, and function call counts. Whether you’re optimizing performance, debugging, or monitoring function calls in multithreaded applications, SmartProfiler has you covered with minimal setup and overhead.
# Target Audience
SmartProfiler is perfect for:
Data Scientists who need to optimize data processing tasks.
Developers looking to enhance the performance of their applications.
Researchers who require detailed profiling for simulations or computations.
Anyone working with Python who wants to gain insights into their code's performance.
# Comparison
While many profiling tools focus on specific metrics, such as memory or execution time, SmartProfiler uniquely combines:
Unified Profiling: All-in-one solution for profiling time, memory, CPU, and function calls.
Thread-Safe: Specifically designed for multithreaded environments, avoiding race conditions.
Minimal Overhead: Provides accurate profiling with little impact on application performance.
# Key Features
Function-Level Profiling: Easily profile functions with decorators.
Code Block and Line Profiling: Profile specific blocks or lines using context managers.
Multithreaded Profiling: Supports profiling in concurrent applications.
Flexible Logging: Integrates with Python's logging framework for detailed insights.
Function Call Tracking: Count function calls efficiently in a thread-safe manner.
# Example Usage
# Time Profiling for Functions
/r/Python
https://redd.it/1gdjz16
Reddit
From the Python community on Reddit: SmartProfiler: The All-in-One Solution for Python Performance Insights
Explore this post and more from the Python community
5 months ago i asked which course to start django with ,now what's my next step ?
Greetings,
Five months ago, I created a post asking about how to start with Django. Months later, I completed a few courses, including a four-month ALX backend Django-focused course, and I made few basic API projects and few simple CRUD functionality projects using function-based views (FBV) and class-based views (CBV). Here’s one of my projects: https://github.com/Gamaljim/Fitness\_dj\_api (excuse the lack of a README or .gitignore file; I'm still learning how to properly set up a repo).
I'm 30 years old, stuck in a dead-end job in a country I don't want to be in, and I'm doing my best to study after work to shift my career and get back home as soon as possible. After finishing the course, I asked my instructor for feedback, and he said there’s still a lot to learn and that I’m not ready to apply for jobs yet. I understand this, but it did bring me down, and while I wouldn't say I'm depressed, I definitely feel low.
Now, to get to my question: What should I learn next? I've heard about CI/CD, Docker, Redis, and Celery, but these are foreign terms to me, and I don't know where and what to start with.
I hope you understand
/r/django
https://redd.it/1gdr3co
Greetings,
Five months ago, I created a post asking about how to start with Django. Months later, I completed a few courses, including a four-month ALX backend Django-focused course, and I made few basic API projects and few simple CRUD functionality projects using function-based views (FBV) and class-based views (CBV). Here’s one of my projects: https://github.com/Gamaljim/Fitness\_dj\_api (excuse the lack of a README or .gitignore file; I'm still learning how to properly set up a repo).
I'm 30 years old, stuck in a dead-end job in a country I don't want to be in, and I'm doing my best to study after work to shift my career and get back home as soon as possible. After finishing the course, I asked my instructor for feedback, and he said there’s still a lot to learn and that I’m not ready to apply for jobs yet. I understand this, but it did bring me down, and while I wouldn't say I'm depressed, I definitely feel low.
Now, to get to my question: What should I learn next? I've heard about CI/CD, Docker, Redis, and Celery, but these are foreign terms to me, and I don't know where and what to start with.
I hope you understand
/r/django
https://redd.it/1gdr3co
GitHub
GitHub - Gamaljim/Fitness_dj_api
Contribute to Gamaljim/Fitness_dj_api development by creating an account on GitHub.
Developing a Python-based Graphics Engine: Nirvana-3D
Hello community members,
[Crossposted from: https://www.reddit.com/r/gamedev/comments/1gdbazh/developing\_a\_pythonbased\_graphics\_engine\_nirvana3d/ \]
I'm currently working in GameDev and am currently reading and working on a 3D Graphics/Game Engine called: Nirvana 3D, a game engine totally written from top to bottom on Python that relies on
Nirvana is currently at a very nascent and experimental stage that supports importing
While it has some basic support handling different 3D stuff, the Python code has started showing its limitations regarding speed - the rendering of a single frame takes up to 1-2 minutes on the CPU. While Python is a very basic, simple language, I wonder I'd have to port a large part of my code to GPUs or some Graphics Hardware languages like GLES/OpenCL/OpenGL/Vulcan or something.
I've planned the support for PBR shaders (Cook-Torrance Equation, with GGX approximations of Distribution and Geometry Functions) in solid mode as well as PBR shaders with HDRi lighting for texture-based image rendering and getting a
/r/Python
https://redd.it/1gdbl5l
Hello community members,
[Crossposted from: https://www.reddit.com/r/gamedev/comments/1gdbazh/developing\_a\_pythonbased\_graphics\_engine\_nirvana3d/ \]
I'm currently working in GameDev and am currently reading and working on a 3D Graphics/Game Engine called: Nirvana 3D, a game engine totally written from top to bottom on Python that relies on
NumPy Library for matrices and Matplotlib for rendering 3D scenes and imageio library for opening image files in the (R, G, B) format of matrices.Nirvana is currently at a very nascent and experimental stage that supports importing
*.obj files, basic lighting via sunlights, calculation of normals to the surface, z-buffer, and rendering 3D scenes. It additionally supports basic 3D transformations - such as rotation, scaling, translations, etc, with the support of multiple cameras and scenes in either of these three modes - wireframes, solid (lambert), lambertian shaders, etc.While it has some basic support handling different 3D stuff, the Python code has started showing its limitations regarding speed - the rendering of a single frame takes up to 1-2 minutes on the CPU. While Python is a very basic, simple language, I wonder I'd have to port a large part of my code to GPUs or some Graphics Hardware languages like GLES/OpenCL/OpenGL/Vulcan or something.
I've planned the support for PBR shaders (Cook-Torrance Equation, with GGX approximations of Distribution and Geometry Functions) in solid mode as well as PBR shaders with HDRi lighting for texture-based image rendering and getting a
/r/Python
https://redd.it/1gdbl5l
Reddit
From the gamedev community on Reddit: Developing a Python-based Graphics Engine: Nirvana-3D
Explore this post and more from the gamedev community
Django REST framework project for managing product of e-commerce application
I created this Django project for an e-commerce project's product management a few months ago with the Django REST framework.
If anyone wants to use it here is the link.
https://github.com/abdulawalarif/ecommerce\_backend\_DRF
/r/django
https://redd.it/1gdtv66
I created this Django project for an e-commerce project's product management a few months ago with the Django REST framework.
If anyone wants to use it here is the link.
https://github.com/abdulawalarif/ecommerce\_backend\_DRF
/r/django
https://redd.it/1gdtv66
GitHub
GitHub - abdulawalarif/ecommerce_backend_DRF: E-commerce Product API app using Django REST framework
E-commerce Product API app using Django REST framework - abdulawalarif/ecommerce_backend_DRF
🔮Blackjack Strategy Simulator: The Most Comprehensive Open-Source Tool for Blackjack Analysis! 🔮
The **Blackjack Strategy Simulator** is a powerful tool for simulating every possible blackjack scenario to help users find the best move in any situation.
## What My Project Does
It allows you to:
* **Generate custom basic strategy tables** for various rule sets, including card splits and surrender options.
* **Simulate and analyze expected value (EV)** to understand the profitability of different strategies.
* **Calculate the best possible action** for any hand, considering complex rules and deck compositions.
* **Create advanced strategies** that adapt based on card counting or pre-set strategies.
## Comparison to Existing Alternatives
The **Blackjack Strategy Simulator** stands out in a few key areas:
* **Customization:** Unlike many online blackjack calculators, this simulator allows users to configure various game rules, including the number of decks, dealer behavior on soft 17, and advanced options like card counting deviations.
* **Detailed Analysis:** The tool provides a more thorough analysis than most basic calculators, considering complex scenarios such as multiple splits and custom deck compositions.
* **Open-Source Flexibility:** As an open-source project, it is highly customizable, with support for additional strategies and rule sets. Existing alternatives often lack this level of flexibility and transparency.
This tool offers a detailed approach to blackjack analysis by simulating millions of hands with high accuracy and
/r/Python
https://redd.it/1gdg3e9
The **Blackjack Strategy Simulator** is a powerful tool for simulating every possible blackjack scenario to help users find the best move in any situation.
## What My Project Does
It allows you to:
* **Generate custom basic strategy tables** for various rule sets, including card splits and surrender options.
* **Simulate and analyze expected value (EV)** to understand the profitability of different strategies.
* **Calculate the best possible action** for any hand, considering complex rules and deck compositions.
* **Create advanced strategies** that adapt based on card counting or pre-set strategies.
## Comparison to Existing Alternatives
The **Blackjack Strategy Simulator** stands out in a few key areas:
* **Customization:** Unlike many online blackjack calculators, this simulator allows users to configure various game rules, including the number of decks, dealer behavior on soft 17, and advanced options like card counting deviations.
* **Detailed Analysis:** The tool provides a more thorough analysis than most basic calculators, considering complex scenarios such as multiple splits and custom deck compositions.
* **Open-Source Flexibility:** As an open-source project, it is highly customizable, with support for additional strategies and rule sets. Existing alternatives often lack this level of flexibility and transparency.
This tool offers a detailed approach to blackjack analysis by simulating millions of hands with high accuracy and
/r/Python
https://redd.it/1gdg3e9
Reddit
From the Python community on Reddit: 🔮Blackjack Strategy Simulator: The Most Comprehensive Open-Source Tool for Blackjack Analysis!…
Explore this post and more from the Python community
I made a guide on how to debug python using ipdb
I tried to make it as straight to the point as possible. Let me know what you think and if there’s another useful python package you’d like me to check out.
https://youtu.be/EnC9ciDkXqA?si=T-Gm3KfFr-OIgCLN
/r/Python
https://redd.it/1gdwo2h
I tried to make it as straight to the point as possible. Let me know what you think and if there’s another useful python package you’d like me to check out.
https://youtu.be/EnC9ciDkXqA?si=T-Gm3KfFr-OIgCLN
/r/Python
https://redd.it/1gdwo2h
YouTube
How to use ipdb the interactive python debugger
Let's talk about how to debug python without a load of pesky print statements and instead use ipdb - the interactive python debugger.
#programming #python #ipdb #debugger #debugging #coding
Check out the ipdb github here: https://github.com/gotcha/ipdb…
#programming #python #ipdb #debugger #debugging #coding
Check out the ipdb github here: https://github.com/gotcha/ipdb…
MFA for Django rest framework
Hi folks
I created TOTP to our dashboard so users can add MFA i have searched a lot for a package to do it but found nothing
So i have created this package from my code that works very well on production i found other packages but for Django not for rest framework this package is very simple and easy to use
It's my first time to release a Diango package so i wish it can help you and if you found it helpful please give it a star
https://github.com/mohamed-alired/drf-totp
/r/djangolearning
https://redd.it/1gcpbei
Hi folks
I created TOTP to our dashboard so users can add MFA i have searched a lot for a package to do it but found nothing
So i have created this package from my code that works very well on production i found other packages but for Django not for rest framework this package is very simple and easy to use
It's my first time to release a Diango package so i wish it can help you and if you found it helpful please give it a star
https://github.com/mohamed-alired/drf-totp
/r/djangolearning
https://redd.it/1gcpbei
GitHub
GitHub - mohamed-alired/drf-totp: TOTP (Time-based One-Time Password) authentication for Django REST Framework.
TOTP (Time-based One-Time Password) authentication for Django REST Framework. - mohamed-alired/drf-totp
Advice Needed: Developing AI-Driven International Flight Planner for College Project – API Suggestions?
I’m working on my semester-end project, which is an AI-driven International Flight Planner. The goal is to help users find the best flight options tailored to their preferences (budget, airline, layovers, etc.), while also providing useful travel info like visa requirements, layover accommodation suggestions, and booking recommendations based on past pricing trends.
Would really appreciate any input on API selection, as well as any insights on tech stack choices for a project like this. Thanks in advance!
I’m using Django for the backend and considering PostgreSQL for storing flight data. However, I’m still looking into APIs that can provide reliable flight and travel data. I’m especially interested in APIs with a free tier or trial access since this is a college project.
/r/djangolearning
https://redd.it/1gclql4
I’m working on my semester-end project, which is an AI-driven International Flight Planner. The goal is to help users find the best flight options tailored to their preferences (budget, airline, layovers, etc.), while also providing useful travel info like visa requirements, layover accommodation suggestions, and booking recommendations based on past pricing trends.
Would really appreciate any input on API selection, as well as any insights on tech stack choices for a project like this. Thanks in advance!
I’m using Django for the backend and considering PostgreSQL for storing flight data. However, I’m still looking into APIs that can provide reliable flight and travel data. I’m especially interested in APIs with a free tier or trial access since this is a college project.
/r/djangolearning
https://redd.it/1gclql4
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
How to setup a permanent session in default Flask?
If I use Flask-Session to store session data server-side, it is as easy as passing
If I use default Flask to store session data client-side, I need to set
What I don't understand is how to setup the default Flask one. I tried to google, and found this in Stack Overflow. The accepted answer suggests setting it with before\_request, but I think why every request, we need to set
1. How to set permanent sessions in default flask properly? Where to set it?
2. Can you toggle permanent and non permanent session?
3. What should we do after session is expired? What about the session data?
/r/flask
https://redd.it/1gdur94
If I use Flask-Session to store session data server-side, it is as easy as passing
SESSION_PERMANENT = False (not default Flask, unique to Flask-Session) to the app.config, then set the desired expiration time with , PERMANENT_SESSION_LIFETIME = desired_exp_time which is default Flask config. If I use default Flask to store session data client-side, I need to set
PERMANENT_SESSION_LIFETIME = desired_exp_time first, then state session.permanent = True in the request (ex. u/app.route), else I get this error: RuntimeError: Working outside of request context. The docs is somewhat unclear about how to implement, see here.What I don't understand is how to setup the default Flask one. I tried to google, and found this in Stack Overflow. The accepted answer suggests setting it with before\_request, but I think why every request, we need to set
session.permanent = True?1. How to set permanent sessions in default flask properly? Where to set it?
2. Can you toggle permanent and non permanent session?
3. What should we do after session is expired? What about the session data?
/r/flask
https://redd.it/1gdur94
Stack Overflow
Flask permanent session: where to define them?
By default, Flask uses volatile sessions, which means the session cookie is set to expire when browser closes. In order to use permanent sessions, which will use a cookie with a defined expiratio...
How would you handle limits for Free Users without involving stripe?
I'm building the user functionality for my app and want to offer a free tier option with limited capabilities. What's the best way to implement usage restrictions for free users without involving payment processing?
The goals are to:
Allow free users to upload up to 3 photos per month and view up to 10 pages per day
Avoid requiring credit card information upfront, as that may deter signups
Track each free user's usage to enforce the limits
Some options I've considered:
Create a "Free" subscription plan with the desired limits, but set the price to $0. However, this would still prompt for a credit card which I want to avoid.
Add a "paid" boolean field directly to the User model. Set it to false for free users. Then track photo uploads and page views separately without involving subscriptions.
Have a UserUsage model that stores the user's monthly photo uploads and daily page views. Check this on upload/view attempts to enforce limits.
Do you have any other suggestions for tracking free user usage and limits without payment processing involved?
/r/django
https://redd.it/1gdza2x
I'm building the user functionality for my app and want to offer a free tier option with limited capabilities. What's the best way to implement usage restrictions for free users without involving payment processing?
The goals are to:
Allow free users to upload up to 3 photos per month and view up to 10 pages per day
Avoid requiring credit card information upfront, as that may deter signups
Track each free user's usage to enforce the limits
Some options I've considered:
Create a "Free" subscription plan with the desired limits, but set the price to $0. However, this would still prompt for a credit card which I want to avoid.
Add a "paid" boolean field directly to the User model. Set it to false for free users. Then track photo uploads and page views separately without involving subscriptions.
Have a UserUsage model that stores the user's monthly photo uploads and daily page views. Check this on upload/view attempts to enforce limits.
Do you have any other suggestions for tracking free user usage and limits without payment processing involved?
/r/django
https://redd.it/1gdza2x
Reddit
From the django community on Reddit
Explore this post and more from the django community
Beginner in Web Dev – Need Advice on Architecting a Website for a RAG System Chatbot (Using Flask/Python)
I’m building a simple chatbot website to deploy a Retrieval-Augmented Generation (RAG) system I’ve developed, and I need some advice on the architecture. The generator itself runs through an API, and my goal is to keep the setup efficient and fast. I’m experienced in ML but new to web development, so I’d love some pointers on how to structure this in a way that’s simple and effective.
If anyone has experience building a website for a RAG system, I’d love to hear about your architecture—especially how you set up and deployed the API for handling requests. Did you use something specific to optimize for speed and resource management? Any tips for handling responses and managing requests would be super helpful, especially for Flask/Python setups. Thanks in advance!
/r/flask
https://redd.it/1gculgn
I’m building a simple chatbot website to deploy a Retrieval-Augmented Generation (RAG) system I’ve developed, and I need some advice on the architecture. The generator itself runs through an API, and my goal is to keep the setup efficient and fast. I’m experienced in ML but new to web development, so I’d love some pointers on how to structure this in a way that’s simple and effective.
If anyone has experience building a website for a RAG system, I’d love to hear about your architecture—especially how you set up and deployed the API for handling requests. Did you use something specific to optimize for speed and resource management? Any tips for handling responses and managing requests would be super helpful, especially for Flask/Python setups. Thanks in advance!
/r/flask
https://redd.it/1gculgn
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
[D] Demystifying distributed checkpointing
https://expertofobsolescence.substack.com/p/demystifying-distributed-checkpointing
/r/MachineLearning
https://redd.it/1gdkdka
https://expertofobsolescence.substack.com/p/demystifying-distributed-checkpointing
/r/MachineLearning
https://redd.it/1gdkdka
Expert of Obsolescence
Demystifying Distributed Checkpointing
Improving efficiency of LLM training workflow
Dash app : is there a way to store data input by the user ?
i want to make an app where the user types in data manually then these data is plotted (SPC chart, actual data point , avg, USL, LSL etc...) .
As for now i don't know how the Dash app would handle data input ? it looks like Dash provide input component but how would i link this with database for persistent storage ,, ?
Thanks
/r/flask
https://redd.it/1ge3ey4
i want to make an app where the user types in data manually then these data is plotted (SPC chart, actual data point , avg, USL, LSL etc...) .
As for now i don't know how the Dash app would handle data input ? it looks like Dash provide input component but how would i link this with database for persistent storage ,, ?
Thanks
/r/flask
https://redd.it/1ge3ey4
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Alternative to async/await without async/await for HTTP
asyncio is a great addition to our Python interpreters, and allowed us to exploit a single core full capabilities by never waiting needlessly for I/O.
This major feature came in the early days of Python 3, which was there to make for response latencies reaching a HTTP/1 server.
It is now possible to get the same performance as asyncio without asyncio, thanks to HTTP/2 onward. Thanks to a little thing called multiplexing.
While you may find HTTP/2 libraries out there, none of them allows you to actually leverage its perks.
The script executed in both context tries to fetch 65 times httpbingo.org/delay/1 (it should return a response after exactly ~1s)
sync+Niquests+http2
asyncio+aiohttp+http1.1
We would be glad to hear what your insights are on this.
The source in order to reproduce: https://gist.github.com/Ousret/e5b34e01e33d3ce6e55114148b7fb43c
This is made possible thanks to the concept of "lazy responses", meaning that
every response produced by a
See https://niquests.readthedocs.io/en/latest/user/quickstart.html#multiplexed-connection for more details.
## What My Project Does
Niquests is a HTTP Client. It aims to continue and expand the well established Requests library. For many years now, Requests has been frozen. Being
/r/Python
https://redd.it/1gdxqsu
asyncio is a great addition to our Python interpreters, and allowed us to exploit a single core full capabilities by never waiting needlessly for I/O.
This major feature came in the early days of Python 3, which was there to make for response latencies reaching a HTTP/1 server.
It is now possible to get the same performance as asyncio without asyncio, thanks to HTTP/2 onward. Thanks to a little thing called multiplexing.
While you may find HTTP/2 libraries out there, none of them allows you to actually leverage its perks.
The script executed in both context tries to fetch 65 times httpbingo.org/delay/1 (it should return a response after exactly ~1s)
sync+Niquests+http2
This process has 1 connection open
This program took 1.5053866039961576 second(s)
We retrieved 65 responses
asyncio+aiohttp+http1.1
This process has 65 connection open
This program took 1.510358243016526 second(s)
We retrieved 65 responses
We would be glad to hear what your insights are on this.
The source in order to reproduce: https://gist.github.com/Ousret/e5b34e01e33d3ce6e55114148b7fb43c
This is made possible thanks to the concept of "lazy responses", meaning that
every response produced by a
session.get("...") won't be eagerly loaded.See https://niquests.readthedocs.io/en/latest/user/quickstart.html#multiplexed-connection for more details.
## What My Project Does
Niquests is a HTTP Client. It aims to continue and expand the well established Requests library. For many years now, Requests has been frozen. Being
/r/Python
https://redd.it/1gdxqsu
Stack Overflow
What does multiplexing mean in HTTP/2
Could someone please explain multiplexing in relation to HTTP/2 and how it works?
I made a reactive programming library for Python
Hey all!
I recently published a reactive programming library called `signified`.
You can find it here:
* Source - https://github.com/dougmercer/signified/
* Docs - https://dougmercer.github.io/signified/
* PyPI - https://pypi.org/project/signified/
# What my project does
## What is reactive programming?
Good question!
The short answer is that it's a programming paradigm that focuses on reacting to change. When a reactive object changes, it notifies any objects observing it, which gives those objects the chance to update (which could in turn lead to them changing and notifying their observers...)
## Can I see some examples?
Sure!
### Example 1
from signified import Signal
a = Signal(3)
b = Signal(4)
c = (a ** 2 + b ** 2) ** 0.5
print(c) # <5>
a.value = 5
b.value = 12
print(c) # <13>
Here, `a` and `b` are Signals, which are reactive containers for values.
In `signified`, reactive values like Signals overload a lot of Python operators to make it easier to make reactive expressions using the operators you're already familiar with. Here, `c` is a reactive expression that is the solution to the pythagorean theorem (`a **
/r/Python
https://redd.it/1gealvf
Hey all!
I recently published a reactive programming library called `signified`.
You can find it here:
* Source - https://github.com/dougmercer/signified/
* Docs - https://dougmercer.github.io/signified/
* PyPI - https://pypi.org/project/signified/
# What my project does
## What is reactive programming?
Good question!
The short answer is that it's a programming paradigm that focuses on reacting to change. When a reactive object changes, it notifies any objects observing it, which gives those objects the chance to update (which could in turn lead to them changing and notifying their observers...)
## Can I see some examples?
Sure!
### Example 1
from signified import Signal
a = Signal(3)
b = Signal(4)
c = (a ** 2 + b ** 2) ** 0.5
print(c) # <5>
a.value = 5
b.value = 12
print(c) # <13>
Here, `a` and `b` are Signals, which are reactive containers for values.
In `signified`, reactive values like Signals overload a lot of Python operators to make it easier to make reactive expressions using the operators you're already familiar with. Here, `c` is a reactive expression that is the solution to the pythagorean theorem (`a **
/r/Python
https://redd.it/1gealvf
GitHub
GitHub - dougmercer/signified: A Python library for reactive programming (with kind-of working type narrowing).
A Python library for reactive programming (with kind-of working type narrowing). - dougmercer/signified
Comment section like reddit multi-threaded
I am facing difficulties creating multi threaded comment section like reddit in django . It just keep moving to the left like a slanted line . Please refer me some repo or module or any Github link or video
If you have any idea , what could be possible reason just tell me every possible chances.
/r/django
https://redd.it/1ge6o4b
I am facing difficulties creating multi threaded comment section like reddit in django . It just keep moving to the left like a slanted line . Please refer me some repo or module or any Github link or video
If you have any idea , what could be possible reason just tell me every possible chances.
/r/django
https://redd.it/1ge6o4b
Reddit
From the django community on Reddit
Explore this post and more from the django community
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/1geh79w
# 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/1geh79w
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
Copilot hallucinations wanted!
I am preparing a small introduction to github copilot for python for my students of a first year programming course. Of course, with this, there should also be a section on pitfalls. Are there any issues or hallucinations that you have encountered using github copilot?
For now the students have seen just the basics: looping (for and while), if-elif-else, string-methods, lists and user defined methods.
If you know any examples including any of these it would be very nice. Otherwise, examples from basic mathematical analysis, physics, chemistry or biology would also be nice.
I am already planning to make the fibonnaci sequence which it does recursively (very bad runtime).
/r/Python
https://redd.it/1gee1hx
I am preparing a small introduction to github copilot for python for my students of a first year programming course. Of course, with this, there should also be a section on pitfalls. Are there any issues or hallucinations that you have encountered using github copilot?
For now the students have seen just the basics: looping (for and while), if-elif-else, string-methods, lists and user defined methods.
If you know any examples including any of these it would be very nice. Otherwise, examples from basic mathematical analysis, physics, chemistry or biology would also be nice.
I am already planning to make the fibonnaci sequence which it does recursively (very bad runtime).
/r/Python
https://redd.it/1gee1hx
Reddit
From the Python community on Reddit
Explore this post and more from the Python community