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
PathQL: A Declarative SQL Like Layer For Pathlib

🐍 What PathQL Does

PathQL allows you to easily walk file systems and perform actions on the files that match "simple" query parameters, that don't require you to go into the depths of os.stat_result and the datetime module to find file ages, sizes and attributes.

The tool supports query functions that are common when crawling folders, tools to aggregate information about those files and finally actions to perform on those files. Out of the box it supports copy, move, delete, fastcopy and zip actions.

It is also VERY/sort-of easy to sub-class filters that can look into the contents of files to add data about the file itself (rather than the metadata), perhaps looking for ERROR lines in todays logs, or image files that have 24 bit color. For these types of filters it can be important to use the built in multithreading for sharing the load of reading into all of those files.

```python
from pathql import AgeDays, Size, Suffix, Query,ResultField

# Count, largest file size, and oldest file from the last 24 hours in the result set
query = Query(
where
expr=(AgeDays() == 0) & (Size() > "10 mb") & Suffix("log"),
frompaths="C:/logs",
threaded=True
)
result
set =

/r/Python
https://redd.it/1ojgqmr
What's this sub's opinion on panda3d/interrogate?

https://github.com/panda3d/interrogate


I'm just curious how many people have even heard of it, and what people think of it.

Interrogate is a tool used by Panda3D to generate python bindings for its c++ code. it was spun into it's own repo a while back in the hopes that people outside the p3d community might use it.

/r/Python
https://redd.it/1ojgkmz
Is Django a good fit for a multithreaded application?

Hi everyone,

I need to develop an application with the following requirements:

Multithreaded handling of remote I/O

State machine management, each running in its own thread

REST web API for communication with other devices

A graphical UI for a touch panel PC


I was considering Django, since it would conveniently handle the database part (migrations included) and, with django-ninja, allow me to easily expose REST APIs.

However, I’m unsure about the best way to handle database access from other threads or processes.
Ideally, I’d like to separate the web part (Django + API) from the rest of the logic.

My current idea is to have two processes:

1. Uvicorn or whatever running Django with the web APIs


2. A separate Python process running the UI, state machines, and remote I/O polling, but using in some way the Django ORM


Would this kind of architecture be feasible?
And if so, what would be the recommended way for these two processes to communicate (e.g., shared database, message queue, websockets, etc.)?

Side note: I've asked chatgpt to help me with the translation while writing the explanation, I can assure I'm not a bot 🤣

/r/django
https://redd.it/1oj4bz3
[R] Researchers from the Center for AI Safety and Scale AI have released the Remote Labor Index (RLI), a benchmark testing AI agents on 240 real-world freelance jobs across 23 domains.

https://redd.it/1ojinwl
@pythondaily
Career change -

After 20yrs in Linux Administration - with some Python and BASH scripting - I am now learning Django. Very complicated but love it. way way way too early stages now.

Am I late in this journey, can AI kick me out? Or should I keep going?

/r/djangolearning
https://redd.it/1oj4315
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/1ojkvx8
Reinventing the wheel?

I’ve been using Python for 2 years and I’m now doing some email outreach and other marketing activities that include website visitor tracking.

Is it a crazy idea to build a Python / Flask / Django app like some of the better known marketing automation apps? single tenant not multi-tenant

Are there some building blocks or repositories that take me some or all of the way?

Interested in sending emails via Google mail with tracking of opens and clicks. Track website pages and landing pages. Assist with scoring visitors to identify engagement.

Crazy or a good challenge?
Appreciate a reality check.

/r/Python
https://redd.it/1ojv8h5
PyCalc Pro v1.0 – My Python CLI Calculator for Math Nerds

PyCalc Pro v1.0 is a command-line Python calculator that handles advanced math (trig, logs, factorials), arithmetic & geometric sequences, and number theory functions like prime checks, GCD, and LCM. It features a modular menu system for easy navigation.

Target Audience:
Students, hobbyists, and Python learners who want a CLI calculator to explore math concepts. It is designed as a learning and experimentation tool rather than for daily accounting.

Comparison:
Unlike basic Python scripts or generic calculator apps, PyCalc Pro combines advanced math, sequences, and number theory functions in one modular interface, making it more feature-rich and educational than standard alternatives.

Installation:

1. git clone `https://github.com/lw-xiong/pycalc-pro`
2. pip install -r requirements.txt
3. python `main.py`

Feedback and feature ideas are welcome.

/r/Python
https://redd.it/1ojz871
How to deal with money?

Yeah spend it lol, no but seriously hear me out.

I want to do internal money calculations with 4 decimal places to prevent rounding errors. But when I do so the Django admin shows numbers like 25.0000. do I need to make display functions for all of them that round the value and add a currency like € or $?

Is there a best practice?

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