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
pygitzen - a pure Python based Git client with terminal user interface inspired by LazyGit!

I've been working on a side project for a while and finally decided to share it with the community. Checkout [pygitzen](https://pypi.org/project/pygitzen/) \- a terminal-based Git client built entirely in Python, inspired by LazyGit.



**What My Project Does**

pygitzen is a TUI (Terminal User Interface) for Git repositories that lets you navigate commits, view diffs, track file changes, and manage branches - all without leaving your terminal. Think of it as a Python-native LazyGit.


**Target Audience**

I'm a terminal-first developer and love tools like `htop`, `lazygit`, and `fzf`. So this tool is made with such users in mind. Who loves TUI apps and wanted python solution for app like lazygit etc which can be used in times like where there is restriction to install any thing apart from python package or wanted something pure python based TUIs.


**Comparison**

Currently there is no pure python based TUI git client.

* Pure Python (no external git CLI needed)
* VSCode-style file status panels
* Branch-aware commit history
* Push status indicators
* Vim-style navigation (j/k, h/l)



**Try it out!**

If you're a terminal-first developer who loves TUIs, give it a shot:

pip install pygitzen

cd <your-git-repo>

pygitzen


**Feedback welcome!**

This

/r/Python
https://redd.it/1oma4yc
react native(frontend for an application) + django (for backend)

hii guys,
i am new to django and i have a project to make in which we are making and application so i want to ask is django is a nice option to choose as a backend frame ?
has anyone ever tried this combo ?
any help will be appriciated

/r/django
https://redd.it/1olw1ov
Question about flask's integration with react.

Hello, I am trying to develop a website using flask and react. I was told it's sorta powerful combo and I was wondering what kind of approach to take. The way I see it it's two fifferent servers one react and the other is flask and they talk thorugh the flask's api. is this correct?

/r/flask
https://redd.it/1omfhn9
My first AI Agent Researcher with Python + LangChain + Ollama

# What My Project Does

So I always wondered how AI agents actually work — how do they decide what to do, what file to open, or how to run terminal commands like npm run build
So I tried to learn the high-level stuff and built a small local research agent from scratch.

It runs fully offline, uses a local LLM through Ollama, connects tools via LangChain, and stores memory with ChromaDB.
Basically it can search, summarize, do math, and even save markdown notes all in your terminal

# Target Audience

Anyone like me who’s curious about how AI agents actually “think”.
It’s not for production or anything just a fun little learning project that helps you understand how reasoning, tools, and memory connect together.

# Comparison

Most AI assistants depend on APIs or the cloud.
This one runs completely local — no API keys, no servers.
Just you, your machine, and Python doing some agent magic

# GitHub

github.com/vedas-dixit/LocalAgent

Let me know what you guys think!

/r/Python
https://redd.it/1omak5t
How to Classify and Auto-Reply to Emails

In this new tutorial you'll learn how to classify incoming emails using GPT, automatically reply to certain categories, log everything in a SQLite database, and even review or edit replies through a clean web dashboard.

Here's what you'll get out of it:

\- Build GPT-powered email classification (Price Request, Repair Inquiry, Appointment, Other)

\- Save every email + action to a local database for easy tracking

\- Create auto-reply rules with confidence thresholds

\- Add a background thread so your assistant checks Gmail every few minutes - fully automated!

This project teaches valuable skills around Flask, workflow automation, data logging, and safe AI deployment - practical for anyone building AI-powered business tools or productivity systems.

Check the video here: YouTube video

/r/flask
https://redd.it/1omok21
Demo link for a Python based and focused code visualizer

Sorry for bothering you all with additional post noise, but I wanted to put this out here given the relevance to this sub in the hopes some of you might find it interesting. I developed a Python codebase visualizer which is still in the very early stages. I am assessing whether it is something worth further developing or just keeping it focused on what I specifically wanted out of it when I started. I think there is some value to it even though it is not in any way the first of it's kind. Just gauging interest and figuring out where to focus my energy going forward. The other post has additional information and a link to the demo video that I uploaded to youtube. Cheers.

Original Post

/r/Python
https://redd.it/1omoq1q
How is my take on the Flask application factory pattern?

I have been working on this on and off for far too long, but I think I am at a point where I would like some other thoughts or opinions on what I built so far.

Here is the repository (Github).

When I Googled "flask application factory pattern template" I saw tons of results online but nothing that worked the way I wanted it to. So I built my own that is, hopefully, up to some kind of standard. Keep in mind I work mostly with SQL in my day job, I would consider myself a slightly less than average full-stack developer.

My goal with this project is something to give me a decent enough template to build web applications people will actually use.

Here's a little about the stack:

1) Docker to containerize the environment makes it easy to set up and tear down

2) Mysql and phpMyAdmin for the database, it's what I was familiar with so I went with it

3) SQLAlchemy for the simple ORM I have, I also picked it so I do not need a completely different set of SQL scripts for using pytest

4) Caddy for reverse proxy and managing SSL certificates

5) Gunicorn because I am not some monster who runs

/r/flask
https://redd.it/1omtvok
FTS-Tool: Fast Peer-to-Peer LAN File Transfers & Chat

FTS-Tool is a lightweight CLI tool and GUI application for local-network file transfers and communication.

Key features:

LAN chat
Contacts & online users
Intuitive file transfers with progress display
Transfer history tracking

FTS-Tool uses Textual for its GUI and a custom logger for clean CLI output.

What My Project Does:

This tool merges file transfer and chat messaging into one application for ease-of-use and works out the box after install. The behavior of FTS-Tool may be modified by changing the config files in .fts, located in the user directory. The tool is published to pypi and can be installed with the classic pip command: pip install fts-tool.

Target Audience:

FTS-Tool is developed for office environments to make communication and file sharing more straightforward. The tool is supposed to replace the need of uploading a temporary file to a network drive just to transfer to another computer on land. This could take longer than necessary and could clutter or stress the drive with downloading/uploading to a drive for a peer-to-peer transfer.

Comparison:

Fts-Tool is simplified and to the point. It is designed to be intuitive to anyone in the work place. Not just the tech savy employees. Unlike other chat tools, Fts-Tool does not require joining chat rooms and instead

/r/Python
https://redd.it/1omqcem
Best way to get data from server with flask ?

Hi guys I am currently learning web development in that specifically html,css,js,flask and I came across two ways to get the data from the server to my html page one is to send through flask's render template and another is to fetch from js and display it and I am thinking which is the optimal or best way ?

/r/flask
https://redd.it/1omcdbr
I know the basics of Django but I SUCK at design so I give up when I don’t like the design

How do I get over the design troubles? I have a few project ideas for my current job (military, I understand that these projects MAY not go live cause military is picky about stuff like that) but I still would like to see a project through start to finish.

I’ve tried tailwind and daisy, bootstrap (only recently) nothing turns out as I’m hoping. I’ve looked at theme forest for inspiration but those designs are so complex. And right now I don’t want to pay for a theme.

I just want to complete and deploy a project to AWS (wanting to learn AWS along side Django)

/r/djangolearning
https://redd.it/1omx6tr
Having trouble writing to .txt and CSV files while Flask is running.

So I am trying to write simple submission form text from a website to a text file. The form submits fine and I can even print out my data, but it won't write to a text or csv file for some reason. No errors, the file is just empty. I run the same snippit of code in another file that isn't running flask and the code works fine. It writes to the text file. I can even print out the form text and see it in the debug console; but it just won't write to a file. I feel like I'm in the twilight zone.

#this function should work, but it does'nt
def writetotext(data):
with open('DataBase.txt',mode='a') as database:
email=data'email'
subject=data'subject'
message=data'message'
print(f'\n{email},{subject},{message}')
file=database.write(f'\n{email},{subject},{message}')



/r/flask
https://redd.it/1on2o1l
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/1omx03o
R We were wrong about SNNs. The bo.ttleneck isn't binary/sparsity, it's frequency.

TL;DR: The paper reveals that the performance gap between SNNs and ANNs stems not from information loss caused by binary spike activations, but from the intrinsic low-pass filtering of spiking neurons.

Paper: https://arxiv.org/pdf/2505.18608
Repo (please ⭐️ if useful): https://github.com/bic-L/MaxForme

The Main Story:
For years, it's been widely believed that SNNs' performance gap comes from "information loss due to binary/sparse activations." However, recent research has challenged this view. They have found that spiking neurons essentially act as low-pass filters at the network level. This causes high-frequency components to dissipate quickly, reducing the effectiveness of feature representation. Think of SNNs as having "astigmatism" – they see a coarse overall image but cannot clearly discern local details.

Highlighted Results:
1. In a Spiking Transformer on CIFAR-100, simply replacing Avg-Pool (low-pass) with Max-Pool (high-pass) as the token mixer boosted accuracy by +2.39% (79.12% vs 76.73%)
2. Max-Former tried to fix this "astigmatism" through the very light-weight Max-Pool and DWC operation, achieving 82.39% (+7.58%) on ImageNet with 30% less energy.
3. Max-ResNet achieves +2.25% on Cifar10 and +6.65% on Cifar100 by simply adding two Max-Pool operations.

This work provides a new perspective on understanding the performance bottlenecks of SNNs. It suggests that the path to optimizing SNNs may not simply

/r/MachineLearning
https://redd.it/1on7ow7
🆕 ttkbootstrap-icons 3.1 — Stateful Icons at Your Fingertips 🎨💡

Hey everyone — I’m excited to announce v3.1 of ttkbootstrap-icons is bringing major enhancements to its icon system.

## 💫 What’s new

### Stateful icons

You can now map icons to widget states — hover, pressed, selected, disabled — without manually swapping images.

If you just want to map the icon to the themed button states... it's simple

button = ttk.Button(root, text="Home")

# map the icon to the styled button states
BootstrapIcon("house").map(button)


> BTW... this works with vanilla styled Tkinter as well. :-)

If you want to get more fancy...

import ttkbootstrap as ttk

root = ttk.Window("Demo", themename="flatly")

btn = ttk.Button(root, text="Home")
btn.pack(padx=20, pady=20)

icon = BootstrapIcon("house")

# swap icon on hover, and color change on pressed.
icon.map(btn, statespec=[("hover", "#0af"), ("pressed", {"name": "house-fill", "color": "green"})])

root.mainloop()


Icons automatically track your widget’s theme foreground color unless you explicitly override it.
Fully supports all icon sets in `ttkbootstrap-icons`.
Works seamlessly with existing ttkbootstrap themes and styles.

---

## ⚙️ Under the hood

- Introduces StatefulIconMixin, integrated into the base Icon class.
- Uses ttk.Style.map(..., image=...) to apply per-state images dynamically.
- Automatically generates derived child styles like house-house-fill-16.my.TButton if you don’t specify a subclass.
- Falls back to the original untinted icon for unmatched states (the empty-state '' entry).
- Default mode="merge" allows incremental icon-state changes without overwriting existing style maps.

---

## 🧩

/r/Python
https://redd.it/1on22u9
Pyrefly: Type Checking 1.8 Million Lines of Python Per Second

How do you type-check 1.8 million lines of Python per second? Neil Mitchell explains how Pyrefly (a new Python type checker) achieves this level of performance.

Python's optional type system has grown increasingly sophisticated since type annotations were introduced in 2014, now featuring generics, subtyping, flow types, inference, and field refinement. This talk explores how Pyrefly models and validates this complex type system, the architectural choices behind it, and the performance optimizations that make it blazingly fast.

Full talk on Jane Street's youtube channel: https://www.youtube.com/watch?v=Q8YTLHwowcM

Learn more: https://pyrefly.org

/r/Python
https://redd.it/1oncd2l
DP PKBoost v2 is out! An entropy-guided boosting library with a focus on drift adaptation and multiclass/regression support.

Hey everyone in the ML community,

I wanted to start by saying a huge thank you for all the engagement and feedback on PKBoost so far. Your questions, tests, and critiques have been incredibly helpful in shaping this next version. I especially want to thank everyone who took the time to run benchmarks, particularly in challenging drift and imbalance scenarios.

For the Context here are the previous post's

Post 1

Post 2

I'm really excited to announce that PKBoost v2 is now available on GitHub. Here’s a rundown of what's new and improved:

Key New Features

Shannon Entropy Guidance: We've introduced a mutual-information weighted split criterion. This helps the model prioritize features that are truly informative, which has shown to be especially useful in highly imbalanced datasets.
Auto-Tuning: To make things easier, there's now dataset profiling and automatic selection for hyperparameters like learning rate, tree depth, and MI weight.
Expanded Support for Multi-Class and Regression: We've added One-vs-Rest for multiclass boosting and a full range of regression capabilities, including Huber loss for outlier handling.
Hierarchical Adaptive Boosting (HAB): This is a new partition-based ensemble method. It uses k-means clustering to train specialist models on different segments of the data. It also includes drift detection, so only the affected parts of

/r/MachineLearning
https://redd.it/1on8y3y