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
Things you dont like about python package manager

Share some things you dont like about this.



NOTE: not mentioning the name since the bot is programmed to do too much and whenever i mention it i get flagged



/r/Python
https://redd.it/1drznbg
AI contextualization for scraping

Hi everyone,

I’m the founder and chairperson of the Association of Computer Science students at my university. In my free time, I enjoy creating scripts for our community. Currently, I’m working on a web scraper to collect and share bursaries, internships, graduate programs, learnerships and more with our students through our communication platforms like whatsapp.

However, I’ve encountered a problem, the descriptions of these opportunities vary widely and often don’t explicitly state that they are related to computer science. I want to integrate a tool that can help contextualize these descriptions and determine whether they are relevant to computer science.

Is there a free method to connect my script to an AI service that can assist with this? Any recommendations or advice would be greatly appreciated.

Thank you.

/r/Python
https://redd.it/1ds0r50
Django SaaS Boilerplate

Hi all !

Since quite many people found my previous website template helpful, wanted to share a simple, open-source SaaS boilerplate as well.

You can get the code on Github: [Django saas Boilerplate](https://github.com/PaulleDemon/Django-SAAS-Boilerplate)

You can check out the demo here: [https://django-saas-boilerplate.vercel.app/](https://django-saas-boilerplate.vercel.app/)

Signup is disabled, For demo login use

demo@mail.com
demo123*

This template is built on top of previous template.

**Some of the features of Django Saas boilerplate include**

* **Responsive UI**: Comes with a responsive base template, so you can focus on other parts of your websites.
* **Login flow:** Comes with Login, signup, password rest, etc.
* **Payment integration:** Comes with default stripe integration, add your API keys and get started.
* **Pricing page:** Display exactly what your customers get.
* **Landing page**: Comes with a landing page you can modify.
* **Contact us page**: An inquiry form, to allow your users to contact you.
* **Blog with Trix Editor:** An integrated Trix editor on admin panel to manage and write blogs about your SaaS webstite.
* **Custom User model**: Comes with an existing custom user model you can modify.
* **Tailwind Css:** For rapid prototyping and development.
* **Frontend framework independent**: Comes with basic html, css just enough for your about page, you are free to use any

/r/django
https://redd.it/1ds0ubg
Flask socketio doesn't work on Chrome Android

I made a chat websitee with socketio, firstly I tested in localhost, it worked between PC and ANDROID, then I put it on heroku and bought a custom domain, and I got an SSL certification, but it seems the socketio on android chrome just does not want to connect. I can't solve the issue because there isn't any devtools on android.

/r/flask
https://redd.it/1drziqg
Django 5 By Example: Build powerful and reliable Python web applications from scratch, any good?

Just wondered if anyone had read this book by Antonio Melé and could share their opinions on it as I am considering purchasing it, thanks in advance.

/r/django
https://redd.it/1ds2t2e
A Twitter bot that posts about public domain science fiction books

Source code: https://github.com/ben-n93/pg\_scifi\_twitter\_bot

What my Project Does

Picks a random science fiction book from Project Gutenberg and posts about it on Twitter.

Target Audience
Anyone interested in Twitter bots and/or free science fiction books!

/r/Python
https://redd.it/1ds1xs7
Django REST vs Django Ninja

I'm curious if Django Ninja is mature enough now

/r/django
https://redd.it/1ds6rlt
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