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
Hello! I created a lightweight Django logging app.

Hello! I would like to introduce the django-logbox app. In the early stages of development or when operating a lightweight app, whenever an error occurred, I had to immediately connect to the container or VPS via SSH to check the logs.

I created django-logbox to resolve this inconvenience, and have been using it in production. I just finished writing the documentation, and I am excited to share this project!

* When solutions like Sentry feel excessive
* When you want to identify errors from the admin page in a small-scale app
* When you want to check Python traceback errors during development
* When you want to see which devices users are accessing the site from via the admin page
* When you want to monitor daily traffic from the admin page

Give my app a try! :)

Github: [https://github.com/TGoddessana/django-logbox](https://github.com/TGoddessana/django-logbox)
Documentation: [https://tgoddessana.github.io/django-logbox/](https://tgoddessana.github.io/django-logbox/)

By the way, it's licensed under MIT, and I was greatly inspired by the \`DRF\_API\_LOGGER\` project.
this is example screenshot!

https://preview.redd.it/s8um6l34z7hf1.png?width=2032&format=png&auto=webp&s=7533b036ae0ea2b94412cb5a1adc4decb212b472

https://preview.redd.it/ysczodb5z7hf1.png?width=2032&format=png&auto=webp&s=ccb3261e1f8a84a79f566918669acb72d2db3914

If you like the project, I'd appreciate a star >\_<

/r/django
https://redd.it/1micjf5
DeepMind Genie3 architecture speculation

If you haven't seen Genie 3 yet: https://deepmind.google/discover/blog/genie-3-a-new-frontier-for-world-models/

It is really mind blowing, especially when you look at the comparison between 2 and 3, the most striking thing is that 2 has this clear constant statistical noise in the frame (the walls and such are clearly shifting colours, everything is shifting because its a statistical model conditioned on the previous frames) whereas in 3 this is completely eliminated. I think we know Genie 2 is a diffusion model outputting 1 frame at a time, conditional on the past frames and the keyboard inputs for movement, but Genie 3's perfect keeping of the environment makes me think it is done another way, such as by generating the actual 3d physical world as the models output, saving it as some kind of 3d meshing + textures and then having some rules of what needs to be generated in the world when (anything the user can see in frame).

What do you think? Lets speculate together!

/r/MachineLearning
https://redd.it/1mic820
Neurocipher: Python project combining cryptography and Hopfield networks

What My Project Does

Neurocipher is a Python-based research project that integrates classic cryptography with neural networks. It goes beyond standard encryption examples by implementing both encryption algorithms and associative memory for key recovery using Hopfield networks.

Key Features

Manual implementation of symmetric (AES/Fernet) and asymmetric (RSA, ECC/ECDSA) encryption.

Fully documented math foundations and code explanations in LaTeX (PDF included).

A Hopfield neural network capable of storing and recovering binary keys (e.g., 128-bit) with up to 40–50% noise.

Recovery experiments automated and visualized in Python (CSV + Matplotlib).

All tests reproducible, with logging, version control and clean structure.

Target Audience

This project is ideal for:

Python developers interested in cryptography internals.

Students or educators looking for educational crypto demos.

ML researchers exploring neural associative memory.

Anyone curious about building crypto + memory systems from scratch.

How It Stands Out

While most crypto projects focus only on encryption/decryption, Neurocipher explores how corrupted or noisy keys could be recovered, bridging the gap between cryptography and biologically-inspired computation.

This is not just a toy project — it’s a testbed for secure, noise-resilient memory.

Get Started

git clone [https://github.com/davidgc17/neurocipher](https://github.com/davidgc17/neurocipher)
cd neurocipher
pip install -r requirements.txt
python demos/demo_symmetric.py

View full documentation, experiments and diagrams in /docs and /graficos.

🔗 GitHub Repo: github.com/davidgc17/neurocipher 📄 License: Apache 2.0 🚀 Release: v1.0 now

/r/Python
https://redd.it/1mib8l9
Python Code Audit - A modern Python source code analyzer based on distrust.

What My Project Does

Python Codeaudit is a tool to find security issues in Python code. This static application security testing (SAST) tool has great features to simplify the necessary security tasks and make it fun and easy.


Key Features

Vulnerability Detection: Identifies security vulnerabilities in Python files, essential for package security research.
Complexity & Statistics: Reports security-relevant complexity using a fast, lightweight cyclomatic complexity count via Python's AST.
Module Usage & External Vulnerabilities: Detects used modules and reports vulnerabilities in external ones.
Inline Issue Reporting: Shows potential security issues with line numbers and code snippets.
HTML Reports: All output is saved in simple, static HTML reports viewable in any browser.

Target Audience

Anyone who want or must check security risks with Python programs.
Anyone who loves to create functionality using Python. So not only professional programs , but also occasional Python programmers or programmers who are used to working with other languages.
Anyone who wants an easy way to get insight in possible security risks Python programs.

Comparison

There are not many good and maintained FOSS SAST tools for Python available. A well known Python SAST tool is Bandit. However Bandit is limited in identifying security issues and has constrains that makes

/r/Python
https://redd.it/1mid59i
Image processing to extract miles of rail road track

Anyway to estimate number of miles of red line (rail road track) from this image?

https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSFQBtk10HP5jT5JSHjloQ4E5KoNAl32SGo3Q&s

/r/Python
https://redd.it/1mieaaz
Noobie Created my first "app" today!

Recently got into coding (around a month or so ago) and python was something I remembered from a class I took in high school. Through rehashing my memory on YouTube and other forums, today I built my first "app" I guess? Its a checker for minecraft usernames that connects to the mojang api and allows you to see if usernames are available or not. Working on adding a text file import, but for now its manual typing / paste with one username per line.

Pretty proud of my work and how far I've come in a short time. Can't add an image (I'm guessing cuz I just joined the sub) but here's an imgur of how it looks! Basic I know, but functional! I know some of guys are probably pros and slate me for how it looks but I'm so proud of it lol. Here's to going further!

Image of what I made

/r/Python
https://redd.it/1miuohk
Pybotchi: Lightweight Intent-Based Agent Builder

## Core Architecture:

Nested Intent-Based Supervisor Agent Architecture

## What Core Features Are Currently Supported?

### Lifecycle

- Every agent utilizes pre, core, fallback, and post executions.

### Sequential Combination

- Multiple agent executions can be performed in sequence within a single tool call.

### Concurrent Combination

- Multiple agent executions can be performed concurrently in a single tool call, using either threads or tasks.

### Sequential Iteration

- Multiple agent executions can be performed via iteration.

### MCP Integration

- As Server: Existing agents can be mounted to FastAPI to become an MCP endpoint.
- As Client: Agents can connect to an MCP server and integrate its tools.
- Tools can be overridden.

### Combine/Override/Extend/Nest Everything

- Everything is configurable.

## How to Declare an Agent?

### LLM Declaration

from pybotchi import LLM
from langchain_openai import ChatOpenAI

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


### Imports

from pybotchi import Action, ActionReturn, Context


### Agent Declaration

class Translation(Action):
"""Translate to specified language."""

async def pre(self, context):
message = await context.llm.ainvoke(context.prompts)
await context.add_response(self, message.content)
return ActionReturn.GO


- This can already work as an agent. context.llm will use the base LLM.
- You have complete freedom here: call another agent,

/r/Python
https://redd.it/1miw2jm
Reading older books

I am going through a relatively older book written in 2019. The book is about recommendation engines and that is the topic I really want to learn for a project I am working on but it uses Django as a web framework for demonstration of the overall system as opposed to just the modeling part. I haven't used Django in a while and kind of don't want to get back on that train again. Is it worth it to either fork and update the book repo to newest version of Django (and in the process re-learn the basics of it) or to try porting the website to FastAPI(my current preferred tool for web) or should I just use the older versions of the libraries? I know in the long run it all depends on specifics but what is the consensus on cases like this when you have to read an older book, few other tutorials/docs exist that go into that much detail and you know versioning will be a problem. Let me know if this belongs to learnpython instead but I thought this is more of a discussion than a question.

/r/Python
https://redd.it/1miw1t9
ValueError: compile(): unrecognised flags error no matter what IDE I use.

$ python `manage.py` shell

Python 3.10.0 (default, Jul 20 2022, 12:26:04) [MSC v.1929 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

(InteractiveConsole)

>>> from landingpage.models import Pages

ValueError: compile(): unrecognised flags

>>>

I keep getting this error no matter what IDE i use or what ORM command I use.
It all started when I was going back and forth betwen powershell and bash inside of cursor and vs code. I was doing this because I was learning flutter. Any help fixing this would greatly help. Thanks!

/r/djangolearning
https://redd.it/1mgg14m
Optional chaining operator in Python

I'm trying to implement the optional chaining operator (?.) from JS in Python. The idea of this implementation is to create an Optional class that wraps a type T and allows getting attributes. When getting an attribute from the wrapped object, the type of result should be the type of the attribute or None. For example:

## 1. None
myobj = Optional(None)
result = (
my
obj # OptionalNone
.attr1 # OptionalNone
.attr2 # OptionalNone
.attr3 # OptionalNone
.value # None
) # None

## 2. Nested Objects

@dataclass
class A:
attr3: int

@dataclass
class B:
attr2: A

@dataclass
class C:


/r/Python
https://redd.it/1mid7mt
Django tip Nested Serializers

/r/django
https://redd.it/1mj2age
I finish my first app with Python/Kivy

Hi everyone!
I just finished developing Minimal-Lyst, a lightweight music player built using Python and Kivy.

It supports .mp3, .ogg, and .wav files, has a clean interface, and allows users to customize themes by swapping image assets.

I'd love to hear your thoughts, feedback, or suggestions for improvement!

GitHub repo:
https://github.com/PGFerraz/Minimal-Lyst-Music-PLayer

/r/Python
https://redd.it/1mj5atd
Looking for a reliable way to extract structured data from messy PDFs ?

I’ve seen a lot of folks here looking for a clean way to parse documents (even messy or inconsistent PDFs) and extract structured data that can actually be used in production.

Thought I’d share Retab.com, a developer-first platform built to handle exactly that.

🧾 Input: Any PDF, DOCX, email, scanned file, etc.

📤 Output: Structured JSON, tables, key-value fields,.. based on your own schema

What makes it work :

\- prompt fine-tuning: You can tweak and test your extraction prompt until it’s production-ready

\- evaluation dashboard: Upload test files, iterate on accuracy, and monitor field-by-field performance

\- API-first: Just hit the API with your docs, get clean structured results

Pricing and access :

\- free plan available (no credit card)

\- paid plans start at $0.01 per credit, with a simulator on the site

Use case : invoices, CVs, contracts, RFPs, … especially when document structure is inconsistent.

Just sharing in case it helps someone, happy to answer Qs or show examples if anyone’s working on this.

/r/Python
https://redd.it/1mj459n
Using AI to convert Perl Power Tools to Python

I maintain a project called Perl Power Tools which was originally started in 1999 by Tom Christiansen to provide Windows the tools that Unix people expect. Although it's 26 years later, I'm still maintaining the project mostly because it's not that demanding and it's fun.

Now, Jeffery S. Haemerhas started the Python Power Tools project to automatically port those to Python. I don't have any part of that, but I'm interested in how it will work out and what won't translate well. Some of this is really old 1990s style Perl and is bad style today, especially with decades of Perl slowly improving.

/r/Python
https://redd.it/1mjanx3
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/1mjkyyw
Best Frontend Framework

what do you suggest is best frotnend framework libraary for DJango flask python based backend framework in web devalopment i am a devaloper but in MERN AND NEXT meaning i have only work in JS framwork for backend so what will you suggest ?

/r/djangolearning
https://redd.it/1mja974
Illnesses or Conditions Among Programmers

Hey coders, I'm conducting research on the most common health issues among programmers—whether physical, psychological, or emotional—such as joint problems, eye strain, anxiety, migraines, sleep disorders, and others.

I believe it's a topic that doesn't get enough attention, and I'd really appreciate your input.

The direct question is:

Have you developed any condition as a result of spending long hours in front of a computer? What are you doing to manage it, and what advice would you give to the next generation of programmers to help them avoid it?

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