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
A minimalist web agent for sentiment analysis

Hi folks,

I've spent the last few weeks working on a Software Development Kit for sentiment analysis. I'm using Gemini-flash 2.0 as a planner.

Rabbit SDK is different because the primary focus is research by providing sentiment analysis. Its also minimalist, I've mads it super easy to set up.

What my project does: Gathers web data and provides sentiment analysis. The output is a JSON file.

Target Audience: Version 0.1.0 is a toy project with plans to expand to production.

Comparison: Its similar to browseruse except Rabbit is focused on sentiment analysis.

Github : https://github.com/wchisasa/rabbit


/r/Python
https://redd.it/1k8c2lx
Can AI play a role in creating automated software tests?

In the latest episode of Test & Code, Anthony Shaw and Brian Okken discuss using copilot and other AI tools to generate automated software tests.

Here's the episode: The role of AI in software testing - Anthony Shaw

AI is helping people write code.  
Tests are one of those things that some people don't like to write.   

Can AI play a role in creating automated software tests?  
Well, yes. But it's a nuanced yes.  

Anthony Shaw comes on the show to discuss the topic and try to get AI to write some test for my very own cards project.

We discuss:

The promise of AI writing your tests for you
Downsides to not writing tests yourself
Bad ways to generate tests
Good ways to ask AI for help in writing tests
Tricks to get better results while using copilot and other AI tools

A video version of this discussion was posted by Anthony: [Should AI write tests?](
https://www.youtube.com/watch?v=a_V-BH_luJ4)

I'd love to hear from others:

Are you using AI to help generate (or completely generate) tests?
Do you have any good tricks?
Are there other reasons to NOT try this at home?



/r/Python
https://redd.it/1k8glge
Global private functions? Is this "good practice" in any setting?

I was looking at the `xarray` repo and found this file: [https://github.com/pydata/xarray/blob/2f1751df7fb1d7c2baab9f559b220eb37ecc14e0/xarray/backends/api.py#L4](https://github.com/pydata/xarray/blob/2f1751df7fb1d7c2baab9f559b220eb37ecc14e0/xarray/backends/api.py#L4)

<importing section>


def _get_default_engine_remote_uri() -> Literal["netcdf4", "pydap"]:

# Code.....


I'm not particularly new to the language but I don't recall private functions being outside of a class ever being a good thing, quality-wise.

What am I missing here? Do "API" libraries follow different paradigms?

/r/Python
https://redd.it/1k8kkaq
Pip 25.1 is here - install dependency groups and output lock files!

This weekend pip 25.1 has been released, the big new features are that you can now install a dependency group, e.g. pip install --group test, and there is experimental support for outputting a PEP 751 lock file, e.g. pip lock requests -o -.

There is a larger changelog than normal but but one of our maintainers has wrote up an excellent highlights blog post: https://ichard26.github.io/blog/2025/04/whats-new-in-pip-25.1/

Otherwise here is the full changelog: https://github.com/pypa/pip/blob/main/NEWS.rst#251-2025-04-26

/r/Python
https://redd.it/1k8lav8
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/1k8qtm2
Django Mentor or Learning Partner in Taiwan

Learning Django in Taiwan was kind of hard to find a mentor or people to work with. I can barely find people that using Django or talking about it.
Currently, I'm learning it on my own, but I really happy to have a person that can talk to, even help me to check or discuss even just sharing the progress , so just wondering is there any people that were also into Django are in Taiwan.

/r/django
https://redd.it/1k8t7aj
Posted Hyperion on Product Hunt today

Just a quick update — I posted Hyperion on Product Hunt today, mainly because… why not?
If you want to check it out or leave some love, here’s the link:

https://www.producthunt.com/posts/hyperion-2?utmsource=twitter&utmmedium=social

Thanks again for all the early support!


/r/django
https://redd.it/1k8d5s5
How does Python 3.13 perform vs 3.11 in single-threaded mode?

When Python 3.12 was released, I had held back from migrating my Python 3.11 applications as there were some mixed opinions back then about Python 3.12's performance vs 3.11. Then, 3.13 was released, and I decided to give it some time to mature before evaluating it.

Now, we're in Python 3.13.3 and the last bugfix release of 3.11 is out. When I Google'd, I only found performance studies on Python 3.13 in its experimental free-threaded mode, which is definitely slower than 3.11. However, I found nothing about 3.13 in regular GIL mode.

What are you guys' thoughts on this? Performance-wise, how is Python 3.13 compared to Python 3.11 when both are in GIL-enabled, single-threaded mode? Does the experimental JIT compiler in 3.13 help in this regard?

/r/Python
https://redd.it/1k8zcdi
I've created a simple social media scheduling app with just Django and Alpinejs

Django is such an underrated web framework.

Not sure about you, but my feed is full of javascript frameworks like Nextjs (which introduces breaking changes every 3 months) and is no where near the features Django provides.

But, that's probably because there are more javascript devs than python devs?

And since Django is an old framework with great documentation and questions on the internet on various topics - it works pretty well with LLMs and it helps with speeding up development.

The app is open-source you can check it out here:

https://github.com/ClimenteA/social-media-posts-scheduler


Works as a boilerplate too if you remove the specific code for the app.





/r/django
https://redd.it/1k91zuw
Favorite Admin UI configs

What are some of your favorite admin UI configurations?

Django examples, libraries, packages all welcome!

I’m super basic, just adding backend functionality stuff, organizing custom app labels with a simple 50 line custom_admin.py file etc, but I’m thinking to give the ui a makeover, might even do something dynamic..?

I see some neat lil packages and stuff on a few YT vids but -

Whatchy’all doin’?

🙂

/r/django
https://redd.it/1k975fm
Server and my flask app keeps crashing on VPS.

Hello, I am running a VPS with my flask [app.py](http://app.py) which I can access with ssh. My application is running well for one or two days and then it suddenly stops. I tried to resolve it for many rounds with ChatGPT or LeChat but it won't stop happening. My logs are not helping so much and all the logs in error.txt and output.log also appear when the server is still running fine.

**Now I wanted to ask if I am doing something fundamentally wrong? What am I missing..**

I tried:

* fail2ban. Are bots crashing it?
* checking memory which seemed to be fine
* running a cronjob (monitor\_flask.sh) to at least restart it. But that does not seem to work either.

**Last logs from my error.txt**:

>multiple of these lines >>> 2025-04-26 21:20:06,126 - app - ERROR - Unhandled Exception: 403 Forbidden: You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.

**Last logs from my output.log**

>

>multiple of these lines >>>
\[Sun Apr 27 09:29:01 UTC 2025\] Starting monitor\_flask.sh - Unique Message

>\[Sun Apr 27 09:29:01 UTC 2025\] Activating virtual environment...

>\[Sun Apr 27 09:29:01 UTC 2025\] Virtual environment activated.

>\[Sun Apr 27 09:29:01 UTC 2025\] Flask app

/r/flask
https://redd.it/1k90a8h
RESTful APIs with Flask!!

hello friends! I saw that many of you liked the unofficial flask wiki that me and my colleagues created. We've created a full wiki article on RESTful APIs at the request of some people :)!!! https://flaskwiki.wiki/rs/restful-apis

So I'm coming to you again to ask for feedback, if you have any opinion or even want to add content to the article you can contact me or comment here !!!

Guys really, thank you so much to the people who contributed and the people who helped, especially superchose43, Aland_L, Jason32 they brought a real expertise to this article, I knew so little about restfull ... now i've been in for 3 days straight and I feel like I have hundreds of ideas lmaoo TT

/r/flask
https://redd.it/1k9dx4j
I built ErrorTrace Pro — Make Python errors visual, easier to understand, and log to the cloud

Hi everyone 👋,

I always felt Python error tracebacks were... ugly and sometimes confusing, especially on bigger projects. So I created ErrorTrace Pro — a library to:

Make tracebacks beautiful and visual
Suggest solutions for common errors
Send errors automatically to the cloud for analysis
Help debug faster and smarter

# Why I built it:

I got tired of reading endless walls of red text, so I decided to make error handling more intuitive, clear, and developer-friendly.

GitHub: https://github.com/Hamed233/ErrorTrace-Pro

PyPi: https://pypi.org/project/errortrace-pro/

/r/Python
https://redd.it/1k95s2g
Django Mentor or Learning Partner in Taiwan

Learning Django in Taiwan was kind of hard to find a mentor or people to work with. I can barely find people that using Django or talking about it.
Currently, I'm learning it on my own, but I really happy to have a person that can talk to, even help me to check or discuss even just sharing the progress , so just wondering is there any people that were also into Django are in Taiwan.

/r/djangolearning
https://redd.it/1k8thzq
Best way to upload multiple images.

many to many field doesn't allow multiple image files to be selected and uploaded at once. What work arounds are there for this? Thanks in advance!

/r/django
https://redd.it/1k9i1kk
Deploying Flask app with frontend

I have just created a Flask app to learn Flask and try out TailwindCSS. I want to deploy it for free (it’s a fun project so traffic will be almost zero). It has two Python files: the first contains the program logic that fetches user data using a GraphQL query and returns it, and the second contains the Flask code. For the frontend, I’ve used HTML/CSS, JavaScript, and TailwindCSS.I have not used any database in this program.
How can I safely deploy this app, so I don’t end up with a huge bill if a spammer attacks?

/r/flask
https://redd.it/1k9148r
Advices for cloud

I'm currently working on a web site for a small business and for holding its backend (made in django) I I thought of using google cloud for its pricing, which advices do you give me to do this?

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