Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels
loadfig - One-liner pyproject.toml config loader. Lightweight, simple, and VCS-aware (git, hg, svn)
## What my project does
Hey all, I have created a small utility library loadfig
which loads tool configuration from pyproject.toml
(or from .TOOL-NAME.toml
).
No bells and whistles (like overriding by envvars
), no third party dependencies, just this very task (added a basic root finding in git
and two other VCS
as I find it a very common need).
IMO this allows for a unified loading approach which adheres to the most common standards I've noticed in modern tooling.
> GitHub repository: https://github.com/open-nudge/loadfig
## Example
Assume you have the following section in your pyproject.toml
file at the git-enabed root of your project:
[tool.mytool]
name = "My Tool"
version = "1.0.0"
pyproject.toml
based on git directory):import loadfig
config = loadfig.config("mytool")
config["name"] # "My Tool"
config["version"] # "1.0.0"
pyproject.toml
, usually tool creators.toml
(including builtin Python's tomllib
) and configuration loaders (e.g. dynaconf or python-dotenv), but these are usually:🖥️ KumaTray - A native Uptime Kuma monitor for your Windows System Tray (forget the browser).
What My Project Does
KumaTray is a lightweight Windows system tray application that lets you monitor your Uptime Kuma instances without needing to keep a browser tab open.
It runs quietly in the background and instantly notifies you if any of your services go down. No clutter, no distractions — just the essential alerts you need to act fast.
Target Audience
Anyone who uses Uptime Kuma and wants a native, no-browser-needed monitoring tool for Windows.
Installation:
You can run it from source code (Python 3.9+) or download a standalone .exe
The repository: https://github.com/querylab/kumatray
Website: https://kumatray.com/
I hope someone else finds it useful! I welcome any comments or suggestions.
/r/Python
https://redd.it/1lzjre4
Just published django-metachoices, my first open-source package on PyPI
Hey people, I want to share about my first open-source package on PyPI for Django!
PyPI: https://pypi.org/project/django-metachoices/
GitHub: https://github.com/luqmaansu/django-metachoices
Installation: `pip install django-metachoices`
django-metachoices a field extension that allows choices to have rich metadata beyond the standard (value, display) tuple.
For example, instead of the normal choices definition like
STATUS_CHOICES = {
"ACTIVE": "Active",
"INACTIVE": "Inactive",
}
with
status = models.CharField(choices=STATUS_CHOICES)
That automatically gives you get_status_display, ok. But with django-metachoices, we can have a much richer associated info like
STATUS_CHOICES = {
"ACTIVE": {
"display": "Active",
"color": "#28a745",
"description": "User is active and can access the system",
"icon": "check-circle",
"priority": 1,
},
"INACTIVE": {
"display": "Inactive",
"color": "#6c757d",
"description": "User is inactive and cannot access the system",
"icon": "x-circle",
"priority": 2,
},
}
And
/r/django
https://redd.it/1lzgv0v
How much Django makes someone a "great developer"
I know this might sound like a basic question, but I’ve been wondering, what does it *really* take to be considered 'good at Django'? Is there a clear list of features or concepts I should know inside out to stand out to recruiters and make companies genuinely interested in hiring me? I want to go beyond just building apps; I want to reach a level where my Django skills genuinely impress.
/r/django
https://redd.it/1lz5dlx
Photon: A Collection of Photography Utilities
What My Project Does
Adds borders to images.
You can save border settings.
Batch apply borders to images
Focal length analysis.
Extracts focal lengths from a folder of images and creates a histogram.
Useful to figure out which prime lens you want to invest in.
Shutter Count tool.
Keep track of how used your camera is and when buying used gear.
I am currently working on adding AI features to make it easier to organize and select photos to edit/post.
Target Audience
Photographers who need simple free tools. Anyone who needs to apply borders to images before posting. Anyone who wants to figure out which prime lens to buy.
Comparison
I didn't see any similar stand-alone apps before deciding to build this project. Adobe MIGHT have something but since I am not their customer, I was not able to test that out.
Github
Source code
Demo
Demo video
/r/Python
https://redd.it/1lz0dwz
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/1lz7thr
I hate Microsoft Store
This is just a rant. I hate the Microsoft Store. I was losing my mind on why my python installation wasn't working when I ran "python --version" and kept getting "Python was not found" I had checked that the PATH system variable contained the path to python but no dice. Until ChatGPT told me to check Microsoft Store alias. Lo and behold that was the issue. This is how I feel right now https://www.youtube.com/watch?v=2zpCOYkdvTQ
/r/Python
https://redd.it/1lyz5f6
Flask restx still useful?
I recently noticed that Flask Restx is no longer actively maintained, yet a lot of projects are using it. Is there community interest to revive it?
/r/flask
https://redd.it/1lxwmvd
D What are the best industry options for causal ML PhDs?
Hi everyone,
I’m a rising third-year PhD student at a \~top US university, focusing on causal inference with machine learning. As I navigate the intense “publish or perish” culture, I’m gradually realizing that academia isn’t the right fit for me. Now that I’m exploring industry opportunities, I’ve noticed that most of the well-paid ML roles in tech target vision or language researchers. This is understandable, since causal ML doesn’t seem to be in as much demand.
So far, I have one paper accepted at ICML/NeurIPS/ICLR, and I expect to publish another one or two in those venues over the next few years. While I know causal inference certainly provides a strong foundation for a data scientist role (which I could have landed straight out of a master’s), I’d really like a position that fully leverages my PhD training in research such as research scientist or applied scientist roles at FAANG.
What do you think are the most (1) well-compensated and (2) specialized industry roles for causal ML researchers?
Clarification: There are two main flavors of “causal ML” research. One applies machine learning techniques to causal inference problems, and the other incorporates causal structure into core ML methods. My work falls into the first category, which
/r/MachineLearning
https://redd.it/1lyfijr
Target Propagation: A Biologically Plausible Neural Network Training Algorithm
# What My Project DoesTarget propagation
was a biologically plausible alternative to backpropagation introduced in 2015 by Yoshua Bengio. I implemented the original paper to find out why it did not go mainstream.
# Target Audience
Researchers interested in alternatives to backpropagation and other gradient-based neural network training algorithms
# Comparison
Biologically-inspired alternatives to gradient-based learning include the
\- forward-forward algorithm (Hinton, 2022),
\- NEAT or Neuro-Evolution of Augmenting Topologies (Stanley & Miikkulainen, 2002),
\- equilibrium propagation (Bengio & Scellier, 2016)
\- direct feedback alignment (Nøkland, 2016)
\- NoPropagation
I compared Target Propagation to backpropagation only and found it super slow tbh.
# Github
Repository: https://github.com/MurageKibicho/Target-Propagation
# Caveats
Target propagation seems unlikely to ever go mainstream. It is rather slow compared to backprop
/r/Python
https://redd.it/1lysa6q
Seeking 2 Technical Co-Founders (Equity) - Build AI Navigation for Africa’s Cities
We’re a Nairobi-based startup building an AI-powered urban mobility platform for 2.5M+ daily commuters. Join us as founding mobile developers for significant equity.
What you’ll build:
📍 Real-time navigation engine for informal transit systems
📍 Live mapping with dynamic route optimization
📍 AI-driven tools for low-bandwidth environments
📍 Mass-adoption UI (multi-literacy/language support)
We need:
✅ Flutter/React Native experts with iOS/Android native experience
✅ Map SDK pros (Google Maps/Mapbox - live tracking, routes, markers)
✅ Backend builders (Node.js/Python + Firebase/PostgreSQL)
✅ AI integrators (third-party APIs, NLP, low-bandwidth optimization)
✅ Portfolio showing complex shipped mobile apps
You are:
🔥 Passionate about solving Africa’s urban mobility challenges
💸 Comfortable with equity-based compensation (no salary until funding)
🌍 Able to work remotely in agile sprints
Offer:
✔️ Significant founder equity + decision-making power
✔️ Lead architecture of a high-impact solution
✔️ Performance bonuses post-launch
Apply:
1. GitHub/live project links
2. Send to: **investmentsinfinte@gmail.com** (Subject: Reddit Co-Founder)
Confidentiality: Shortlisted candidates sign an NDA before technical briefing.
/r/Python
https://redd.it/1lyomyb
Is there a way to get django.conf.settings to autocomplete?
I can't seem to find a good solution to this. I import settings with `from django.conf import settings`, and then when I type `settings.`, I don't see any of my variables. I'm using VSCode. I tried installing django-stubs and pylance, but I'm still not seeing the variables. If I do `from app import settings`, I can see the values. It seems like an extension to show the autocomplete from that path wouldn't be too difficult, but I'm not finding much info on it.
/r/django
https://redd.it/1lyhuwe
shenzi: A greedy python standalone bundler
# What My Project Doesshenzi
creates standalone python applications from your virtual environment, written in Rust. You should be able to ship that folder to any machine (without python installed), and the application should work. It would generate a dist
folder, containing the interpreter, all python code and all the shared libraries the code depends on (it adds the whole transitive closure of all shared library dependencies too).
# Target Audience
Developers interested in making python desktop applications.
# Comparison
The use-case is the same as PyInstaller.
There are some differences though:
`shenzi` does not do any static analysis of your source code. The general workflow is to run as much of your application as possible, `shenzi` would intercept all loads during runtime
The idea is to copy the linker as closely as possible. Thats why, shenzi
also analyses all shared libraries in the same order as what happened during runtime
`shenzi` is thus more IO intensive compared to PyInstaller, performance can vary due to these differences in the algorithm.
The final application structure is closer to pnpm
node_modules structure
My hope is that being faithful to linker might cover a lot of edge cases, I'm not sure if it's the correct approach
/r/Python
https://redd.it/1lybxrk
First Django Project: Confused About User Registration with Multi-Tenancy
Good evening everyone, how are you?
I'm developing a project in Django (it's my first one), and I'm a bit confused about the user registration and login system.
The idea is to have a landing page that includes a form to register both the user and the company, with the following fields:
Username, email, password, company name, and ID
This part is already done and working — it saves the data to the database and correctly creates the link between the user and the company.
However, I'm not sure if this is the best approach for user management in Django, since the framework provides a specific library for handling users and authentication.
This project uses a multi-tenant architecture, and that’s what makes me question the best way to implement user registration.
/r/djangolearning
https://redd.it/1lyc6jq
Flask app that generates ad copy using AI and Amazon product data
https://blog.adnansiddiqi.me/building-an-ai-powered-amazon-ad-copy-generator-with-flask-and-gemini/
/r/flask
https://redd.it/1lxutp1
Introducing Frago: A Django App for Secure, Resumable, Parallel Chunked Uploads
Hey Pythonistas 👋,
I'm excited to share **Frago**, a Django app I built to make large file uploads secure, resumable, and **parallel** — with support for integrity checks, duplicate detection, and pluggable authentication.
It's especially useful for projects like drone data collection, video platforms, or IoT workflows.
# 🔧 What is Frago?
**Frago** (short for “Fragmented Go”) is a reusable Django package that supports:
✅ Parallel + resumable **chunked uploads**
✅ File integrity verification (MD5/SHA256)
✅ Duplicate chunk detection
✅ Expirable uploads & chunk cleanup
✅ Django signal hooks for customization
✅ Pluggable authentication (JWT/user/device)
✅ Works great with large files and unstable networks
# 🛠️ Built With
* Python 3.11
* Django
* DRF
* `httpx`, `aiofiles`
* GitHub Actions (for PyPI publishing)
# 📚 Repo + Docs
🗂 GitHub: [https://github.com/Albinm123/frago](https://github.com/Albinm123/frago)
📦 PyPI: [https://pypi.org/project/frago](https://pypi.org/project/frago)
📖 Readme: [README.md](https://github.com/Albinm123/frago#readme)
🙏 Feedback Welcome
This is still early-stage — I’d love feedback, contributions, ideas, or just a ⭐️ if you find it useful!
Thanks for reading!
— [@Albinm123](https://github.com/Albinm123)
/r/django
https://redd.it/1lzlwaz
DRF or django-ninja?
I been in my django learn adventure for half a year now. I already did a couple web apps with different deploying (one using wagtail), and a small app with django-rest-framework essentialy to post and get data of a postgres database with authentication.
I want to learn more about building APIs, since i feel that is the go to for working with teammates (i work in data science / analytics). I been in this community since my learning started, and lately i seen a lot of django-ninja mentions due to the boom of fastAPI. I been neglecting to learn fastAPI, because the ORM and django admin panel feel awesome to me. So, mi questions are: what are the pros and cons of using django-ninja over drf?
you get the same pydantic-async-documentation features that fastAPI give you?
building an API with django-ninja is as straightforward than doing it with drf?
In my proyect with drf i use drf-spectacular, so i get the automatic documentation, but i dont know a thing about async or python types and its advantages. Right now i'm working on a proyect that involves connecting to multiple external APIs and waiting for their responses, its django-ninja the go to here? or
/r/django
https://redd.it/1lzktik
Updated Document Intelligence Framework Benchmarks
It's been a week and a bit since the last post on this subject. I've been working hard on improving the Python Document Intelligence Framework CPU Benchmarks and also added a new framework (Extractous).
The benchmarks are a comprehensive CPU-only benchmark analysis of 18 file formats across 5 document intelligence frameworks. The benchmarks are ran using GitHub CI - currently only on linux. I plan to add matrix benchmarking on Mac and Windows in the near future.
Note: I am the author of Kreuzberg, the clear leader of said benchmarks. If you think this means my work is tainted or biased, I suggest you stop reading here - this post is probably not for you.
## Performance Rankings
### Speed Performance (files/sec)
| Framework | Tiny (<100KB) | Small (100KB-1MB) | Medium (1-10MB) | Large (10-50MB) | Huge (50MB+) |
|-----------|---------------|-------------------|-----------------|-----------------|--------------|
| Kreuzberg Sync | 34.54 | 8.72 | 2.57 | 0.44 | 0.70 |
| Kreuzberg Async | 20.68 | 9.69 | 3.17 | 0.71 | 0.88 |
| Markitdown | 25.89 | 2.58 | — | 0.01 | 0.01 |
| Unstructured | 4.73 | 0.89 | 0.06 | 0.00 | 0.01 |
| Extractous | 3.07 | 4.14 | 0.06 | 0.02 | 0.11 |
| Docling |
/r/Python
https://redd.it/1lzfz3o
python official version manager - Pymanager
python/pymanager: The Python Install Manager (for Windows)
it seems python released it's own version manager (like pyenv, uv) , which can help manager mutiple python versions and set default , auto download ...
it't very new , i just found out yesterday , i didn't see people talk about it
any way , it's new and provide more options , we can try it .
/r/Python
https://redd.it/1lz86lm
Python's concurrency options seem inadequate for my project
I am the author of marcel, a shell written in Python (https://marceltheshell.org, https://github.com/geophile/marcel).
I need some form of concurrency, and the options are all bad. I'm hoping someone here can point me in another direction, or provide some fresh insight.
Marcel command execution is done as a *Job*, which normally runs in the foreground, but can be suspended, or run in the background, very much as in bash.
I started off implementing Jobs as threads. But thread termination cannot be done cleanly (e.g. if a command is terminated by ctrl-C), so I abandoned that approach.
Next, I implemented Jobs using the multiprocessing module, with the fork option. This works really well. But python docs advise against fork on MacOS, because MacOS system libraries can start threads which are incompatible with the multiprocessing module.
One alternative to fork is spawn. This requires the pickling and unpickling of a lot of state. This is slow, and adds a lot of complexity (making various marcel internal objects pickleable).
The last multiprocessing alternative is forkserver, which is poorly documented. There is good information on these multiprocessing alternatives here: https://stackoverflow.com/questions/64095876/multiprocessing-fork-vs-spawn
So I'm stuck. fork works well on Linux, but prevents marcel from being ported to MacOS. I've been trying to get
/r/Python
https://redd.it/1lyw6dy
Proficiency level of mine?
Based on the concepts i know, what is my django proficiency level? Should i call myself a Beginner? Intermediate? or Advanced?
Concepts I currently know:
1. Basic django setup (setting up directories and few settings to run a test server), setting up html template
2. views (which are functions that process data and generate a html page)
3. URL routing
4. Template setup: has html pages
5. Django Admin setup
6. Django Models
7. Django Forms
8. passing context data to templates (to make use of data from the database into the html templates)
9. Usage of Media Files
/r/djangolearning
https://redd.it/1lynsf6
Happy 20th birthday Django!
https://www.djangoproject.com/weblog/2025/jul/13/happy-20th-birthday-django/
/r/django
https://redd.it/1lyp6pm
Flask REST BoilerPlate generator
Hey everyone,
I'm thinking of building a free web app where developers can select features they need for a Flask-RESTful-based backend, and download a ready-to-run ZIP with all boilerplate code.
Some of the options you'd be able to choose from:
Flask-RESTful API structure
Logging (console + file, separate error log)
Firebase Auth integration with decorators
Stripe payment + webhook integration
Plan validation support in API
Request/response logging, HTTP header validation
Basic analytics hooks (with possible analytics storage in Firebase via Celery+Redis)
API endpoint to call different LLMs (mainly OpenAI first to start with).
The idea is that you'd just add your business logic — all the tedious, repeating saas setup is done for you. This is not AI generation, just boilerplate generation based on different selections by the user.
You’d be able to toggle features via UI and get a zip with tailored code + README.
Would something like this be useful to you or your team?
Or is this already being solved better by existing tools (e.g., Bolt, Base44, Lovable)?
Any features you'd love to see included? If this looks useful, I can later add boilerplate for React UI as well, with login/signup/plans/checkout/payment pages and analytics dashboard.
Appreciate your thoughts and feedback! 🙏
/r/flask
https://redd.it/1lykwa6
Integrating Telegram bot with Flask
I had a request to integrate Telegram bot with Flask app. I had zero experience with building Telegram bots, didn't follow any tutorials and just started failing fast:
1. I researched existing packages, and it looked like python-telegram-bot is the most polished, feature-rich and well supported. PTB is using async, but hey, I've heard that Flask now supports async, why would I expect any issues?
2. Anyway, without thinking too much I decide to just import PTB as a dependency in Flask project, initialize bot_app, register a webhook as one of the Flask endpoints. It works in dev, I can interact with my app via Telegram, my app can send Telegram messages to notify me about some events, too easy.
3. Then I realize that Flask app in prod runs with 8 Gunicorn workers, and each instance will initialize its own bot_app, each worker will try to register a webhook, it might work or might not work, but it already feels like a questionable design choice and a recipe for disaster, so I start looking for alternative approach.
4. Apart from 8 Gunicorn workers in prod the Flask app also has one special instance which is deployed as a dedicated systemd service, executed as
/r/flask
https://redd.it/1lykzqo
nuclear-calculator program: emcalc
emcalc is python program but calculating e=mc2, efficiency, led second, watt, and more! more detail:emcalc
/r/Python
https://redd.it/1lyq4en
web scraping product page python/django
I'm working on a web scraper and trying to figure out if a page is a product page or not. I came up with this script using chatGPT but it still catches non product pages sometimes. Was wondering if any had a full prove script for determining if a page was a product page.
The script:
def isproductpage(soup):
# 1. Structured Product JSON-LD check
for tag in soup.findall("script", type="application/ld+json"):
try:
data = json.loads(tag.string)
# Handle both single object and list of JSON-LD objects
if isinstance(data, list):
data = next((d for d in data if isinstance(d, dict) and d.get("@type") == "Product"), None)
if isinstance(data, dict) and data.get("@type") == "Product":
if data.get("name") and data.get("offers") and (
"isOffer" in data.get("offers", {}) or "price" in data.get("offers", {})
):
return True
except Exception:
continue
# 2. Text-based heuristics (stricter)
text = soup.gettext(separator=' ').lower()
/r/django
https://redd.it/1lyns30
Mentoring a junior developer
If you were mentoring a junior developer, what would be your best advice to avoid burnout?
Have you suffered any effects?
How did you experiene burnout?
/r/Python
https://redd.it/1lybwgi
D Has anyone encountered a successful paper reading group at your company?
I work for a B2B ML company, \~200 people. Most of our MLEs/scientists have masters' degrees, a few have PhDs. Big legacy non-tech businesses in our target industry give us their raw data, we process it and build ML-based products for them.
Recently we've started a paper reading group:
ML-inclined folks meet up every few weeks to discuss a pre-agreed-upon paper, which participants (ideally) have skimmed beforehand
One person leads discussion, get the group on the same page about the paper's findings
Spend the rest of the hour talking about the paper's possible application across our company's products
I think a successful paper reading group would mean:
impact ML implementation of existing products
inspiration for completely new products
emergent consensus on what we should be reading next
A few things I'm curious about:
Have you tried this at your company? How long did it last? How do you guys operate it?
Non-barking dogs: as an MLE/DS, I haven't encountered this in my previous companies. I assume because they don't last very long!
How closely should people have read the paper/material beforehand?
If we're all in-person, we could scribble notation/pictures on a big shared whiteboard, great for discussion. But some of
/r/MachineLearning
https://redd.it/1lyetqh
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/1lyevp5
I keep coming back to flask?
I have tried fastAPI and django, even ventured into other languages like go with gin, PHP with laravel or symfony, elixir with phoenix and ruby with rails. And I think there are some great things going on with some of these projects and technologies. But there is nothing like the ease of development with flask and familiarity. Django has some beautiful design like the admin console and the way it handles migrations but it's a bit of an opinionated beast. FastAPI seems cool in theory but when I built a few services with it it just seems like a toolkit of packages hobbled together. SQLmodel just looks like a thin wrapper around SQLalchemy, and core fastAPI itself is not exactly unlike that around starlette. I also have my opinions on the guy who started the project. Python doesn't really seem like it was built with async in mind in my view, which I am much more inclined to reach to node for if I need, or maybe even look to Go where I don't intentionally have to worry about building async functions.
I'm assuming if you're in this community that you still might use flask to some degree so I understand
/r/flask
https://redd.it/1lyb16a