Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
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/1dsfboc
Add a GUI or not?

I recently convinced my IT department to allow me to install and develop python scripts for internal use in our company. I am the only one with any python knowledge and the ability to run scripts, so in order to share anything with my colleagues I will have to distribute them as .exe files.

I have made my first useful script and now I'm not sure if I should add a simple tkinter gui or not. The script can work on its own as long as it's placed in the folder (it changes some documents and converts them to pdfs).

Here are my thoughts on adding a GUI.

Pros:
It would create a user experience they are more familiar with. It would make the script/app more dynamic as it would make it easier for them to tweak settings.

Cons:
it would increase file size of the .exe, I know it's not a low but some colleagues are old school and will share it by email.
It would make the code more complex and harder to maintain for myself (and potentially others in the future)
Tkinter looks and feels outdated to many users (I know could use another gui framework but that would require I

/r/Python
https://redd.it/1dsebb8
Stockdex: Python Package to Extract Financial data From Multiple Sources

Happy Weekend every one!

Here to showcase stockdex, a Python package that provides an interface to access financial data (e.g revenue, cash flow ...) from data sources such as:
- Yahoo Finance API
- Yahoo Finance website
- Digrin website
- Macrotrends website
- JustETF website (EU etf data)

Data is returned as a pandas DataFrame and it functions similar to yfinance python package.

## Comparison with yfinance

With stockdex, one can access data from multiple sources (not just Yahoo Finance) and unlike yahoo finance which provides only data from last 4 years, stockdex provides data from multiple sources and in some cases, data from the beginning of the stock's existence (e.g macrotrends and digirin have older than 4 years data).

## Target audience

People who are interested in financial data and familiar with python programming language.

## References

For more details or to contribute, feel free to visit the links below:

Github Repo Link

Pypi link

/r/Python
https://redd.it/1ds33vs
G-Scraper: a GUI Web Scraper written in Python

***Source Code:*** [***https://github.com/thegigacoder123/G-Scraper***](https://github.com/thegigacoder123/G-Scraper)

**What my project does:** Provide a GUI interface to scrape webpages

**Target audiences:** Data collectors, web scrapers tired of using terminal, or people who just want to scrape with a nice GUI.

Features of the project:

1. Supports GET and POST requests
2. Can scrape multiple URLs
3. Can scrape multiple elements from a single URL
4. Can send payload/web parameter data with a specific URL, meaning it can also handle login pages.
5. Has a logging function, including error logging
6. Scraping processes run in separate thread from GUI process
7. Stores data in .txt files
8. Generates very unique filenames for logs and scraped data using datetime and random modules.

Some limitations that im working on:

1. Does not provide output to the user on the GUI
2. Delete unwanted/mistype from the entered data
3. Edit a variable once it has been entered

Other features that I am also working on but not prioritizing:

* A preset function: basically user can create presets of scrapes they think will do over and over again to save time. Just load and run the preset.



This is my 2nd big project (1st was a flask website). I am still learning so any and all feedback will be welcomed. Feel free to share any new ideas you

/r/Python
https://redd.it/1dsn27o
Building AI tools should be simple

A few months ago, I was experimenting with AI tools for information retrieval and found the process needlessly complex. Managing RAGs, vector databases, inference services, and multiple API keys among other things. I just wanted to iterate on a few ideas without getting bogged down by all these details that should "just work".

That's why I started working on Firedust. It abstracts away these complexities, minimizing the time from concept to product. Unlike OpenAI's Assistants API, Firedust simplifies the development process and doesn't tie you to a single LLM. You can easily switch between models without downtime. It also allows deployment to Slack, supports group chats, and has data encryption and user privacy built-in.

I’d love to hear your thoughts and feedback!

Source code: https://github.com/ion2088/firedust

Target audience: Developers that want to quickly iterate and deploy AI tools

/r/Python
https://redd.it/1ds3xlk
How do you manifest ideas for projects?

I have learnt basic of python and I’m new to django, I wanted to create a project for my internship so I was wondering how do you people came up with the ideas and how to plan it out, it can open my mind for how and where to get ideas.

/r/django
https://redd.it/1dsnl9i
html <textarea> not interpreting <br>

https://preview.redd.it/65v2g7yzsv9d1.png?width=538&format=png&auto=webp&s=47791506a959d23094dc9d16ba48bc1d5c96d9b1

fetching data with \\n from db rendered to <br>, but <br> not recognising by <textarea> (no new line)

/r/django
https://redd.it/1dsperq
Choosing the Right Architecture for Django Application: Monolith vs. Microservices

Hi there! I'm working on a project for a school system that aims to integrate various existing sites with different sizes and technologies. The portal will include:

* **Student Dashboard:** Students can log in to view their personal information, subject details, exam scores, and class schedules (including who is the teacher, which room, and time of start...).
* **Assignments**: Teachers can upload assignments, students can submit their answers, and teachers can grade submissions and leave comments.
* **Additional Features**: Teacher ratings and exam applications, among other functionalities.

These are just the major features; the portal will have more functionalities than I mentioned here.

# Choosing the Right Architecture: Microservices vs. Monolith

# 1. Microservices vs. Monolith

I'm deciding between microservices and a monolithic architecture. I have no prior experience with microservices but have some ideas on implementation. Which approach would be better for this project?

# 2. Microservices Implementation

If microservices are recommended, how should data management and communication be handled?

* How should other services access necessary data? Should they send requests to the relevant microservice each time they need specific information?

you can give the user an example.

# 3. Efficient Monolithic Design

If a monolithic architecture is preferred, how can we prevent performance issues as the project scales?

* Monoliths can

/r/django
https://redd.it/1dskt3b
Python Polars 1.0 released

I am really happy to share that we released Python Polars 1.0.

Read more in our blog post. To help you upgrade, you can find an upgrade guide here. If you want see all changes, here is the full changelog.

Polars is a columnar, multi-threaded query engine implemented in Rust that focusses on DataFrame front-ends. It's main interface is Python. It achieves high performance data-processing by query optimization, vectorized kernels and parallelism.

Finally, I want to thank everyone who helped, contributed, or used Polars!

/r/Python
https://redd.it/1dspxnn
matplotloom: Weave your frames into matplotlib animations, simply and quickly!

I just wrote up a small package, matplotloom, to simplify and speed up making animations with matplotlib. I've also written some documentation. It's published on PyPI so you can install it with pip, poetry, or conda.

You can see some examples on the GitHub README or in the documentation.

What my project does

To visualize simulation output for computational fluid dynamics I've had to make long animations with complex figures for a long time. The animations consist of thousands of frames and the figures are too complex for FuncAnimation and ArtistAnimation. I would always end up saving a bunch of still images and use ffmpeg to create animations from them. This package basically automates this process.

The main idea behind matplotloom is to describe how to generate each frame of your animation from scratch, instead of generating an animation by modifying one existing plot. This simplifies generating animations. See the example below and how the code inside the for loops is plain and familiar matplotlib. It also ensures that every feature can be animated and that the generation process can be easily parallelized.

import numpy as np
import matplotlib.pyplot as plt
from matplotloom import Loom


/r/Python
https://redd.it/1dssy32
What are your "glad to have met you" packages?

What are packages or Python projects that you can no longer do without? Programs, applications, libraries or modules that have had a lasting impact on how you develop with Python.
For me personally, for example, pathlib would be a module that I wouldn't want to work without. Object-oriented path objects make so much more sense than fiddling around with strings.

/r/Python
https://redd.it/1dsyi19
GitVis -- visualize your git commits locally

What my project does

GitVis is a tool written in Python that allows you to visualize your local commits for the last 6 months from a given date. The visualization is done in a manner similar to GitHub and GitLab, providing a familiar and intuitive interface.

GitHub: https://github.com/aldinash/gitvis

PyPi: https://pypi.org/project/gitvis/

Target Audience

I built this project for fun

Comparison

There is an implementation of this tool in Go. I decided to create a similar project in Python and continue developing a CLI for visualizing the local Git workflow.

/r/Python
https://redd.it/1dso9ao
Flask Blog tutorial: How to only get posts from current user?

Hello all, I am trying to create a workout tracker app in Flask using the the blog tutorial as a starting point.
I know the blog posts in the tutorial are supposed to be public to all users, but I am trying to figure out how to just show the current user their own posts and not the posts from another registered user. I have tried a few different methods but I have been unsuccessful so far. My latest implementation will only show one post per user and if one user has made 2 posts, the second post will be shown to the another logged in user.

Here's a snippet from my blog.py. Not sure if I'm on the right track:

@bp.route("/")

@login_required

def index():

"""Show all the posts, most recent first."""

db = get_db()

posts = db.execute(

"SELECT p.id, train, workout, date, duration, sets, reps, weight, created, author_id, username"

" FROM post p JOIN user u ON p.author_id = u.id"

" WHERE p.id = ?"

" ORDER BY created DESC",

(g.user['id'\],),

).fetchall()

return render_template("blog/index.html", posts=posts)

Please see the rest of my code here:
https://github.com/frenchfrysamurai/myFlaskProject

/r/flask
https://redd.it/1dsza2l
Seeking Feedback: Building DRF-like Views for Flask as a Resume Project - Will It Add Value?

I am thinking of projects that I can show off in my resume. But I am finding it really hard to find a good project idea. Recently I got an idea like why don't I build packages. I am thinking making views for flask like DRF's list/create/retrieve/update/delete views which will also provide authentication and permission handling just like DRF. I am thinking of using Marshmallow for data serialization/de serialization and sqlalchemy for ORM as requirements for this project. What do you think? will this add any value to my resume ? Will people use it if I publish it in PYPI ? Any suggestions? Or what are projects that I can work on for my resume. Should I try to contribute in others open source project instead ?

/r/flask
https://redd.it/1dslgsc
What are your "wish I hadn't met you" packages?

Earlier in the sub, I saw a post about packages or modules that Python users and developers were glad to have used and are now in their toolkit.

But how about the opposite? What are packages that you like what it achieves but you struggle with syntactically or in terms of end goal? Maybe other developers on the sub can provide alternatives and suggestions?

/r/Python
https://redd.it/1dt95io
Cookies not being set in firefox

Like the title states I have a /login endpoint where I set cookies, in this case a access_token and a refresh_token, however when I go to firefox open up my next js app and login, the cookies do not appear inside the the cookie storage. How ever inside the network request you can see the tokens are being set



https://preview.redd.it/zpr39vuyjs9d1.png?width=1445&format=png&auto=webp&s=d64b7fb8f69519d213e39b79122603f30df22b07

https://preview.redd.it/e9u8cfx1ks9d1.png?width=1449&format=png&auto=webp&s=6318c81530a2a96ede5488412c5ec7f7aa3294cf

Does something special have to be done for the tokens to be set in Firefox?? They are set in other browsers such as chrome, and edge. Below I will paste the code related to my /login endpoint and my main entry point for the flask app. Any help is appreciated this has been driving me nuts for hours.

from flask import Flask, jsonify
from sqlalchemy import text
from config import Config
from extensions import db, jwt
from blueprints import authbp
from dotenv import load
dotenv
from flaskmigrate import Migrate
from flask
cors import CORS

loaddotenv()


def create
app():
 

/r/flask
https://redd.it/1dseeha
I made a quiz about my favourite module in the Python standard library: Asyncio

Hey everyone, a few weeks ago I made a quiz about the Python programming language for new Python developers to spark conversation. I've now gone and made another quiz about asyncio, my favourite module in the Python standard library. We use this extensively at work and it is the reason we can continue to use Python in the face of a very competitive space for concurrent programming.


Here's the new quiz: quiz

/r/Python
https://redd.it/1dt97sg
I created my first GUI Python app.

I have developed an application that allows users to download audio and videos from YouTube. You can check out the project on my GitHub: https://github.com/khalildim/youtube_downloader.
I'm looking for some advice and feedback to improve the app.

/r/Python
https://redd.it/1dt7ik7