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
Looking for the best structured paid course to master Django — any recommendations?

Hey everyone! I'm looking for a well-structured course that can teach me Django from beginner to advanced level. Any recommendations?
and I will go through the docks but right now I need a structured course that can teach me backend in django.



/r/django
https://redd.it/1k3mfbp
I made a django app to automate video processing & streaming

Hey dear community!

I have been part of you for many years and I am hobbyist django developer originally working as a data engineer.

Recently I shared here that I just made an api with django to automate video processing. This time I made a django app which you can install to your project and just include pretty cool features builtin.

And if you process less than 10gb < month, basically everything is free - forever.

So what it does?

\- If you have a django project and if you are storing your media files on S3 (aws, hetzner or any s3) you are probably aware that it charges you by storage and bandwidth. And also for big files usually the experience for the people streaming it is not very good because it is slow.

The app uses the contentor API and basically after you set it up, it automatically compress your content into web optimized format, size. Creates different resolutions (based on your settings). It also replaces the original file.

It also have a pretty cool feature for uploading large files, which is chunk upload. It is also included.

I really enjoyed building this, I hope you would also enjoy

/r/django
https://redd.it/1k3skn1
glyphx: A Better Alternative to matplotlib.pyplot – Fully SVG-Based and Interactive

What My Project Does

glyphx is a new plotting library that aims to replace matplotlib.pyplot for many use cases
— offering:

• SVG-first rendering: All plots are vector-based and export beautifully.

• Interactive hover tooltips, legends, export buttons, pan/zoom controls.

• Auto-display in Jupyter, CLI, and IDE — no fig.show() needed.

• Colorblind-safe modes, themes, and responsive HTML output.

• Clean default styling, without needing rcParams or tweaking.

• High-level plot() API, with built-in support for:

• line, bar, scatter, pie, donut, histogram, box, heatmap, violin, swarm, count, lmplot, jointplot, pairplot, and more.



Target Audience

• Data scientists and analysts who want fast, beautiful, and responsive plots

• Jupyter users who are tired of matplotlib styling or plt.show() quirks

• Python devs building dashboards or exports without JavaScript

• Anyone who wants a modern replacement for matplotlib.pyplot

Comparison to Existing Tools

• vs matplotlib.pyplot: No boilerplate, no plt.figure(), no fig.tight_layout() — just one line and you’re done.

• vs seaborn: Includes familiar chart types but with better interactivity and export.

• vs plotly / bokeh: No JavaScript required. Outputs are pure SVG+HTML, lightweight and shareable. Yes.

• vs matplotlib + Cairo: glyphx supports native SVG export, plus optional PNG/JPG via cairosvg.



Repo

GitHub: [github.com/kjkoeller/glyphx](https://github.com/kjkoeller/glyphx)

PyPI: [pypi.org/project/glyphx](https://pypi.org/project/glyphx)



Happy to get feedback or ideas — especially if you’ve tried building matplotlib replacements before.

Edit:
Hyperlink URLs

/r/Python
https://redd.it/1k3yoq5
OC Anirra, a self-hosted, anime watchlist, search, and recommendations app

[Release\] Anirra – Self-hosted Anime Watchlist, Search, and Recommendation App with Sonarr/Radarr Integration

I’ve just released Anirra, a fully self-hosted anime watchlist and recommendation app. It's designed for anime fans who want control over their data and tight integration with their media server setup.

The frontend is writen in Nextjs, and the backend writen completely in Python using FastAPI.

# 🔧 What my project does

Watchlist Management – Organize anime into categories: planning, watching, or completed.
Search – Find anime by title or tags using a built-in offline database.
Recommendations – Get suggestions based on your watch history.
Sonarr/Radarr Integration – Add anime or movies directly to your media server from within the app.

# Target Audience

Users looking to keep their data private, and easily add new anime to their media servers.

# Comparison to Existing Tools

MAL, and AniList do exist, but you expose your data to them and they don't hook into your own media servers for ease of use.

# 🔜 Coming Soon

Mobile-friendly UI
Watchlist rating and smarter recommendations
Jellyfin integration for tracking watch progress
Manga tracking and recommendations based off of read manga

Repo: https://github.com/jaypyles/anirra

Let me know if you run into issues or have feature suggestions. Feedback is welcome, as well as pull requests and bug reports.

/r/Python
https://redd.it/1k3zzph
How good is flask(gunicorn) for production

I want to write a simple web app that serves as a form, it’ll accept sensitive personal info from the recipients. Issue is i’ve written flask for mostly personal websites and chatbots nothing too serious. Can flask scale and is it secure? or do I have to learn django?

I am aware that the web server provided with flask isn’t supposed to be used.

/r/flask
https://redd.it/1k3w02f
Settings.py for DRF

RESTFRAMEWORK = {
    "DEFAULT
AUTHENTICATIONCLASSES": (
        "rest
frameworksimplejwt.authentication.JWTAuthentication",
    ),
    "DEFAULT
PERMISSIONCLASSES": [
        "rest
framework.permissions.IsAuthenticated",
    ],
}

SIMPLEJWT = {
    "ACCESS
TOKENLIFETIME": timedelta(
minutes
=30),
    "REFRESH
TOKENLIFETIME": timedelta(
days
=1),
}


I just finished watching TechWithTim's django and react tutorial and am trying to work on my own project. More specifically for these two things above, what does the REST\
FRAMEWORK variable do, and is the SIMPLE_JWT variable how you usually set the lifetimes for the tokens. Thank you!

/r/django
https://redd.it/1k4ansn
Why was multithreading faster than multiprocessing?

I recently wrote a small snippet to read a file using multithreading as well as multiprocessing. I noticed that time taken to read the file using multithreading was less compared to multiprocessing. file was around 2 gb

Multithreading code

import time
import threading

def processchunk(chunk):
# Simulate processing the chunk (replace with your actual logic)
# time.sleep(0.01) # Add a small delay to simulate work
print(chunk) # Or your actual chunk processing

def read
largefilethreaded(filepath, chunksize=2000):
try:
with open(filepath, 'rb') as file:
threads = []
while True:
chunk =
file.read(chunksize)


/r/Python
https://redd.it/1k4cwbm
How do you manage Django Migration in a team

Hello everyone,

How do you manage migration files in your Django project in multiple developers are working in it?

How do you manage local copy, staging copy, pre-prod and production copy of migration files? What is practice do you follow for smooth and streamlined collaborative development?

Thanks in advance.

/r/djangolearning
https://redd.it/1k43p9z
Made a Python Mod That Forces You to Be Happy in League of Legends 😁

Figured some Python enthusiasts also play League, so I’m sharing this in case anyone (probably some masochist) wants to give it a shot :p

What My Project Does

It uses computer vision to detect if you're smiling in real time while playing League.
If you're not smiling enough… it kills the League process. Yep.


Target Audience

Just a dumb toy project for fun. Nothing serious — just wanted to bring some joy (or despair) to the Rift.


Comparison

Probably not. It’s super specific and a little cursed, so I’m guessing it’s the first of its kind.


Code

👉 Github

Stay cool, and good luck with your own weird projects 😎 Everything is a chance to improve your skills!

/r/Python
https://redd.it/1k4kx23
Anyone still using twisted in 2025.

are there companies still using python twisted library and what benefits it has over others . Does is still makes sense to use twisted for backend game servers?
https://github.com/twisted/twisted

/r/Python
https://redd.it/1k4en05
Personal Project. Preparation questions generator for CompTIA Security+

Hi guys,

I have been developing a tool with Flask to generate prep questions for Security+ for my own preparation, but it actually turned out so well so I decided to share it with people. Please have a look: https://github.com/ilya-smut/blue-book

It uses Google Gemini to generate questions. The questions are actually of high quality, and you can even specify the topic you want to focus on. It also checks your answers and tells you what you got right or wrong. I attach some screenshots.

Please let me know what you think about and feel free to use it for your own preparation or contribute to the project!

P.S. I know we are talking about Cyber Security here, so just wanted to clarify one thing. Gemini access token is saved locally on your machine in user home directory. You can see how it's done in save_config() function in the code.

You can generate 2, 5, 10, or 20 questions. You can change \/ add more values in code if you want to

Example with a topic to focus on specified

(https://preview.redd.it/tool-to-generate-comptia-security-preparation-questions-v0-xb1z3gc3a9we1.png?width=1722&format=png&auto=webp&s=a015c58ceb692c5cfaaa733d93df8cef04032d25)

Example of questions generated without topic specified

(https://preview.redd.it/tool-to-generate-comptia-security-preparation-questions-v0-3lhuqrcea9we1.png?width=1412&format=png&auto=webp&s=e1f4a9ffe7dcc221e0e8e4522d8076a2c1ab2e60)

Answers check

(https://preview.redd.it/tool-to-generate-comptia-security-preparation-questions-v0-y8ei0pysa9we1.png?width=1220&format=png&auto=webp&s=f9c9e2357a3aa363428921e407b2e0e59b5d8993)

/r/flask
https://redd.it/1k4pjsc
D What are the current research gaps on GNN?

I would like to know your suggestions since I’m very interested in GNN and also their explainability aspects, however I noticed the huge amount of literature in the last years and I don’t want to lose focus in the new aspects of potential research.

/r/MachineLearning
https://redd.it/1k4oxgo
Tuesday Daily Thread: Advanced questions

# Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

## How it Works:

1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.

## Guidelines:

* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.

## Recommended Resources:

* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.

## Example Questions:

1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the

/r/Python
https://redd.it/1k4sm06
Make your module faster in benchmarks by using tariffs on competing modules!

Make your Python module faster! Add tariffs to delay imports based on author origin. Peak optimization!
https://github.com/hxu296/tariff

/r/Python
https://redd.it/1k4qhdd
Thread or process vs celery

I have a service a client connect with web socket. When the service get a connection, it will trigger a task that should run as long as the web socket connection is alive. The task is like doing something regularly every second, then update the client through the web socket so that the client can view it on the display.

How do I architect this? At first I thought I should use channel and celery to do the task but then it's not really like a traditional task a celery worker is supposed to do but it's rather very long running task almost like another service (running like 1 hr or as long as websocket is alive, and it should update the client in real time very second). Is it better to fork process/thread and run it on demand? If I use thread, how do I manage work thread and scale it out and down?

Is Django not appropriate here? I'll have the web page run with Django anyway.

/r/django
https://redd.it/1k4zc5u
6th Datathon - a Virtual Data Science Hackathon is happening this weekend

DubsTech UW is hosting a virtual Datathon this Saturday, April 26 and Sunday, April 27. Do join us if you love data analytics, data visualization, or machine learning and want to put your skills to the test. Our data science hackathon is 100% beginner friendly and you can use Python or any other tool to build your projects!

Get an opportunity to work on real world datasets and get feedback from our panel of 11 judges. So come build with friends, make new friends, learn new skills and compete with data lovers from around the world.

Register Here: https://datathon2025.webflow.io/

Date: April 26 & 27, 2025
Location: Zoom (Virtual)

/r/Python
https://redd.it/1k4b7lx
django-simple-captcha ? My form was a spam magnet

My contact form was getting so much spam I couldn't find real inquiries anymore.

I implemented django-simple-captcha and the spam completely disappeared. I customized it to match my dark theme (you can see it at https://www.eriktaveras.com/contact/) and it works perfectly.

But I'm wondering if it's the best long-term option.

What do you use? django-simple-captcha, Google reCAPTCHA, honeypot fields, or something else?

Have you noticed any impact on conversion rates with different options?

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