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
TelegramCLIBot - Control your server via Telegram from anywhere

I released **TelegramCLIBot v0.1.0**, a personal Telegram bot that turns your phone into a remote CLI for your self-hosted server.

# What it does

Execute shell commands on your server directly from Telegram. Perfect for when you're away from your desk and need to:

* Start/stop your home VPN when traveling
* Restart services
* Run any custom automation scripts remotely

# Key Features

* **Direct command execution** via `/run <command>`
* **Custom command shortcuts** \- Create aliases for frequently used commands (e.g., `/startvpn` → `sudo wg-quick up wg0`)
* **User whitelist authentication** \- Only specified Telegram user IDs can control the bot

# Security Notice

This is designed **exclusively for personal/self-hosted use**. It executes arbitrary shell commands with the privileges of the user running the bot.

**Security measures:**

* User ID whitelist (configured in YAML)
* Recommended to run as non-root user
* 2FA required on Telegram account

# Why I Built This

I wanted a simple way to manage my home server from anywhere without opening SSH ports on my router or dealing with port forwarding/dynamic DNS.

**The Telegram approach:**

* No ports to open - the bot connects outbound to Telegram's servers
* Works from anywhere with internet (Telegram handles the routing)
* Clean mobile interface - just send a message
* Can start your VPN remotely when you

/r/Python
https://redd.it/1ol96ne
D Simple Questions Thread

Please post your questions here instead of creating a new thread. 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.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/1olpzpu
Just launched CrossTray

Hi Guys, I just created a new python library and I would like you to check it out and let me know what you guys think about it?

You can download it using

pip install crosstry

It is a lightweight Python library for creating system tray/menu bar icons across Windows, macOS & Linux (Windows for now as MVP).

But for now it only supports the Windows as this is the MVP idea and I would like you guys to come and contribute. I would be happy to see issues and pull requests coming.

GitHub Link: https://github.com/UmanSheikh/crosstray

/r/Python
https://redd.it/1olqab2
Convert Streamlit App to Django

What's up guys!
I've seen a similar post questioning this a year ago, but the OP just didn't give any context 🤨 So I'll make different:

Currently on my work I'm building a Businesses Intelligence Web App with Streamlit. So far so good! I actually have almost zero complaints about it and I think I made the right choice choosing Streamlit instead of other frameworks when I started this project. Specially because it's quite simple. No databanks (for now) and nothing complex. The application just does a ETL process with some data from Excel and JSON files inside a GitHub repo and displays dinamically for the user.

However, I'm looking forward to other opportunities. I was thinking if would be worth it to refactor my project to a Django + Vue/Angular application. The only reason I would do that is so I could upgrade my portfolio and experience 🤓 I already have some experience with Vue and Django, and Streamlit is not a desired stack out there for the majority of companies...

So, what do you think ?

/r/django
https://redd.it/1olm77o
🌟 Myfy: a modular Python framework with a built-in frontend

What It Does

Tired of gluing FastAPI + Next.js together, I built **Myfy** — a modular Python framework that ships with a frontend by default.

Run:

myfy frontend init

and you instantly get:

📝 Jinja2 templates
🎨 DaisyUI 5 + Tailwind 4 + Vite + HMR
🌗 Dark mode
🚀 Zero config that works out of the box

Target Audience

For Python devs who love backend work but want a frontend without touching JS.
Perfect for side projects, internal tools, or fast prototypes.

Comparison

Unlike FastAPI + Next.js or Flask + React, Myfy gives you a full-stack Python experience with plain HTML + modern CSS.

Repo → github.com/psincraian/myfy
If it sounds cool, drop a and tell me what you think!

/r/Python
https://redd.it/1olyidq
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/1om313b
Why is it so hard for me to think like a programmer?

I’ve learned all the Python basics: variables, loops, functions, conditionals, even *args and all that. I can follow tutorials and solve simple problems on Codewars if I already know what’s being asked.

But when it comes to actually using what I know like building something from scratch or solving a problem I come up with myself my brain just freezes. I can’t seem to connect the dots or figure out how to put everything together.

It’s not that I don’t understand the syntax, I just can’t seem to think creatively with code yet. Is this normal? How do you get past this stage?

/r/Python
https://redd.it/1om3nsq
Solvex - An open source FastAPI + SciPy API I'm building to learn optimization algorithms

Hey,

I find the best way to understand a complex topic is to build something with it. To get a handle on optimization algorithms, I've started a new project called **Solvex**.

It's a REST API built with FastAPI + SciPy that solves linear programming problems. It's an early stage learning project, and I'd love to get your feedback.

**Repo Link:** [`https://github.com/pranavkp71/solvex`](https://github.com/pranavkp71/solvex)

Here are the details for the showcase:

**What My Project Does**

Solvex provides a simple REST API that wraps optimization solvers from the SciPy library. Currently, it focuses on solving linear programming problems: you send a JSON payload with your problem's objective, constraints, and bounds, and it returns the optimal solution.

It uses FastAPI, so it includes automatic interactive API documentation and has a full CI/CD pipeline with tests.

**Example Use Case (Portfolio Optimization):**

Python

import requests

payload = {
"objective": [0.12, 0.15, 0.10], # Maximize returns
"constraints_matrix": [
[1, 1, 1], # Total investment <= 100k
[1,

/r/Python
https://redd.it/1ols60g
Reduino v1.0.0: Write Arduino projects entirely in Python and run transpiled C++ directly on Arduino

Hello [r/python](https://www.reddit.com/r/python/) just wanted to share my new side project i call Reduino! Reduino is a python to arduino transpiler that let's you write code in python and then transpile it into arduino compatible c++ and if you want even upload it for you automatically.

**First Question that comes to mind: How is it different from PyFirmata or MicroPython**

* Unlike micropython Reduino is not actually running python on these MCUs, Reduino just transpiles to an equivalent C++, that can be deployed on all arduinos like Uno which is not possible with Micropython
* On the other hand Pyfirmata is a library that let's you communicate with the MCU via serial communication, the biggest con here is that you can't deploy your code on to the mcu
* Reduino aims to sit in the middle to be deployable on all hardware while giving users the comfort to code their projects in python

**How it works**

Reduino is based on Abstract Syntax Tree to transpile python code into arduino. Basically there are three main scripts that are doing the heavy lifting. Ast, Parser, Emitter

1. Ast: Defines *data structures* that describe everything Reduino knows how to transpile — e.g. `LedDecl`, `LedOn`, `BuzzerPlayTone`, `IfStatement`, `WhileLoop`, etc.
2. Each node is just

/r/Python
https://redd.it/1olvisc
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/1om5smw
Flask Not finding CSS files ( or any other linked files from index.html)

https://preview.redd.it/628mf94vdqyf1.png?width=1952&format=png&auto=webp&s=3ee4bbdf24754742862bb4e25ccd99504b9f07f0

https://preview.redd.it/pihjlu9meqyf1.png?width=2704&format=png&auto=webp&s=6acd8ae7797c89896e04722cccb77774e32b41d9

So I've linked my CSS files in the index.html file as shown in the picture, but all I get when I connect to my server is HTML. The browser is only receiving the index.html file. I have my CSS files in my 'static' folder, none of the files I've linked (including images) are showing up. It's definitely a Flask issue because when I run the index.html in my locally the website pops up just fine. The other attached picture is my python code and file tree. Help me Obi Wan Kenobi!



/r/flask
https://redd.it/1om2mgx
🆕 ttkbootstrap-icons v3.0.0 — More icon sets for Tkinter 🎨

`ttkbootstrap-icons` v3.0.0 is here — bringing Typicons and Meteocons to the growing collection of icon providers for Tkinter and ttkbootstrap.

# 🚀 What’s new

Added Typicons and Meteocons providers
Improved icon browser performance and search
Refined package structure with cleaner glyphmaps
Updated docs with per-provider pages

📘 Docs → https://israel-dryer.github.io/ttkbootstrap-icons

# 🐍 Install

pip install ttkbootstrap-icons ttkbootstrap-icons-typicons ttkbootstrap-icons-meteocons

Everything still works seamlessly with ttkbootstrap and scales perfectly with your widgets.

All via a simple, unified API:

from ttkbootstrapiconstypicons import TypiconsIcon
from ttkbootstrapiconsmeteocons import MeteoIcon

btn = ttk.Button(root, text="Down", image=TypiconsIcon("arrow-down-fill", size=24), compound="left")

You can browse all icons visually with:

ttkbootstrap-icons

15 Icon Packs, One Unified API

|Provider|Description|
|:-|:-|
|🅱️ Bootstrap (built-in)|Default ttkbootstrap icon set|
| Font Awesome (ttkbootstrap-icons-fa)|Solid, regular, and brand icons|
|🧭 Google Material Icons (ttkbootstrap-icons-gmi)|Clean, modern system icons|
| Ionicons (ttkbootstrap-icons-ion)|iOS-style outline and filled icons|
|🎨 Remix Icon (ttkbootstrap-icons-remix)|2,500+ elegant line icons|
|🪟 Fluent System Icons (ttkbootstrap-icons-fluent)|Microsoft’s Fluent UI icons|
|🪶 Lucide (ttkbootstrap-icons-lucide)|Feather-inspired minimalist set|
|💻 Devicon (ttkbootstrap-icons-devicon)|Developer tools & language logos|
|🧩 Simple Icons (ttkbootstrap-icons-simple)|Brand & social logos|
|🌤️ Weather Icons (ttkbootstrap-icons-weather)|Conditions, forecasts & symbols|
|💠 Material Design Icons (MDI) (ttkbootstrap-icons-mat)|Extended Material set|
|💫 Eva Icons (ttkbootstrap-icons-eva)|Elegant outline & filled designs|
|🔣 Typicons (ttkbootstrap-icons-typicons)|Lightweight typographic icons|
|🌦️ Meteocons (ttkbootstrap-icons-meteocons)|Weather & atmosphere

/r/Python
https://redd.it/1omacx3
Introducing Kanchi - A Free Open-Source Celery Monitoring Tool

I just shipped https://kanchi.io - a free open source celery monitoring tool (https://github.com/getkanchi/kanchi)

What does it do

Previously, I used flower, which most of you probably know. And it worked fine. It lacked some features like Slack webhook integration, retries, orphan detection, and a live mode.

I also wanted a polished, modern look and feel with additional UX enhancements like retrying tasks, hierarchical args and kwargs visualization, and some basic stats about our tasks.

It also stores task metadata in a Postgres (or SQLite) database, so you have historical data even if you restart the instance. It’s still in an early state.

Comparison to alternatives

Just like flower, Kanchi is free and open source. You can self-host it on your infra and it’s easy to setup via docker.

Unlike flower, it supports realtime task updates, has a workflow engine (where you can configure triggers, conditions and actions), has a great searching and filtering functionality, supports environment filtering (prod, staging etc) and retrying tasks manually. It has built in orphan task detection and comes with basic stats

Target Audience

Since by itself, it is just reading data from your message broker - and it’s working reliably, Kanchi can be used in production.

It now also supports HTTP basic auth, and Google

/r/django
https://redd.it/1omc3n6
Built a SaaS POS system for African retailers; hosted on Kamatera (Django + React + M-Pesa API)

Hey everyone,

I’ve been working on a POS (Point of Sale) system called RetailHub Pro — built with Django on the backend and React on the frontend. It’s a multi-tenant SaaS platform made for small and medium retailers across Africa, especially walk-in shops and mini-markets.

Each business that signs up gets its own account, stores, and data separation. They can also connect their own M-Pesa API keys (Daraja API), so payments go directly to their accounts instead of a shared wallet.

I’ve hosted both the backend and frontend on Kamatera VPS, using Nginx and Gunicorn for deployment, with PostgreSQL as the main database. I wanted something fast and flexible that I could fully control.

A few of the main features so far:
• Multi-store management under one account
• Automatic stock updates after every sale
• Clean, fast sales interface (works even on low-end devices)
• Profit/loss and daily reports
• Custom M-Pesa payment setup per business

I built this after seeing how many local shops still rely on outdated or expensive POS systems that don’t integrate well with M-Pesa or scale to multiple outlets.

If you’re curious to check it out or give feedback, it’s live here:
👉 **www.retailhubpro.com**

Would

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