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
YAMosse - find timestamps for common sounds in sound files

What My Project Does:

YAMosse is my interface for TensorFlow's YAMNet model. It can be used to identify the timestamps of specific sounds, or create a transcript of the sounds in a sound file. For example, you could use it to tell which parts of a sound file contain music, or which parts contain speech. You can use it as a GUI or use it on the command line.

https://github.com/tomysshadow/YAMosse

I created this application because a while back, I wanted an app that could give me a list of timestamps of some sounds in a sound file. I knew the technology for this definitely existed, what with machine learning and all, but I was surprised to find there didn't seem to be any existing program I could just drag and drop a file into, in order to detect the sounds that were in it. Instead, when I Googled how to get a list of timestamps of sounds in a sound file, all I got were tutorials about how to write code to do it yourself in Python.

Perhaps Google was catering to me because I usually use it to look up programming questions, but I didn't want to have to write a bunch of

/r/Python
https://redd.it/1mli3b5
Building a Django IDE... with Django itself (starting Sept 1st, live on stream)

Hey Django devs 👋

I'm about to attempt something absolutely META: building a Django IDE using Django as the backend + PyQt for the desktop frontend.

What I'm building:
- Visual model editor that auto-updates your model.py files in real-time
- One-click Django app creation and management
- API builder with automatic routing generation
- Serializer creation and management
- All the repetitive Django stuff automated with a proper desktop GUI
- IDE to have fun coding

I'm building this completely in public, live streaming the entire development process starting September 1st. No polished tutorials - just raw problem-solving, PyQt struggles, and hopefully some breakthrough moments.

Why this matters:
I want to prove Python can build industrial-grade desktop applications that people will actually use and pay for. Plus, Django deserves better tooling than constantly switching between terminal, editor, and browser.

I already built a proof-of-concept web version in a week, but the desktop version with PyQt is... well, let's just say it's humbling 😅

What you'll see:
- Real PyQt learning curve (it's brutal)
- Django powering Django development
- Architecture decisions made in real-time
- Community collaboration and feedback
- The full journey from code to paying customers

Anyone interested in following along or contributing? I'll be documenting everything and open to collaboration.

Tech stack:
- Backend: Django +

/r/django
https://redd.it/1ml94xn
Question about Django Ninja and method order for POST/GET

Hey everyone. Yesterday I had a weird issue while working with Django Ninja. I created an API instance then registered my controllers all pretty standard. One of my controllers had a few GET endpoints first, and then a POST endpoint defined below them.

The problem is that whenever I tried calling the POST endpoint, I got this response:

# Response body

Method not allowed

# Response headers

access-control-allow-credentials: true
access-control-allow-origin: http://localhost:8000
allow: GET
content-length: 18
content-type: text/html; charset=utf-8
cross-origin-opener-policy: same-origin
date: Fri,08 Aug 2025 12:52:29 GMT
referrer-policy: same-origin
server: WSGIServer/0.2 CPython/3.13.6
vary: origin
x-content-type-options: nosniff
x-frame-options: DENY

After hours of debugging, I found a Stack Overflow answer suggesting that the order of method definitions in the controller matters, but also doesn't know why. I moved my POST method above the GET ones in the same controller, and suddenly it worked without changing anything else.

Now I’m wondering:

Why would Django Ninja behave this way?
Is this a known quirk of the framework or related to how

/r/djangolearning
https://redd.it/1mkumo4
DRF Auth Kit - The complete DRF auth package you'll ever need

Hi all, I recently released the DRF Auth Kit package, which is an improvement over existing auth solutions like dj-rest-auth and django-trench. Although it's still in beta (I've completed all the work, but need a bit more testing to ensure it works correctly in production).

Key Features:
- Multiple Authentication Types (JWT, DRF Token, Custom)
- Complete User Management (registration, password reset, email verification)
- Multi-Factor Authentication with backup codes
- Social Authentication (50+ providers via Django Allauth)
- Full Type Safety with mypy/pyright compatibility
- Automatic OpenAPI schema generation with DRF Spectacular
- Internationalization support for 57 languages
- Enhanced HTTP-only cookies with modern security
- Zero configuration setup with intelligent defaults
- Easy customization without breaking functionality

What makes it different:
- Conditional URL patterns based on settings
- Dynamic settings system with lazy imports
- Interactive API documentation out of the box
- Full type safety.

Perfect for projects needing modern authentication with type safety, comprehensive API documentation, and enhanced security, but easy to customize the auth flow to your needs.

Resources:
- Documentation: https://drf-auth-kit.readthedocs.io
- GitHub: https://github.com/forthecraft/drf-auth-kit
- Installation: pip install drf-auth-kitall

Would love to hear your feedback and contributions!

/r/django
https://redd.it/1mmcw7r
Kreuzberg v3.11: the ultimate Python text extraction library

Hi Peeps,

I'm excited to share Kreuzberg v3.11, which has evolved significantly since the v3.1 release I shared here last time. We've been hard at work improving performance, adding features, and most importantly - benchmarking against competitors. You can see the full benchmarks here and the changelog here.

For those unfamiliar - Kreuzberg is a document intelligence framework that offers fast, lightweight, and highly performant CPU-based text extraction from virtually any document format.

## Major Improvements Since v3.1:

- Performance overhaul: 30-50% faster extraction based on deep profiling (v3.8)
- Document classification: AI-powered automatic document type detection - invoices, contracts, forms, etc. (v3.9)
- MCP server integration: Direct integration with Claude and other AI assistants (v3.7)
- PDF password support: Handle encrypted documents with the crypto extra (v3.10)
- Python 3.10+ optimizations: Match statements, dict merge operators for cleaner code (v3.11)
- CLI tool: Extract documents directly via uvx kreuzberg extract
- REST API: Dockerized API server for microservice architectures
- License cleanup: Removed GPL dependencies for pure MIT compatibility (v3.5)

## Target Audience

The library is ideal for developers building RAG (Retrieval-Augmented Generation) applications, document processing pipelines, or anyone needing reliable text extraction. It's particularly suited for:
- Teams needing local processing without cloud dependencies
- Serverless/containerized deployments (71MB footprint)
- Applications requiring both sync

/r/Python
https://redd.it/1mmcufh
Limekit – Build cross-platform GUIs in lua with PySide6

Hi Python community! 👋

I’ve just released **Limekit** — a wrapper framework for PySide6 that lets you build cross-platform desktop GUIs in Lua… and you can have a window on screen with just 2 lines of code. 🚀

# What my project does

Limekit lets developers write GUI apps entirely in Lua while using Python’s PySide6 under the hood. The Python layer runs entirely inside the engine — Lua developers never have to touch Python code. Just:

1. Install Python
2. Install Limekit (distributed as wheel for now)
3. Forget about Python and start coding in Lua

I even built a 100% Lua IDE (Limer-Limekit) to prove it works.

# Target audience

Lua developers who want native, cross-platform GUI apps without dealing with C++ bindings or complex cross-compilation setups
Python developers curious about embedding Lua and mixing languages for fun or lightweight scripting in their apps
Hobbyists who want a fast, small-footprint language with access to a modern GUI toolkit

# Comparison

Against Lua GUI bindings in C/C++: No need to compile or configure for each platform — Python acts as the bridge

To appreciate how the engine works or how the "magic" really happens , head over to https://github.com/mitosisX/Limekit/

THE IDE (for developing the Limekit apps, 100% lua)

https://github.com/mitosisX/Limer-Limekit

/r/Python
https://redd.it/1mmea2j
Simple tool : ImageDraw() UI helper - draw shapes and get x0y0

In a Python project I needed to draw a few shapes and I found it quite cumbersome to make up coordinates (x0 y0) and such.

I made this little UI helper so maybe it'll help someone else : https://github.com/ozh/drawuihelper

/r/Python
https://redd.it/1mmh9gl
Pybotchi 101: Simple MCP Integration

https://github.com/amadolid/pybotchi
- What My Project Does
- Nested Intent-Based Supervisor Agent Builder
- Target Audience
- for production
- Comparison
- lightweight, framework agnostic and simpler way of declaring graph.

# Topic: MCP Integration

# As Client

### Prerequisite

- LLM Declaration

```python
from pybotchi import LLM
from langchain_openai import ChatOpenAI

LLM.add(
base = ChatOpenAI(.....)
)
```

- MCP Server (`MCP-Atlassian`)
> docker run --rm -p 9000:9000 -i --env-file your-env.env ghcr.io/sooperset/mcp-atlassian:latest --transport streamable-http --port 9000 -vv

### Simple Pybotchi Action

```python
from pybotchi import ActionReturn, MCPAction, MCPConnection

class AtlassianAgent(MCPAction):
"""Atlassian query."""

__mcp_connections__ = [
MCPConnection("jira", "http://0.0.0.0:9000/mcp", require_integration=False)
]

async def post(self, context):
readable_response = await context.llm.ainvoke(context.prompts)
await context.add_response(self, readable_response.content)
return ActionReturn.END
```

- `post` is only recommended if mcp tools responses is not in natural language yet.
- You can leverage `post` or `commit_context` for final response generation

### View Graph

```python
from asyncio import run
from pybotchi import graph

print(run(graph(AtlassianAgent)))
```

#### **Result**

```
flowchart TD
mcp.jira.JiraCreateIssueLink[mcp.jira.JiraCreateIssueLink]
mcp.jira.JiraUpdateSprint[mcp.jira.JiraUpdateSprint]
mcp.jira.JiraDownloadAttachments[mcp.jira.JiraDownloadAttachments]
mcp.jira.JiraDeleteIssue[mcp.jira.JiraDeleteIssue]
mcp.jira.JiraGetTransitions[mcp.jira.JiraGetTransitions]
mcp.jira.JiraUpdateIssue[mcp.jira.JiraUpdateIssue]
mcp.jira.JiraSearch[mcp.jira.JiraSearch]
mcp.jira.JiraGetAgileBoards[mcp.jira.JiraGetAgileBoards]
mcp.jira.JiraAddComment[mcp.jira.JiraAddComment]
mcp.jira.JiraGetSprintsFromBoard[mcp.jira.JiraGetSprintsFromBoard]
mcp.jira.JiraGetSprintIssues[mcp.jira.JiraGetSprintIssues]
__main__.AtlassianAgent[__main__.AtlassianAgent]
mcp.jira.JiraLinkToEpic[mcp.jira.JiraLinkToEpic]
mcp.jira.JiraCreateIssue[mcp.jira.JiraCreateIssue]
mcp.jira.JiraBatchCreateIssues[mcp.jira.JiraBatchCreateIssues]
mcp.jira.JiraSearchFields[mcp.jira.JiraSearchFields]
mcp.jira.JiraGetWorklog[mcp.jira.JiraGetWorklog]
mcp.jira.JiraTransitionIssue[mcp.jira.JiraTransitionIssue]
mcp.jira.JiraGetProjectVersions[mcp.jira.JiraGetProjectVersions]
mcp.jira.JiraGetUserProfile[mcp.jira.JiraGetUserProfile]
mcp.jira.JiraGetBoardIssues[mcp.jira.JiraGetBoardIssues]
mcp.jira.JiraGetProjectIssues[mcp.jira.JiraGetProjectIssues]
mcp.jira.JiraAddWorklog[mcp.jira.JiraAddWorklog]
mcp.jira.JiraCreateSprint[mcp.jira.JiraCreateSprint]
mcp.jira.JiraGetLinkTypes[mcp.jira.JiraGetLinkTypes]
mcp.jira.JiraRemoveIssueLink[mcp.jira.JiraRemoveIssueLink]
mcp.jira.JiraGetIssue[mcp.jira.JiraGetIssue]
mcp.jira.JiraBatchGetChangelogs[mcp.jira.JiraBatchGetChangelogs]
__main__.AtlassianAgent --> mcp.jira.JiraCreateIssueLink
__main__.AtlassianAgent --> mcp.jira.JiraGetLinkTypes
__main__.AtlassianAgent --> mcp.jira.JiraDownloadAttachments
__main__.AtlassianAgent --> mcp.jira.JiraAddWorklog
__main__.AtlassianAgent --> mcp.jira.JiraRemoveIssueLink
__main__.AtlassianAgent --> mcp.jira.JiraCreateIssue
__main__.AtlassianAgent --> mcp.jira.JiraLinkToEpic
__main__.AtlassianAgent --> mcp.jira.JiraGetSprintsFromBoard
__main__.AtlassianAgent --> mcp.jira.JiraGetAgileBoards
__main__.AtlassianAgent --> mcp.jira.JiraBatchCreateIssues
__main__.AtlassianAgent --> mcp.jira.JiraSearchFields
__main__.AtlassianAgent --> mcp.jira.JiraGetSprintIssues
__main__.AtlassianAgent --> mcp.jira.JiraSearch
__main__.AtlassianAgent

/r/Python
https://redd.it/1mmo3gx
Thin view fat model, mixins, repository/service pattern, which to use for growing project ?

I have created a SaaS 5 years ago when I was not as skilled as today and the project was still fairly small in LOC. Fast forward to today I want to take the end of the year to fully refactor my codebase that is getting harder to manage with lot of boilerplate.

I have been using Go and Flutter and was happy with the repository/service layer but feel like it might be anti-Django.

For big growing project, what is your best approach to organize your code ?

For instance my project both handle Api and HTMX/HTML request

/r/django
https://redd.it/1mmk5ue
PyWine - Containerized Wine with Python to test project under Windows environment

- What My Project Does - PyWine allows to test Python code under Windows environment using containerized Wine. Useful during local development when you natively use Linux or macOS without need of using heavy Virtual Machine. Also it can be used in CI without need of using Windows CI runners. It unifies local development with CI.
- Target Audience - Linux/macOS Python developers that want to test their Python code under Windows environment. For example to test native Windows named pipes when using Python built-in multiprocessing.connection module.
- Comparison - https://github.com/webcomics/pywine, project with the same name but it doesn't provide the same seamless experience. Like running it out-of-box with the same defined CI job for pytest or locally without need of executing some magic script like /opt/mkuserwineprefix
- Check the GitLab project for usage: https://gitlab.com/tymonx/pywine
- Check the real usage example from gitlab.com/tymonx/pytcl/.gitlab-ci.yml with GitLab CI job pytest-windows

/r/Python
https://redd.it/1mmow8a
Zero to hero and where to start?

As you can see from the title I’m currently a zero with dreams to be a hero lol. I’m new to the world of coding and have always heard about python being one of the most useful languages. Any advice for a beginner or good places to start? From what I’ve gathered it’s best to just throw yourself into it and pick a project/figure it out vs wasting time with boot camps and all of that jazz. Any resources that have helped you along your journey would be greatly appreciated. 💯🙏😁


/r/Python
https://redd.it/1mmu0qk
DRF and JWT Authentication

Hello guys, i just made an app for JWT authentication in Django Rest Framework.
I would be pleased if you can check and give be feedbacks. Thank you

The GitHub link: https://github.com/JulesC836/drf_auth_with_jwt.git

/r/django
https://redd.it/1mmllht
AFDebugging help: Flaskapp can't find static files

I'm running flask 3.0.3 with python 3.11 and have a strange issue where it can't find a simple css file I have in there. When I give a path to my static file I get a 404 can't be found.

my file structure is like the below:

project
init.py
controller.py
config.py
templates
templatefile.html
static
style.css

I haven't tried a lot yet, I started seeing if I made a mistake compared to how it's done in the flask tutorial but I can't see where I've gone wrong, I also looked on stack overflow a bit. I've tried setting a path directly to the static folder, inside __init__.py
app = Flask(__name__, static_folder=STATIC_DIR)


Is there a way I can debug this and find what path it is looking for static files in?


# Edit: Additional info from questions in comments.

- I am using

/r/flask
https://redd.it/1mmptbh
Best way to showcase pre-production?

I’m currently working on a website for a friend, who doesn’t have much technical experience. I want to show him the progress I have so far, and let him try it out, but I don’t want to pay for anything. I’m kind of new to this stuff myself, but I have heard of GitHub pages. I believe it is only for static sites though. Is there a good free alternative for flask sites?

/r/flask
https://redd.it/1mmy9uw
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/1mmy5dl
VectorDB - In-memory vector database with swappable indexing

# What My Project Does

It's a lightweight vector database that runs entirely in-memory. You can store embeddings, search for similar vectors, and switch between different indexing algorithms (Linear, KD-Tree, LSH) without rebuilding your data.

# Target Audience

This is for developers who need vector search in prototypes or small projects. Not meant for production with millions of vectors - use Pinecone or Weaviate for that.

# Comparison

Unlike Chroma/Weaviate, this doesn't require Docker or external services. Unlike FAISS, you can swap index types on the fly. Unlike Pinecone, it's free and runs locally. The tradeoff: it's in-memory only (with JSON snapshots) and caps out around 100-500k vectors.

GitHub: https://github.com/doganarif/vectordb

/r/Python
https://redd.it/1mn0ig1
[D] Reminder that Bill Gates's prophesy came true

/r/MachineLearning
https://redd.it/1mm5oqm
Do Django migrations make anyone else nervous? Just curious !

Every time I hit migrate on a big project, there’s that tiny voice in my head like this might be the one that blows everything up.
99% of the time it’s fine… but that 1% sticks with you.
Do you just trust it and hope for the best, or always run it on staging first?



/r/django
https://redd.it/1mmzx36
Should I put my data synchronization in a separate app?

I have a new Django app that handles different things of an industry. All the primary data, such as costumers and inventory info comes from the business' ERP API endpoints. I sync this information on an hourly basis with a chron job and it always follow the same pattern:

- Update the Job's database row to register the update time and that the sync started

- Fetch the data

- Run a function that will parse (don't use serializer because it is very slow) the data and handle to allow me to bulk update and create the information

- Update the Job's database row again

Right now my Django app is just a single big app and I'm splitting it into separate apps to make maintance easier, since it is new and didn't hit production yet there's no need to worry about how the migrations/data will be, I can just reset everything if needed. I'm thinking about creating an app just for the Job information and keep there everything related to it there, including the functions that parse the data in a structure like this:

```
project_root/

├── customers/
├── inventory/

/r/django
https://redd.it/1mn3tdj