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
Automation Framework for Python

What My Project Does

Basically I was making a lot of automations for my clients and developed a toolset that i am using for most of my automation projects.
It is on Python + Playwright (for ui browser automation) + requests (covered with base modules for API automation) + DB module. I believe it maybe useful for someone of you, and I’ll appreciate your stars/comments/pull-requests:

https://github.com/eshut/Inject-Framework

I understand it may be very «specialized» thing for someone, but if you need to automate something like website or api - it makes the solution structured and fast.

Feel free to ask your questions.

Target Audience

Anyone who is looking for software automation on Python for websites or some API

Comparison

I believe there are similar libraries on Typescript as codecept and maybe something similar on python , but usually it is project specific

/r/Python
https://redd.it/1if6nk0
Customize Inline Model Position in Django Admin

Hello everyone!

A few days ago, I ran into an issue while working on one of my projects—a university course selection system. The problem was how to change the placement of inline models.

By default, Django places them at the bottom of the page, but I wanted to position them wherever I needed.

After extensive searching and using AI tools, I couldn’t find a solution. So, I decided to figure it out myself—and finally, I found the answer!

I talked about it in detail on my YouTube channel and shared the final solution in a tutorial.

Hope you find it helpful!

Watch the video here :

https://youtu.be/utUuwUj67oc?si=3MV74_pDHL6PoEkp

/r/django
https://redd.it/1ifhjwj
Problem with connection with server

I'm creating a flask app following the mega-tutorial of Miguel. I'm trying to send an email to me but i receive this error:

ConnectionRefusedError: [WinError 10061\] No connection could be made because the target machine actively refused it

How can i resolve it? I think because the client port is different from server port.

/r/flask
https://redd.it/1if5erj
htmx + Django + Cursor AI is a legit dream.

I am legit blown away. I've been using Cursor lately and I don't think I can go back anymore. Especially when it comes to fullstack development. For those of you not using AI to level up your development I would highly recommend starting.

backstory - I wanted to add a public playground section for my application which included a backend, frontend, and some internal integrations with my existing stuff and about 30 new files and 8k new lines of code later its working just how I want. The best part is it took me 1 day and just prompted the entire thing. Didn't write one bit of html for it. I've been in software engineering for 8 years so I've seen trends come and go but at this point I'm 100% sold on this.

This thing handles django templates with htmx so unbelievably well that I'm convinced anyone can build something very impactful in very little time.


Here's a video of the whole thing https://app.arcade.software/share/4BHHh6THSWxGWCzRBwTd

I wanted

1. To share with you all that this combo, whatever new acronym people end up calling it, is awesome. Big win for the SSR community.

2. Should I live code a session or

/r/django
https://redd.it/1ifnpjz
Parameters for each Django Model Field

I'm really new to django and I cannot find an itemized list of the optional parameters available for each model field. There don't seem to be complete listings in the model fields reference. Anyone know where I can find this information? It's proving much harder than I imagined.



/r/djangolearning
https://redd.it/1ifg7yp
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/1ifk63x
FastAPI Deconstructed: Anatomy of a Modern ASGI Framework

Recently I had the opportunity to talk about the FastAPI under the hood at PyCon APAC 2024. The title of the talk was “FastAPI Deconstructed: Anatomy of a Modern ASGI Framework”. Then, I thought why not have a written version of the talk. And, I have decided to write. Something like a blog post. So, here it is.

https://rafiqul.dev/blog/fastapi-deconstructed-anatomy-of-modern-asgi-framework

/r/Python
https://redd.it/1ifu2sv
Recently Wrote a Blog Post About Python Without the GIL – Here’s What I Found! 🚀

Python 3.13 introduces an experimental option to disable the Global Interpreter Lock (GIL), something the community has been discussing for years.

I wanted to see how much of a difference it actually makes, so I explored and ran benchmarks on CPU-intensive workloads, including:
- Docker Setup: Creating a GIL-disabled Python environment
- Prime Number Calculation: A pure computational task
- Loan Risk Scoring Benchmark: A real-world financial workload using Pandas

🔍 Key takeaways from my benchmarks:
- Multi-threading with No-GIL can be up to 2x faster for CPU-bound tasks.
- Single-threaded performance can be slower due to reliance on the GIL and still experimental mode of the build.
- Some libraries still assume the GIL exists, requiring manual tweaks.

📖 I wrote a full blog post with my findings and detailed benchmarks:
https://simonontech.hashnode.dev/exploring-python-313-hands-on-with-the-gil-disablement


What do you think? Will No-GIL Python change how we use Python for CPU-intensive and parallel tasks?


/r/Python
https://redd.it/1ift077
PedroReports-An Open Source LLM Powered Automated Data Analysis Report Generator Tool

Hey devs! Sharing my first project - an AI-powered PDF Report Generator! 🐍📊

## GitHub: https://github.com/bobinsingh/PedroReports-LLM-Powered-Report-Tool

I recently switched my career from life sciences to coding, and I wanted to create something useful after learning. So I built a tool that generates professional data analysis PDF reports from any tabular dataset. You just need to input what you want to analyze, and it does the job for you. Thought you might find it interesting!

# What My Project Does:

- Takes your dataset and analysis requirements as input in the form of questions
- Uses Gemini API to generate graphs and relevant stats to answer your questions
- Generates a professional PDF with proper formatting
- Handles TOC, styling, and page numbers automatically

# Target Audience:
- Data Analysts, BI reporters
- Data Science beginners who want quick data insights
- Researchers who are not friendly with coding

# Comparison
- There are a lot of BI tools out there but not sure if they generate PDF reports or not.

## Tech Stack:

- Python + ReportLab for PDF generation
- React + Vite for frontend and development server
- LangChain + Gemini API for analysis
- Pandas/Numpy/Matplotlib for data processing

The workflow is simple: feed it your data, and it handles everything from

/r/Python
https://redd.it/1ifqz4j
I made this! Flask and Jinja templates, and MongoDB for the database.

https://www.spacetranslate.org/


/r/flask
https://redd.it/1ify31e
Django looks like a play

I can see why Quentin wants to do theatre plays I think he could do a TV series as well Django looks like a live play lol

/r/django
https://redd.it/1ig7eu8
Problem with sending email system

i'm trying to config a Gmail account's email server, bit when i run the application, i receive this error:

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8
https://support.google.com/mail/?p=BadCredentials
5b1f17b1804b1-438e244f38esm124208605e9.26 - gsmtp')

My configuration is:

MAIL_SERVER=smtp.googlemail.com
MAIL_PORT=587
MAIL_USE_TLS=1
MAIL_USERNAME=my.username1234
MAIL_PASSWORD=my google app password (I tried to write it attached but i receive the same error)

/r/flask
https://redd.it/1ifz6gh
How do you design your project?

So, I'm currently in the process of learning back-end development. Knowing python from before, i decided on starting out with Django.

I was wondering how should i design me project. Like the layout (how many & what apps, models, etc). The first step i figured would be to list out all the features i would like in my project.

I'm stumped on what to do after this though.

So, can y'all tell me how you guys go about it?

Any tips & tricks would be very helpful as well.

/r/djangolearning
https://redd.it/1icm5u1
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/1igbnik
Pyttings – A Minimalist Python Settings Manager Inspired by Django

I wanted to share Pyttings, a lightweight Python settings manager with namespacing, modular files, and automatic type parsing. It’s inspired by Django’s settings but designed to be minimal and flexible.

GitHub: https://github.com/ruitcatarino/pyttings

# What My Project Does

Pyttings simplifies application configuration by allowing you to:

Namespaced Settings: Use a prefix (e.g., `PYTTING_`) to avoid conflicts.
Custom Prefix: Change the prefix using PYTTING_ENV_PREFIX.
Modular Settings: Load settings from a module with `PYTTING_SETTINGS_MODULE`.
Environment Variables: Override settings easily, with automatic type parsing.

# Target Audience

Pyttings is production-ready and ideal for:

Developers who want a simple, minimal settings manager.
Applications that need modular, environment-based configurations.
Users looking for an alternative to `pydantic-settings` or Django-style settings.

# Comparison

Compared to Django’s settings, Pyttings is framework-agnostic and much lighter.
Compared to `pydantic-settings`, Pyttings has:

A smaller footprint – no external dependencies.
Minimalist design – no validation, just simple settings management.
Explicit and easy-to-use API – define settings as plain Python variables.

Would love your feedback! Let me know what you think or if you have suggestions.

/r/Python
https://redd.it/1iga8kx
D Self-Promotion Thread

Please post your personal projects, startups, product placements, collaboration needs, blogs etc.

Please mention the payment and pricing requirements for products and services.

Please do not post link shorteners, link aggregator websites , or auto-subscribe links.

--

Any abuse of trust will lead to bans.

Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

--

Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.

/r/MachineLearning
https://redd.it/1ifnw79
OAuth 2 authorisation flow with django-oauth-toookit

I have a vanilla JS SDK with a django backend. I want to implement the OAuth 2 Authorization flow with PKCE for users who will use the SDK. I am using django-oauth-toolkit for the same. I have to redirect the user to the Auth page where he can give permission. Then the redirect uri points to an endpoint in my django server and the code is exchanged for access token. Everything is fine till this point. But now, how do I let my SDK know that the auth flow is complete and now I can request for the access token from the backend and start using it.
NOTE: my SDK can be used in different pages, so there is no single source of origin for any request.

/r/djangolearning
https://redd.it/1igijvy
Found this cool Python WFP library that makes network filtering super easy in Windows!

Found this cool Python WFP library that makes network filtering super easy

Just discovered PyWFP while looking for a way to handle Windows Filtering Platform in Python. It's pretty neat - lets you create network filters with really simple syntax, similar to Windivert if anyone's familiar with that.

Quick example of what you can do:

from pywfp import PyWFP
pywfp = PyWFP()
filter_string = "outbound and tcp and remoteaddr == 192.168.1.3 and tcp.dstport == 8123"

with pywfp.session():
pywfp.add_filter(filter_string, filter_name="My Filter")

The syntax is really straightforward - you can filter by:

* TCP/UDP/ICMP

* IP ranges

* Specific ports

* Inbound/outbound traffic

Been playing with it for a bit and it works great if you need to programmatically manage Windows network filters. Thought others might find it useful!

Link: Github

/r/Python
https://redd.it/1ign06a
I need help with Fullcalendar Flask Project

For some reason events cannot be added on calendar, but if I were to add events manually (both on index.html or directly on database) it can be seen. Any ideas?

app.py: https://codefile.io/f/qrT0duwAmo

index.html: https://codefile.io/f/elAUexD7vK

/r/flask
https://redd.it/1igov0s