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/1g33d10
Multiple Long Running task > 500 seconds stuck in STARTED state
I am building a celery (remote workers) + flask application(using send_task). The issue I am facing is that when I send multiple tasks to the celery worker, the tasks are executed (2 API calls are successful both return 200, one takes less than 60 seconds and the other takes greater than 400 seconds) but the task status is stuck in STARTED state. I have tried to increase the timeout for the API, added the soft_time_limit and time_limit, but whenever I add more task the task start they execute but the state is stuck. If I only send one task then it executes correctly and the status is also updated correctly. I am just not able to figure out the problem.
/r/flask
https://redd.it/1g2zeie
wow redis cache is a game changer..
I made my ecommerce with django + RDS PostgresQL..
It was quite fast, it took about 120~150ms for fetching data..
However, I took 3s for the first page load. it felt a bit slow when I search my page on google or Instagram..
I set redis for caching.. and now 20ms for data fetching and when I go on my site, the page shows immidiately.. less than a sec, it is super fast.. what a game changer..
/r/django
https://redd.it/1g2m3nn
I shared a 1+ Hour Streamlit Course on YouTube - Learn to Create Python Data/Web Apps Easily
Hello, I just shared a Python Streamlit Course on YouTube. Streamlit is a Python framework for creating Data/Web Apps with a few lines of Python code. I covered a wide range of topics, started to the course with installation and finished with creating machine learning web apps. I am leaving the link below, have a great day!
https://www.youtube.com/watch?v=Y6VdvNdNHqo&list=PLTsu3dft3CWiow7L7WrCd27ohlra\_5PGH&index=10
/r/Python
https://redd.it/1g2sip1
Production server help?
This is for my work. I can’t go into it too much here. Currently I am using waitress server. I am getting acceptable performance but I need to improve it. I am using nginx and waitress. Nginx for serving static and acting as reverse proxy. I have done lots of research and alternative options but the problem comes down to is Windows. This is a hard set requirement that it needs to run on windows. I can’t use gunicorn because it doesn’t support windows. I read about CHERRYPY WSGI SERVER - not sure about performance, uWSGI - (but I read it is made for Unix system), I read about hypercorn (I know this is asynchronous server) but it said in documentation that is can be served as sync. I don’t know about the performance. I am not sure.
What are some alternatives web servers that I can use and runs on windows that will give better performance than waitress?
I am pretty new to this so I greatly appreciate for helping me guide to the right direction.
/r/flask
https://redd.it/1g2l9tj
When working with multiple threads working on one model object, is there something about related fields that saves the primary objects data?
I have some celery tasks that run at the same time working on one model object. I'd thought I had been very careful about using transactions.atomic and select_for_update and using update_fields...etc.
I've run into one scenario i cannot explain
`conversion_successful` calls `.delay` on two other tasks and then updated a field on the object, as such:
load_skips.delay(pk=pk)
send_notification.delay(pk=pk)
with transaction.atomic():
m= MyModel.objects.select_for_update().get(pk=pk)
m.system_notes['processing_finished'] = timezone.now().isoformat()
m.save()
However what keeps happening is that the `processing_finished` in `system_notes` is very hit an miss as to whether or not it ends up in `system_notes` at the end of the day.
I tested moving the call to the two other tasks AFTER commiting the `processing_finished` data and its 100% always there. So there's something going on in those other two tasks.
The thing is, the other two tasks are a notification task which only get()'s the model and never saves, while the second task is loading data into a related model like the following:
m = MyModel.objects.get(pk=pk)
m.skips.get_or_create(
/r/django
https://redd.it/1g2cwsc
I'm making a periodic table on python.
I'm making a periodic table that has almost everything that a element can have. I made a Github repository, so check it out! Also, the "discussion" flair is because I know that the code is pretty bad, so if anybody has anything to add (both for the table and for the code ), please tell me!
Github link:
https://github.com/Mountainkaio/Python-s-periodic-table
/r/Python
https://redd.it/1g2af5p
Junior Level Software Developer Hiring
Hi guys, we have added a new job on our platform, if you are looking for a Junior Level Software Developer job please check the link below for more details and apply link
Role - Junior Level Software Developer (Remote, Full-Time)
Job Link - https://devloprr.com/jobs#309
https://preview.redd.it/qcxfqa331aud1.png?width=980&format=png&auto=webp&s=796ffa45c51fde10f06e63c2d9495bbce5a75f4b
/r/flask
https://redd.it/1g1uyjf
Pyloid: A Web-Based GUI Library for Desktop Applications - v0.11.0 Released
# 🌀 What is Pyloid?
Pyloid is the Python backend version of Electron, Tauri, designed to simplify desktop application development. This open-source project, built on **QtWebEngine** and **PySide6**, provides seamless integration with various Python features, making it easy to build powerful applications effortlessly.
# 🚀 Why Pyloid?
With Pyloid, you can leverage the full power of Python in your desktop applications. Its simplicity and flexibility make it the perfect choice for both beginners and experienced developers looking for a Python-focused alternative to Electron or Tauri. It is especially optimized for building AI-powered desktop applications.
GitHub: [Pyloid GitHub](https://github.com/pyloid/pyloid)
Docs: [Pyloid Docs](https://docs.pyloid.com/)
# 🎯 Target Audience
Pyloid is designed for a wide range of developers, particularly those who:
* **Python Developers**: If you are familiar with Python and want to build desktop applications, Pyloid provides a smooth transition to desktop development without needing to learn new languages like Rust or C++.
* **AI and Machine Learning Enthusiasts**: Pyloid is optimized for AI-powered desktop applications, making it an ideal tool for developers who want to integrate machine learning models or AI features directly into their apps.
* **Web Developers**: Developers who are proficient in web technologies (HTML, CSS, JavaScript) and want to bring their skills into desktop app development will find Pyloid's web-based
/r/Python
https://redd.it/1g1w3ox
I Understand Machine Learning with Numpy and PyTorch Better Since I Started Focusing on the Basics
I've recently started appreciating ML in Python more since I began looking at the concepts from the ground up.
For example, I took a closer look at the basics of classification neural networks, and now I have a better understanding of how more complex networks work. The foundation here is logistic regression, and understanding that has really helped me grasp the overall concepts better. It also helped me implementing the code in Numpy and in PyTorch.
If you're also interested in Machine Learning with Python and sometimes feel overwhelmed by all the complicated topics, I really recommend going back to the basics. I've made a video where I explain logistic regression step by step using a simple example.
The video will be attached here: https://youtu.be/EB4pqThgats?si=Z-lXOjuNKEP5Yehn
I'd be happy if you could take a look and give me some feedback! I'm curious to hear what you think of my approach and if you have any tips on how to make it even clearer.
/r/Python
https://redd.it/1g1uuyc
How to handle file uploads with Flask, PostgreSQL, and markdown with restricted access?
I'm working on a Flask application where users can upload various types of files. Here are some examples of how file uploads are used:
Users upload profile pictures or company logos.
When creating a job, users can write a description in markdown that includes image/file uploads for visualization.
Jobs have "Items" (similar to jobs), which also include markdown descriptions with image/file uploads.
Users can comment on Jobs and Items, and the comments can include multiple images/files.
Each of these objects corresponds to a PostgreSQL model (User, Company, Job, Item, Comment), and each model already has CRUD APIs and an authorization map. For example, only users in a company can see Jobs related to that company.
# My Requirements:
1. I want to handle file uploads and display them properly in markdown (like pasting an image and getting a URL).
2. I need to restrict access to image URLs based on the same authorization map as the object that owns the image (e.g., images in a comment should only be visible to authorized users).
3. Images/files should "live" with the object that references them. If the object (e.g., a comment) is deleted, the associated images/files should also be deleted.
# Example Flow:
1. A user starts writing a
/r/flask
https://redd.it/1g00toj
N Kaido Orav and Byron Knoll's fx2-cmix Wins 7950€ Hutter Prize Award!
Kaido Orav and Byron Knoll have improved 1.59% on the Hutter Prize for Lossless Compression of Human Knowledge with their "fx2-cmix" entry.Because the Hutter Prize restricts contestants to a single general purpose processor and it uses the most *general* loss function, the required algorithmic advances are generally applicable regardless of the industry's "Hardware Lottery" or loss function compromises. In this respect it provides a unique and low risk incentive for scientific advancement in machine learning.
Some of fx2-cmix's algorithmic advances over the prior Hutter Prize winning algorithm:
Mixer and Predictor: Mixers now skip weight updates when errors are below a certain threshold, which enhances processing speed.
Single Pass Wikipedia Transform: This update reduces the time and disk usage needed for processing large datasets like Wikipedia by simplifying the transformation process from a previous multi-step approach to a single pass, thereby significantly speeding up preprocessing stages.
New Stemming and Context Methods: Utilizing Natural Language Processing techniques like new word types in stemming processes to create more compact and relevant word streams. This not only improves the quality of the training data but also enhances compression, reducing the storage requirements.
Efficient Article Ordering: By embedding entire articles
/r/MachineLearning
https://redd.it/1g1l725
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1g1npyb
Web Developer Job Opportunity
Hi, we have listed a new job on our platform so if you are looking for a Web Developer job please check the below link
Role - Web Developer / Remote / East Coast 🧑💻 (Remote, Full-Time) 🚀
Job Link - https://devloprr.com/jobs#314
https://preview.redd.it/jafvhphdyvtd1.png?width=989&format=png&auto=webp&s=f72d1448ce1077926d9e037b96552ee7a3695298
/r/flask
https://redd.it/1g0dxpg
Planning a project and getting things “connected”
I think I know the basics of Django but when I comes to connecting the pieces of a project together. For someone with little to no experience, what are ways to learn?
Example. For my work I was thinking of building a “hotel/barracks rooms” management system. Kind of similar to a hotel. Issues; some rooms share a bathroom, some rooms have to be female only since they share a bathroom, if a female is assigned to the room block any male from being assigned. The majority of rooms are male BUT some male rooms will need to be converted if there’s more females than males during that period. I would need a check in and “check out date” we don’t know when they checkout as it depends on them getting in-processed into the installation.
For someone with experience this might seem easy, for someone learning planning a project is difficult. What are some ways to fix this?
/r/djangolearning
https://redd.it/1g2tnd6
rendertemplate refuses to find my html file
hello! i am building a basic flask web app and cannot get render\template to correctly find my html file. i have scoured the web and tried many solutions, but it still says "template file 'index.html' not found". for reference my IDE is PyCharm. I have tried moving index.html in the exact same directory as the app, putting index.html inside a folder called "templates", and giving the Flask object a second input of "template_folder=[file path\]". None of these solutions work. My app.py is shown below (the if name==main part is below it with correct syntax, that just wasn't relevant here). Both app.py and the templates folder are in the same directory.
from flask import Flask, rendertemplate
app=Flask(name)
@app.route('/')
def index():
return rendertemplate("index.html")
/r/flask
https://redd.it/1g309a2
Table don't create in database
Hi guys, I'm new in flask, when I want to create table with this:
with app.app_context():
db.create_all()
Nothing happened. And when I see inside of database there is nothing in there..
I try various methods like app_context().push() and.... But they didn't work.
Can you guide me?
/r/flask
https://redd.it/1g2sag8
Environments Utils - Detect Your (quirky) Python Runtime Environment
Hey, r/Python!
What My Project Does:
Over the years, I’ve been working on a Python package called **Environments Utils** that helps detect characteristics of the environments where your Python script is running. It’s built to handle various edge cases and odd environments I’ve encountered. For example, it can determine if your script runs inside a Jupyter Notebook, on a SLURM cluster, or within Rosetta on macOS. The package also identifies system architecture, operating system, GPU availability, and even whether you have an internet connection - all with no additional dependencies!
Target Audience:
This package is designed for developers and data scientists who work in diverse environments, such as cloud platforms and high-performance computing clusters. I find it particularly useful when I need to adapt a pipeline depending on which system it is being installed on.
Production Use: You can use the package to adapt your script's behaviour based on the runtime environment (e.g., using different logging mechanisms in a SLURM cluster).
Development/Debugging: If you're writing code that needs to adapt to odd environments like Colab, TMUX, or hybrids like macOS Rosetta, this package can save you some headaches. I had several scripts that only broke down in COLAB or Rosetta etc, and this made
/r/Python
https://redd.it/1g2lh97
Why pandas transpose keys from exel provides RangeIndex while only keys provides List
workbook = pd.read_excel('data.xlsx')
workbook.keys():
`\`\`\` Index(['Comment:' 'count'], dtype='object') \`\`\``
workbook.transpose().keys():
`RangeIndex(start=0, stop=128, step=1)`
/r/Python
https://redd.it/1g2iztz
Sunday Daily Thread: What's everyone working on this week?
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/1g2d9f2
Determined to start and deploy webapp before the end of the year
I am super brand new to web development and I know my current passion and determination and confidence is part of the Dunning-Kruger effect
I’m fully aware I know nothing, not even a strong foundation in python
However this week I have built the essential codes for the main product of the web app using colab and chatpgt
I’ll be reinstalling python on my machine (did it wrong the first time lol get to eager and didn’t click on the little box asking about Paths)
Hope it’s okay if I use this group to keep myself accountable and share my journey especially when I eventually realise how much I really don’t know and lose some of my confidence lol
Also the app is meant to be my financial freedom project so with some luck I really do believe I can create something into being that other people will find true value in
Wish me luck x
/r/djangolearning
https://redd.it/1g1wj1n
asyncio vs uvloop vs gevent
What’s the exact difference between asyncio standard library, uvloop, and gevent?
When do I need to use one over another?
Is there recent development better than them?
/r/django
https://redd.it/1g1xf8x
`django-hstore-widget`, a user friendly way to visualize HStoreField in django-admin
Hi, everyone,
I released [`django-hstore-widget`](https://github.com/baseplate-admin/django-hstore-widget)
PyPi link : [django-hstore-widget](https://pypi.org/project/django-hstore-widget/)
This is actually updated fork of a very well established project, [`django-admin-hstore-widget`](https://github.com/PokaInc/django-admin-hstore-widget)
Improvements compared to `django-admin-hstore` :
* Uses [stencil.js](https://github.com/ionic-team/stencil/)
* Uses [flexbox](https://github.com/baseplate-admin/django-hstore-widget/blob/67e17e0da3e8e413bc23b36ac0f403a823687f52/src/components/django-hstore-widget/django-hstore-widget.scss#L16) instead of [float](https://github.com/PokaInc/django-admin-hstore-widget/blob/8a19511403f0dd5d64c350efbed96c01d1a6544e/django_admin_hstore_widget/templates/django_admin_hstore_widget.html#L57C93-L57C112)
* [Simplified logic](https://github.com/baseplate-admin/django-hstore-widget/blob/67e17e0da3e8e413bc23b36ac0f403a823687f52/src/components/django-hstore-widget/django-hstore-widget.tsx) compared to [django-admin-hstore-widget](https://github.com/PokaInc/django-admin-hstore-widget/blob/8a19511403f0dd5d64c350efbed96c01d1a6544e/django_admin_hstore_widget/templates/django_admin_hstore_widget.html)
* Uses emoji as fallback.
* No hard dependency on `jQuery` / `underscore`
* Reduced bundle size.
* [Automated publishing using github actions](https://github.com/baseplate-admin/django-hstore-widget/blob/67e17e0da3e8e413bc23b36ac0f403a823687f52/.github/workflows/CI.yml).
* Dropped support for old browsers.
* Based on web-components
With that being said, i would really appreciate if you guys check the package.
Thank you.
/r/django
https://redd.it/1g1zdye
Reverse Proxying WebSockets to Django Channels Backend with Nginx
https://mindhub365.com/webdev/reverse-proxying-websockets-to-django-channels-backend-with-nginx/
/r/django
https://redd.it/1g18cmn
Dependency injections in Django/Python
Hi, i have a PHP and Java background, i recently started using django to build a basic weather app just to learn the framework. i found out that django doesn't provide a container or binder, so i presume that in python we are supposed to avoid tight coupling some other way. what is the convention to inject an helper class in another? should i use a different paradigm all along? i've thought of constructing them in the \_\_init\_\_.py, but that feels wrong to me. for now i'm simply passing an instance of the object i need when i construct the object in the views file.
pretty much like that
Weather(NeededHelperClass(), other_param)
/r/django
https://redd.it/1g1johj
Tailwindcss or bootstrap in 2024 ?
I like tailwindcss but once I spend two weeks without using it I forget a lot of class names. Also I end up just copy pasting whatever free design I get which is not really deep learning. But I do hate how much it makes my html pages clutered, especially since I mostly build server rendered websites.
Bootstrap seems fine, with way less classes to put on the html so, I hesitate to double down on bootstrap
/r/flask
https://redd.it/1g0408h
D Why does it seem like Google's TPU isn't a threat to nVidia's GPU?
Even though Google is using their TPU for a lot of their internal AI efforts, it seems like it hasn't propelled their revenue nearly as much as nVidia's GPUs have. Why is that? Why hasn't having their own AI-designed processor helped them as much as nVidia and why does it seem like all the other AI-focused companies still only want to run their software on nVidia chips...even if they're using Google data centers?
/r/MachineLearning
https://redd.it/1g1okem
Do I need Nginx if I have a Network Load Balancer in front of Gunicorn / Flask?
I am new to Gunicorn and have seen that it is highly recommended to have it behind some sort of reverse proxy, namely Nginx.
The backend of the application is just a REST API and does not serve any static files. It is running in a private subnet, so the NLB is being used to forward traffic to it. I am not sure how I would do this with Nginx...or even if it is necessary in this case as I already have a load balancer.
Any input or thoughts on this would be appreciated.
/r/flask
https://redd.it/1g1m7pg
Automatic Flowcharts
Are there any tools or libraries that make automatic flowcharts or something similar? Like the call stack when debugging but more like a diagram of all the calls that are made since an if name == '__main__' is executed. It would be useful to see more or less what a program does even if it is not completely accurate.
/r/Python
https://redd.it/1g190dl