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
Work offering to pay for a python course. Any recommendations on courses?

My employer has offered to pay for me to take a python course on company time but has requested that I pick the course myself.

It needs to be self paced so I can work around it without having to worry about set deadlines. Having a bit of a hard time finding courses that meet that requirement.

Anyone have suggestions or experience with good courses that fit the bill?

/r/Python
https://redd.it/1k5awlb
Razorpay not secure page while payment verification

/r/djangolearning
https://redd.it/1k3hogi
How to extract data from Wikipedia for a specific category?

Hey everyone,
I'm looking for the best way to extract data from Wikipedia, but only for a specific category and its subcategories (for example: "Nobel laureates").

/r/Python
https://redd.it/1k5w65s
Flask run server

Hey guys a learn flask whit cs50x course. And i make a web app to mage clients of my entrepreneurship. What would be the cheapeast way to have this aplication running whithout it runing a computer?

I thought I could load it onto a flash drive and connect it to the router so the file is local, then run it from a PC. That way, I can access it from all my devices.

pd( no se nada sobre servidores ni seguridad en la web)

/r/flask
https://redd.it/1k4chqu
Meta leads linking with django app

I am currently developing a crm with django. I need to get the leads generated from meta platforms in my app. Also need the ads and campaigns. How can I get the leads once generated from meta? Also how to get the ads and campaigns that are currently active?
I checked out meta developers docs and didn't get a clear picture.

/r/django
https://redd.it/1k5wxe0
Advanced Alchemy 1.0 - A framework agnostic library for SQLAlchemy

# Introducing Advanced Alchemy

Advanced Alchemy is an optimized companion library for SQLAlchemy, designed to supercharge your database models with powerful tooling for migrations, asynchronous support, lifecycle hook and more.

You can find the repository and documentation here:

- GitHub Repository
- Official Documentation

## What Advanced Alchemy Does

Advanced Alchemy extends SQLAlchemy with productivity-enhancing features, while keeping full compatibility with the ecosystem you already know.

At its core, Advanced Alchemy offers:

- Sync and async repositories, featuring common CRUD and highly optimized bulk operations
- Integration with major web frameworks including Litestar, Starlette, FastAPI, Flask, and Sanic (additional contributions welcomed)
- Custom-built alembic configuration and CLI with optional framework integration
- Utility base classes with audit columns, primary keys and utility functions
- Built in File Object data type for storing objects:
- Unified interface for various storage backends (`fsspec` and `obstore`)
- Optional lifecycle event hooks integrated with SQLAlchemy's event system to automatically save and delete files as records are inserted, updated, or deleted
- Optimized JSON types including a custom JSON type for Oracle
- Integrated support for UUID6 and UUID7 using `uuid-utils` (install with the uuid extra)
- Integrated support for Nano ID using `fastnanoid` (install with the nanoid extra)
- Pre-configured base classes with audit

/r/Python
https://redd.it/1k5z534
Template tag hack to reduce SQL queries in templates... am I going to regret this later?

A while back I managed to pare down a major view from ≈360 SQL queries to ≈196 (a 45% decrease!) by replacing major parts of templates with the following method:

* Make a new template tag i.e. `render_header(obj_in):`
* grab "`obj`" as a queryset of `obj_in`(or grab directly from `obj_in`, whichever results in less queries at the end)
* gradually generate the output HTML by grabbing properties of "`obj`"
* register.filter and load into template
* replace the existing HTML to generate from the template tag i.e.`{{post|render_header|safe}}`

For example, here is what it looks like in the template:

{% load onequerys %}
<header class="post-head">{{post|render_header|safe}}</header>

And in `(app)/templatetags/onequerys.py`:

def render_header(obj_in):
    post = obj_in # grab directly or do Post.objects.get(id=obj_in.id)
    final = f" -- HTML is assembled here from the properties of {post}... -- "
    return final

register.filter("render_header", render_header)

So far this works like a charm but I'm wondering... I haven't seen anyone else do this online and I wonder if it's for a good reason. Could this cause any

/r/djangolearning
https://redd.it/1k2x0zs
Declarative GUI toolkit - Slint 1.11 upgrades Python Bindings to Beta 🚀

We're delighted to release Slint 1.11 with two exciting updates:

Live-Preview features Color & Gradient pickers,
Python Bindings upgraded to Beta.

Speed up your UI development with visual color selection and more robust Python support. Check it out - https://slint.dev/blog/slint-1.11-released

/r/Python
https://redd.it/1k5wqpr
Goombay: For all your sequence alignment needs

# Goombay

If you have any questions or ideas, feel free to leave them in this project's [discord server](https://discord.gg/SDUNcjzaEh)! There are also several other bioinformatics-related projects, a website, and a game in the works!

# What My Project Does

**Goombay** is a Python project which contains several sequence alignment algorithms. This package can calculate distance (and similarity), show alignment, and display the underlying matrices for Needleman-Wunsch, Gotoh, Smith-Waterman, Wagner-Fischer, Waterman-Smith-Beyer, Lowrance-Wagner, Longest Common Subsequence, and Shortest Common Supersequence algorithms! With more alignment algorithms to come!

**Main Features**

* Global and Local sequence alignment
* Common method interface between classes for ease of use
* Class-based and instance-based use (customizable parameters)
* Scoring, matrix visualization, and formatted sequence alignment
* Thorough testing

For all features check out the full readme at [GitHub](https://github.com/lignum-vitae/goombay) or [PyPI](https://pypi.org/project/goombay/).

# Target Audience

This API is designed for researchers or any programmer looking to use sequence alignment in their workflow.

# Comparison

There are many other examples of sequence alignment PyPI packages but my specific project was meant to expand on the functionality of [textdistance](https://github.com/life4/textdistance)! In addition to adding more choices, this project also adds a few algorithms not present in textdistance!

# Basic Example

from goombay import needleman_wunsch

print(needleman_wunsch.distance("ACTG","FHYU"))
# 4


/r/Python
https://redd.it/1k6259g
HsdPy: A Python Library for Vector Similarity with SIMD Acceleration

What My Project Does

Hi everyone,

I made an open-source library for fast vector distance and similarity calculations.

At the moment, it supports:

- Euclidean, Manhattan, and Hamming distances
- Dot product, cosine, and Jaccard similarities

The library uses SIMD acceleration (AVX, AVX2, AVX512, NEON, and SVE instructions) to speed things up.

The library itself is in C, but it comes with a Python wrapper library (named HsdPy), so it can be used directly with NumPy arrays and other Python code.

Here’s the GitHub link if you want to check it out: https://github.com/habedi/hsdlib/tree/main/bindings/python

/r/Python
https://redd.it/1k60ci8
Django-admin-shellx - A terminal in your admin using xtermjs

Hey,

I built an Django app that adds a terminal using xterm.js to the admin. Under the hood it uses websockets with Django channels and xterm.js for the terminal.

Has multiple features as full screen mode, favorite commands, recording of actions and history of commands among others.

Preview:

GIF

Here is the GitHub link:

adinhodovic/django-admin-shellx

Thanks for taking a look!

/r/django
https://redd.it/1k67vxq
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/1k6ecup
What is the technique for side by side comparisons of queryset?

I am working on a view that does a side by side comparison of 3 different date ranges and compares the total of each product per category. The results are stored into a table for a frontend to render. The problem is that it keeps timing out. Wizards of reddit, there has to be a better way. Please teach me. I know am doing this in an ugly way.

IE

||2022|2023|
|:-|:-|:-|
|Lumber|1|2|
|Produce|4|1|



@api_view(['POST'])
def sideBySideComparison(
request
):
    filters1 =
request
.data.get('filters1', None)
    filters2 =
request
.data.get('filters2', None)
    filters3 =
request
.data.get('filters3', None)

    dataset3 = None
    dataset2 = None
    dataset1 = Product.objects.all()
    for filter_key,filter_value in filters1.items():
        new_filter = (filter_key,filter_value)
        dataset1 = dataset1.filter(new_filter)
   

/r/django
https://redd.it/1k699ur
Jonq! Your python wrapper for jq thats readable

Yo!

This is a tool that was proposed by someone over here at [r/opensource](https://www.reddit.com/r/opensource/). Can't remember who it was but anyways, I started on v0.0.1 about 2 months ago or so and for the last month been working on v0.0.2. So to briefly introduce Jonq, its a tool that lets you query JSON data using SQLish/Pythonic-like syntax.

# Why I built this

I love `jq`, but every time I need to use it, my head literally spins. So since a good person recommended we try write a wrapper around jq, I thought, sure why not.

# What my project does?

`jonq` is essentially a Python wrapper around `jq` that translates familiar SQL-like syntax into `jq` filters. The idea is simple:

bash
jonq data.json "select name, age if age > 30 sort age desc"

Instead of:

bash
jq '.[] | select(.age > 30) | {name, age}' data.json | jq 'sort_by(.age) | reverse'

# Features

* **SQL-like syntax**: `select`, `if`, `sort`, `group by`, etc.
* **Aggregations**: `sum`, `avg`, `count`, `max`, `min`
* **Nested data**: Dot notation for nested fields, bracket notation for arrays
* **Export formats**: Output as JSON (default) or CSV (previously CSV wasn't an option)

# Target Audience

Anyone who works with json

# Comparison

Duckdb, Pandas

# Examples

# Basic filtering:

## Get names and

/r/Python
https://redd.it/1k6es7d
django project with Adsense and Google Search Console

Hi: I have my Django project already in production, but I'm having trouble getting accepted in Google AdSense and Google Search Console. Adsense frequently asks me to activate the proprietary verification of the page and, obviously, it doesn't accept me for monetization; it just stays in "preparation". Also, Google Search Console does not index my canonical URL https://anisonglist.pythonanywhere.com/, but does not give me more details of the problem. Does anyone have a detailed guide and tools to detect possible errors in my project?


/r/django
https://redd.it/1k68da6
iFetch v2.0: A Python Tool for Bulk iCloud Drive Downloads

Hi everyone! A few months ago I shared **iFetch**, my Python utility for bulk iCloud Drive downloads. Since then I’ve fully refactored it and added powerful new features: modular code, parallel “delta-sync” transfers that only fetch changed chunks, resume-capable downloads with exponential backoff, and structured JSON logging for rock-solid backups and migrations.

# What My Project Does

iFetch v2.0 breaks the logic into clear modules (logger, models, utils, chunker, tracker, downloader, CLI), leverages HTTP Range to patch only changed byte ranges, uses a thread pool for concurrent downloads, and writes detailed JSON logs plus a final summary report.

# Target Audience

Ideal for power users, sysadmins, and developers who need reliable iCloud data recovery, account migrations, or local backups of large directories—especially when Apple’s native tools fall short.

# Comparison

Unlike Apple’s built-in interfaces, iFetch v2.0:

\- **Saves bandwidth** by syncing only what’s changed

\- **Survives network hiccups** with retries & checkpointed resumes

\- **Scales** across multiple CPU cores for bulk transfers

\- **Gives full visibility** via JSON logs and end-of-run reports

# Check it out on GitHub

https://github.com/roshanlam/iFetch

Feedback is welcome! 😊

/r/Python
https://redd.it/1k6ipim
Will AI Make CBVs Obsolete?

Have you noticed that AI tools (Copilot, Claude Code, Codex, etc.) understand and modify simple, self-contained functions much more reliably than deep class hierarchies?



Function-based views keep all the query logic, rendering steps, and helper calls in one clear place—so AI doesn’t have to hunt through mixins or override chains to figure out what’s happening. AI assistants don’t get bored by a bit of repetitive code, so we don’t lose maintainability when write straightforward functions.



So, do we even need CBVs anymore?

/r/django
https://redd.it/1k6ns3f
Dealing with internal chaos due to a new “code efficiency consultant” that’s been hired.

Long story short, mr big bollocks has been hired for a few months and he’s causing chaos and carnage but as with all things corporate, the powers that be aren’t listening.

First of many battles I need to fight is pushing for a proper static code analysis tool to be implemented in our processes. However, the new fancy big pay check consultant is arguing against it.

Anyone got any ideas or anecdotes for me to include in my arguement that will help strengthen my case? Currently, the plan is to just push stuff live with minimal code reviews as “the new process eliminates the need for additional tools and reduces time spent deliberatating completed activities”

In other words, we’re heading down a route of “just ship it and pray it doesn’t break something”

/r/Python
https://redd.it/1k6nfef
Honest Review: Huge Time Saver for my AI Project

I know this might feel like it belongs more on r/indiehackers, but I’m a part-time indie maker building an AI SaaS (a niche analytics tool) using Flask, and I had to share my experience with Blitzship since it’s built on Flask and saved me a ton of time. Hope you all find this useful!Blitzship is a Flask-based boilerplate with auth, Stripe, OpenAI integration, and credit metering pre-configured. I was skeptical, but it got me from zero to a working app in a day. Their site claims it saves 18+ hours, and I’d say that’s spot-on—Stripe webhooks alone saved me 5 hours of pain. It’s a one-time payment (I got the Pro plan for $149 with a $100 discount—heard \~32 spots left), and the few-line deploy on Heroku was ridiculously easy. Their docs are great, even for someone like me with moderate Flask experience. They mention a user landing a paying customer in 48 hours, which is now my goal!That said, it’s not flawless. The Bootstrap UI looks decent but feels generic, so I spent a few hours tweaking it to match my brand’s vibe. Also, you need basic Flask knowledge to navigate it, which was fine for me but might

/r/flask
https://redd.it/1k6m1xd
PyCharm 2025.1 dropped the ball

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