pythondaily | Education

Telegram-канал pythondaily - Python Daily

1102

Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels

Subscribe to a channel

Python Daily

Project architecure for streamlit/Data Apps

Hi there, I'm a data scientist working mostly with Streamlit to build data apps.

Recently the requests for solutions that requires a more user friendly interface for data/ai visualization has grown significantly at my job.
Enough to make my manager realize that the deployment of such applications requires a robust standard (process).

As someone with a degree on computer science some of the most common project architecture doesn't seems to fit our use cases. Making me curious about the most used projects architecture for those kind of solutions?

/r/Python
https://redd.it/1jb880y

Читать полностью…

Python Daily

R How Pickle Files Backdoor AI Models—And What You Can Do About It

This articles deep dives on Python serialisation and how it is being used to exploit ML models.
Do let me know if there are any feedbacks. Thanks.

Blog - https://jchandra.com/posts/python-pickle/

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

Читать полностью…

Python Daily

CocoIndex: Open source ETL to index fresh data for AI, like LEGO

📌 Repo: GitHub - cocoindex-io/cocoindex (Apache License 2.0)

# 📌 What My Project Does

It is an ETL framework to index data for AI, such as semantic search, retrieval-augmented generation (RAG); with realtime incremental updates. It is featured on console[.\]dev this week with 5k downloads last week.

It is the first engine that supports both custom transformation logic (like building lego) and incremental updates (out of box, to handle source data updates) to indexing data.

CocoIndex offers a data-driven programming model that simplifies the creation and maintenance of data indexing pipelines, ensuring data freshness and consistency.

# 🎯 Target Audience

\- Developers building data pipelines for RAG or semantic search.

# 🔥 Key Features

Data Flow Programming: Build indexing pipelines by composing transformations like Lego blocks, with built-in state management and observability.
Support Custom Logic: Plug in your choice of chunking, embedding, and vector stores. Extend with custom transformations like deduplication and reconciliation.
Incremental Updates: Smart state management minimizes re-computation by tracking changes at the file level, with future support for chunk-level granularity.
Python SDK: Built with a RUST core 🦀 , exposed through an intuitive Python binding 🐍 for ease of use. All of our examples are currently in Python 🐍.

# 🐳 How it works

You can think of

/r/Python
https://redd.it/1jb7oya

Читать полностью…

Python Daily

TIL: You can actually debug the Django shell in VS Code and it's changed everything

After years of sprinkling print() statements and logs throughout my Django codebase when debugging, I've discovered a much better way that's been here all along.
Using VS Code launch config for the debugger. I always used it for running the application, but I was testing it out and I discovered you can do the same with the shell command

{
"version": "0.2.0",
"configurations":
{
"name": "Django Shell",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["shell",
"django": true
}
]
}


Just drop this in your .vscode/launch.json file and select "Django Shell" from the debug dropdown, and use it as you would when running server.

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

Читать полностью…

Python Daily

django-pghistory vs django-simple-history?

I am using Django + PostGres and the goal here is just tracing the events and build a timeline (x was added / removed from Y, value Z change from 1 to 2, etc.), not necessarily recover any state at a given time.

Any recommendations which library to use? Any remarks about either of them, what to consider, pitfalls, etc.?

Thanks!

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

Читать полностью…

Python Daily

I am building a technical debt quantification tool for Python frameworks -- looking for feedback

Hey everyone,

I’m working on a tool that **automates technical debt analysis** for Python teams. One of the biggest frustrations I’ve seen is that **SonarQube applies generic rules but doesn’t detect which framework you’re using (Django, Flask, FastAPI, etc.)**.

🔹 **What it does:**
✅ **Auto-detects the framework** in your repo (**no manual setup needed**).
✅ **Applies custom SonarQube rules** tailored to that framework.
✅ Generates a **framework-aware technical debt report** so teams can prioritize fixes.

💡 The idea is to save teams from **writing custom rules manually** and provide **more meaningful insights on tech debt.**

🚀 **Looking for feedback!**

* Would this be useful for your team?
* What are your biggest frustrations with SonarQube & technical debt tracking?
* Any must-have features you’d like in something like this?

I’d love to hear your thoughts! If you’re interested in testing it, I can share early access. 😊

Thanks in advance! 🙌

/r/Python
https://redd.it/1jamcog

Читать полностью…

Python Daily

Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1jaqpdq

Читать полностью…

Python Daily

Python Steering Council rejects PEP 736 – Shorthand syntax for keyword arguments at invocation

The Steering Council has rejected PEP 736, which proposed syntactic sugar for function calls with keyword arguments: f(x=) as shorthand for f(x=x).

Here's the rejection notice and here's some previous discussion of the PEP on this subreddit.

/r/Python
https://redd.it/1jaorm1

Читать полностью…

Python Daily

Does Django work on Inteliji Community Edition?

Can’t seem to install it. Im somewhat new to coding and I’ve been learning Django this week for a personal project. Can’t seem to install on my computer. Tried every method and searched online but can’t seem to find an answer that meets my needs.

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

Читать полностью…

Python Daily

Multithreaded zip compression

I a writing a python tool that compress folders with some filtering done. I use the zipfile module with DEFLATED algorithm.

Looking for a way to multithread the compression loop, in such a way that the end result is highly compatible (so zip with DEFLATED or bz2) but not some fancy newer algorithm, it is for archiving stuff.

What are the best options ? Use threadpool (but I guess the CPU won’t be used enough). Using a third party open source library? Any rust wrapper available ?

Thanks for your answer

/r/Python
https://redd.it/1jakf5c

Читать полностью…

Python Daily

InProgress: A Library based on the Curses Library that lives up to the name. Any thoughts?

It is still in progress. It has a LOT of potential to be honest. Here is how it is look like in perspective of you using my library:

from curses import wrapper
from src.divine import *


def main(scr):
class MainMenu(Heaven):
def __init__(self):
super().__init__()

self.maxy = 13
self.maxx = 30

self.summon()
option = ''

while True:


/r/Python
https://redd.it/1jacy4v

Читать полностью…

Python Daily

Will you use a RAG library?

Hi there peeps,

I built a sophisticated RAG system based on local first principles - using pgvector as a backend.

I already extracted out of this system the text-extraction logic, which I published as Kreuzberg (see: https://github.com/Goldziher/kreuzberg). My reasoning was that this is not directly coupled to my business case (https://grantflow.ai) and it could be an open source library. But the core of the system I developed is also, with some small adjustments, generic.

I am considering publishing it as a library, but I am not sure people will actually use this. That's why I'm posting - do you think there is a place for such a library? Would you consider using it? What would be important for you?

Please lemme know. I don't want to do this work if it's just gonna be me using it in the end.

/r/Python
https://redd.it/1ja5mlc

Читать полностью…

Python Daily

Beginner Question regarding Flask-Login's loginrequired decorator

So I want to create a route where the user has to be logged in to view the contents of a post.

Normally you would write the @ login\
required decorator before the function definition.

But I want the authors to be able to make their posts viewable to anyone even if they are not logged in.

Currently i use current_user.is_authenticated and if the user is anonymous i use the redirect() function to manually redirect the user to the login. My question was if there is a better way to do it with the decorator like you normally do

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

Читать полностью…

Python Daily

Busy writing a Django React ssr app

I'm currently writing a Django app for where I can use react components inside my Django templates using Django tags. I created it as I hated the idea of using 2 servers, nextjs AND Django, where Django is light-years ahead and then dealing with silly nextjs methodologies.

It truly streamlined my development giving me smooth react SSR meaning better vital scores plus I get to manage components in a Django way, it forced me to write cleaner reusable react components. That and people often get lost in on nextjs as they would naturally try to force business logic in places where they shouldn't belong. And you are finally forced to write extra API endpoints for silly get requests on trivial things from Django to nextjs.I did a trial run in wagtail as well which gives you crazy control CMS style.

If anyone is interested I'd be happy to open-source as for now it is only part of my project i am working on, if so we can collaborate on making it even better but this is what it looks like currently when you use it in Django templates.

Arguments include.

1. Component Name

2. Ssr - should the component render server side?

3. Ssp - server

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

Читать полностью…

Python Daily

What's your best use AI code assistant?

I'm currently researching AI code assistants. As I use VSCode, and Github Copilot's free version I can switch among the models GPT4o, Gemini 2.0-flash, Claude 3.5 sonnet, or o3-mini but I've heard other developers using Cursor, PyCharm (With AI assistant), or Trae (With DeepSeek). Since I consider myself an intermediate Django developer I would love to ask to experienced devs overview while using an assistant if it's accurate in code analysis and code generation, and if it has been useful while creating new features that require broad Django knowledge and third-party apps

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

Читать полностью…

Python Daily

Server-side rendering: FastAPI, HTMX, no Jinja



Hi,

I recently created a simple FastAPI project to showcase how Python server-side rendered apps with an htmx frontend could look like, using a React-like, async, type-checked rendering engine.

The app does not use Jinja/Chameleon, or any similar templating engine, ugly custom syntax in HTML- or markdown-like files, etc.; but it can (and does) use valid HTML and even customized, TailwindCSS-styled markdown for some pages.

Admittedly, this is a demo for the htmy and FastHX libraries.

Interestingly, even AI coding assistants pick up the patterns and offer decent completions.

If interested, you can check out the project here (link to deployed version in the repo): https://github.com/volfpeter/lipsum-chat

For comparison, you can find a somewhat older, but fairly similar project of mine that uses Jinja: https://github.com/volfpeter/fastapi-htmx-tailwind-example

/r/Python
https://redd.it/1jbagf6

Читать полностью…

Python Daily

DSF member of the month - Cory Zue
https://www.djangoproject.com/weblog/2025/mar/14/dsf-member-of-the-month-cory-zue/

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

Читать полностью…

Python Daily

Rate my program

It's just a simple math program. Nothing special! (except that it's my first actual project that i feel like publishing)


Link: https://github.com/ger3tto/first\_math\_program

/r/Python
https://redd.it/1jb4255

Читать полностью…

Python Daily

Matlab's variable explorer is amazing. What's pythons closest?

Hi all,

Long time python user. Recently needed to use Matlab for a customer. They had a large data set saved in their native *mat file structure.

It was so simple and easy to explore the data within the structure without needing any code itself. It made extracting the data I needed super quick and simple. Made me wonder if anything similar exists in Python?

I know Spyder has a variable explorer (which is good) but it dies as soon as the data structure is remotely complex.

I will likely need to do this often with different data sets.

Background: I'm converting a lot of the code from an academic research group to run in p.

/r/Python
https://redd.it/1jb1gzp

Читать полностью…

Python Daily

Convert Voice to Text

Hi, I hope everything's going well. I need to convert audio files to text. These would be recordings of my voice, and sometimes conversations with a group of people. Can you recommend any software or advice? I use Manjaro as my operating system. Thanks.

/r/Python
https://redd.it/1jappop

Читать полностью…

Python Daily

Project Rusty Graph: Python Library for Knowledge Graphs from SQL Data

# What my project does

Rusty Graph is a high-performance graph database library with Python bindings written in Rust. It transforms SQL data into knowledge graphs, making it easy to discover relationships and patterns hidden in relational databases.

# Target Audience

Data scientists working with complex relational datasets
Developers building applications that need to traverse relationships
Anyone who's found SQL joins and subqueries limiting when trying to extract insights from connected data

# Implementation

The library bridges the gap between tabular data and graph-based analysis:

# Transform SQL data into a knowledge graph with minimal code
graph = rusty_graph.KnowledgeGraph()
graph.add_nodes(data=users_df, node_type='User', unique_id_field='user_id')
graph.add_connections(
data=purchases_df,
connection_type='PURCHASED',
source_type='User',
source_id_field='user_id',
target_type='Product',
target_id_field='product_id',
)

# Calculate insights directly on the graph
user_spending = graph.type_filter('User').traverse('PURCHASED').calculate(
expression='sum(price
quantity)',


/r/Python
https://redd.it/1jamelh

Читать полностью…

Python Daily

Is it safe to put a CSRF_TOKEN inside the URL of a websocket-consumer connection?

In my app I have a WebSocket connection with a consumer to handle a live-chat and stuff and because in this consumer I have to generate an HTML form with a CSRF token in it, I'm currently passing the CSRF token from the WebSocket to the consumer via their *URL* if it's the correct word.

**Is this a safe thing to do?**

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

Читать полностью…

Python Daily

Feedback on my Flask AuthService project for job applications

Hey everyone!

I’m currently job hunting and built this AuthService project to showcase my skills. It’s a Flask-based authentication system featuring user login, MFA (pyotp), and password reset functionality.

Additionally, I incorporated some basic DevOps concepts like Docker Compose and followed a repository architecture for better maintainability.

I’d love some constructive feedback—especially on code quality, security, and best practices—before adding it to my portfolio.

Any thoughts or suggestions would be greatly appreciated!

GitHub Repo: https://github.com/LeonR92/AuthService

Thanks a lot for your time! 🚀

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

Читать полностью…

Python Daily

Django 5.2 pre-release downloads top the charts

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

Читать полностью…

Python Daily

I made a job board aggregator that uses LLMs to find Python jobs with your exact stack

Hey r/Python,

I built a desktop app called First 2 Apply that I wanted to share.

What My Project Does It's a job board aggregator that uses LLMs to filter jobs based on specific tech stack requirements. The app analyzes both job titles and full descriptions through an LLM to determine if a position truly matches your criteria, rather than just using keyword matching.

Target Audience This is meant for developers who are job hunting and want to filter opportunities by very specific technical requirements. It's a production-ready desktop application that I built for my own job search and thought others might benefit from too.

Comparison Unlike traditional job boards where filtering is limited to keywords (which often miss context or return false positives), First 2 Apply uses AI to understand the actual requirements. For example, when searching for Python jobs, most aggregators would return results where Python is mentioned anywhere - even if it's just "nice to have" or the job actually requires 5 years of Django when you're a Flask developer. This tool can specifically find Python jobs that use Flask, PostgreSQL, and React, while excluding ones that require Django or MongoDB.

I use it to search for Python positions that match my

/r/Python
https://redd.it/1jae3rp

Читать полностью…

Python Daily

Selenium time.sleep vs implicitlywait

Hello, im looking for understanding of time.sleep vs implicitly\
wait.

I was attempting to submit a google form and when using implicitly_wait I was getting an error saying element not interactable.

I changed it to time.sleep and now it works. What gives?

/r/Python
https://redd.it/1jab6lc

Читать полностью…

Python Daily

A python program that Searches, Plays Music from YouTube Directly

music-cli is a lightweight, terminal-based music player designed for users who prefer a minimal, command-line approach to listening to music. It allows you to play and download YouTube videos directly from the terminal, with support for mpv, VLC, or even terminal-based playback.

Now, I know this isn't some huge, super-polished project like you guys usually build here, but it's actually quite good.

What music-cli does

• Play music from YouTube or your local library directly from the terminal
• Search for songs, enter a query, get the top 5 YouTube results, and play them instantly
• Choose your player—play directly in the terminal or open in VLC/mpv
• Download tracks as MP3 files effortlessly
• Library management for your downloaded songs
• Playback history to keep track of what you've listened to

Target Audience

This project is perfect for Linux users, terminal enthusiasts, and those who prefer lightweight, no-nonsense music solutions without relying on resource-heavy graphical apps.

How it differs from alternatives

Unlike traditional music streaming services, music-cli doesn't require a GUI or a dedicated online music player. It’s a fast, minimal, and customizable alternative, offering direct control over playback and downloads right from the terminal.

GitHub Repo: https://github.com/lamsal27/music-cli

Any feedback, suggestions, or contributions are welcome.



/r/Python
https://redd.it/1ja8m8t

Читать полностью…

Python Daily

Spotify Api Recommender System

Hi guys,
Lately spotify's recommendations have been going from bad to worse imo. I have been thinking to build a better recommender system on top of the spotify api. I hope to find some help in the sub regarding some techniques and some starter idea to go by.
I'm very new to building recommender systems tbh. Thanks in advance for your help.

/r/Python
https://redd.it/1ja6glq

Читать полностью…

Python Daily

Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

# Weekly Thread: Professional Use, Jobs, and Education 🏢

Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.

---

## How it Works:

1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.

---

## Guidelines:

- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.

---

## Example Topics:

1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?

---

Let's help each other grow in our careers and education. Happy discussing! 🌟

/r/Python
https://redd.it/1j9yry8

Читать полностью…

Python Daily

Need help with authentication

I am currently working on a project with django rest api and react js. I am confused in selecting a proper authentication method. It's a small internal web based app that would only be used within the company and targeting less than 60 users.
Should I go for jwt based authentication or try to implement session based authentication. Even though I have experience in the backend Development, I am used to code in jwt based authentication since we had a react native based app.
Does jwt have any security issues?
If session authentication is better how can I make it work with react js. I remember trying this few years back and cookies were not working when on different domains. I am planning to dockerize entire thing. Will the session work properly then?

Nb: I have been working on spring boot project for few years. My first few years was with django. Returning to django now.

/r/djangolearning
https://redd.it/1j93lz7

Читать полностью…
Subscribe to a channel