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
Nested Images in Wagtail

I have noticed by default images break the list structure and is inserted outside of the list. Is it possible to have nested images within a list item in Wagtail?

/r/django
https://redd.it/1j8t0fe
Turtle.py app to demo RGB color values

* What My Project Does

I've been working on turtle-related projects and I needed a simple, interactive, single-file Python program to explain RGB color values. I wrote this one up as part of my work writing [a Simple Turtle Tutorial written in Wikipedia-style Simple English](https://github.com/asweigart/simple-turtle-tutorial-for-python/) so it can be translated to non-English languages.

The app has three sliders for the amount of red, blue, and green for the window's background color. The RGB values are presented under the sliders for the 0.0 to 1.0 scale, 0 to 255 scale, and hexadecimal 0x00 to 0xFF scale. You can drag the sliders or click on the slider lines directly. There are also 14 preset color buttons along the top to click on.



PyPI page: https://pypi.org/project/turtlecolors/

GitHub repo: https://github.com/asweigart/turtlecolors

Install with `python -m pip install turtlecolors` on Windows or `python3 -m pip install turtlecolors` on macOS/Linux.

Run with `python -m turtlecolors` on Windows or `python3 -m turtlecolors` on macOS/Linux. Or run the code `import turtlecolors;turtlecolors.main()`

When the program first runs, it also prints out the color name strings that Python's turtle module uses. Unlike other lists of color names, I actually checked my list against the turtle.py to make sure they're correct. (I'm pretty sure clickbait articles just use chatgpt

/r/Python
https://redd.it/1j8yyc0
My flask open source alternative to Nexcloud !

I created an alternative to Nexcloud with flask, I'm really proud of myself honestly.

The goal is to be able to host a cloud storage service at home and control 100% of our files etc..

It's easy to use + compatible with linux and windows!

What do you think? Here's the github repo, it's open source and totally free.
https://github.com/Ciela2002/openhosting/tree/main

/r/flask
https://redd.it/1j8zg9j
Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1j95o1i
I didn't want to go, but PyCharm finally drove me into the arms of VSCode, after 5+ years.

I just switched to VSCode after well over five years with PyCharm. I didn't want to do it, but I just can't stand it anymore.

Things I love about PyCharm and will miss

1. The refactoring functionality. VSCode's Python extension has that too, but it isn't as nice.

At this point, that's pretty much it.

Things that drove me nuts

1. IdeaVim. It actually got better recently, but for years and years, the undo function was busted, so you had to hit u over and over to undo what in real vim is a single operation. VSCode's neovim plugin uses actual neovim under the hood, which is obviously so much more robust and faithful, while IdeaVim will never be a full implementation.
2. The gradual accumulation of simple bugs that never get fixed.
3. It's so slow. I didn't appreciate just how slow until I switched over to VSCode. I mean, holy crap, it's 10x faster for a lot of things (opening a project, installing or restarting extensions, for example).

Here are the bugs that have bugged me the worst:

The "usages" window (cmd-click on a definition, see where it's used) constantly resizes itself too small. It's been a problem for years. They won't fix the way autosize

/r/Python
https://redd.it/1j9196v
Ascii Video Player

Hello People!
A few months ago, I built an ASCII video player that converts any video into an ASCII art version (with audio support). Back then, I didn’t have the confidence to share it, but now I’ve decided to put it out there!

What My Project Does

ASCII-Flix lets you watch videos directly in your terminal by converting frames into ASCII characters, creating a retro, text-based viewing experience. It supports 2 modes for different ASCII rendering styles and plays the original audio alongside the video.

I used OpenCV, python-curses, and Pygame(for audio support) .

Target Audience:

This project is for anyone who enjoys creative terminal-based projects, ASCII art enthusiasts, and people who like experimenting with unconventional ways of watching videos. If you’re into tech nostalgia, retro computing aesthetics, or just want to try something fun in your terminal, you’ll probably enjoy this!

Comparison:

This was inspired by ASCII Theatre, which allows you to watch movies in ASCII art format in the terminal. However, ASCII Theatre is a more refined version of this concept. ASCII-Flix, on the other hand, is something I made for fun—it’s a lighthearted experiment that brings a unique way to experience videos in ASCII form.

How to use it:
1. pip install ascii-flix
2. Type the command ascii-flix on your

/r/Python
https://redd.it/1j96mku
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/django
https://redd.it/1j93kwy
MVP codeStructure suggestion for CLOUDWISE(my multiple cloud APP)

Starting a 15-day MVP to manage AWS resources via natural language. Any tips for structuring a Flask project with multiple cloud provider integrations?

/r/flask
https://redd.it/1j989y5
LambdaLabs: Create HTTP routes, lambdas and databases in runtime.

What My Project Does:
LambdaLabs is a small-scale, hobby and proof-of-concept project that enables dynamic creation of routes, serverless lambdas, and databases. It runs over FastAPI with almost no performance overhead.

Target Audience:
Currently this project is just a toy / hobby project for getting more into python.

The goal with this project was to build a small-scale, lightweight application that allows the same power as FastAPI without introducing overhead usually associated with these kind of applications.


https://github.com/joexbayer/LambdaLabs

/r/Python
https://redd.it/1j9fqu1
We launched serverless hosting option for Flask apps

Hey r/flask ,

I’ve been deploying Flask and Django apps for years, and one thing that always frustrated me is the cost—especially for small projects that don’t get much traffic.

# The problem:

Paying for idle time – Most hosting providers charge 24/7, even if your app is mostly idle.
Multiple apps, multiple bills – Want to run a few small services? You’ll likely pay for each one separately, even if they barely get used.

I wanted a more efficient way to host Flask apps, so I built Leapcell—a serverless option that deploys instantly, gives you a URL, and only charges for actual usage (no idle costs).

If you’ve struggled with the cost of Python hosting, I’d love to hear your feedback!

Try Leapcell: **https://leapcell.io/**

/r/flask
https://redd.it/1j9fhhk
13 Months into Django - Built a Boilerplate to Share

I started learning Django 13 months ago and I really enjoy it. I've been building web apps and improving my skills ever since.

The more I built, the more I noticed setup was eating my time: auth, payments, same old grind.

So I put together a little boilerplate to skip the hassle - Django with HTMX, Tailwind + Kutty, Stripe, Wagtail, Django-Allauth all ready in 15 minutes.

It’s been a time-saver for me, and a couple friends didn’t hate it. Figured I’d share with the community that got me started.

Here's the repo if you're curious

/r/django
https://redd.it/1j9jyc4
For Hire Full Remote Software engineer with 6+ years of experience

I’m a Software Engineer with over 6 years of experience - including YC backed startups as founding engineer - building scalable systems, crafting high-performance backends, LLM based features and delivering impactful AI/ML-driven solutions.

I've worked on everything from scaling products to millions of users at startups to optimizing workflows in enterprise environments.

Open to consulting gigs and full time roles.

Tech Stack

Languages — Python, JavaScript, Typescript

Frameworks & Packages — Django, React

Datastores & Caches — PostgreSQL, Redis, RabbitMQ, Kafka, DynamoDB

Deployment Tools — Docker, Docker Compose

Cloud providers — AWS, GCP

Feel free to comment or DM.

/r/django
https://redd.it/1j9q4cs
ZipNN: High-Speed Compression for AI Models

📌 **Repo:** [GitHub - zipnn/zipnn](https://github.com/zipnn/zipnn)

# 📌 What My Project Does

ZipNN is a compression library designed for **AI models, embeddings, KV-cache, gradients, and optimizers**. It enables storage savings and **fast decompression on the fly**—directly on the CPU.

* **Decompression speed**: Up to **80GB/s**
* **Compression speed**: Up to **13GB/s**
* Supports **vLLM & Safetensors** for seamless integration

# 🎯 Target Audience

* **AI researchers & engineers** working with **large models**
* **Cloud AI users** (e.g., Hugging Face, object storage users) looking to optimize **storage and bandwidth**
* **Developers handling large-scale machine learning workloads**

# 🔥 Key Features

* **High-speed compression & decompression**
* **Safetensors plugin** for easy integration with vLLM:pythonCopyEditfrom zipnn import zipnn\_safetensors zipnn\_safetensors()
* **Compression savings**:
* **BF16**: 33% reduction
* **FP32**: 17% reduction
* **FP8 (mixed precision)**: 18-24% reduction

# 📈 Benchmarks

* **Decompression speed:** 80GB/s
* **Compression speed:** 13GB/s

# Why Use ZipNN?

* **Faster uploads & downloads** (for cloud users)
* **Lower egress costs**
* **Reduced storage costs**

# 🔗 How to Get Started

* **Examples:** [GitHub - ZipNN Examples](https://github.com/zipnn/zipnn/tree/main/examples)
* **Docker:** [ZipNN on DockerHub](https://hub.docker.com/r/zipnn/vllm-openai)

ZipNN is seeing **200+ daily downloads on PyPI**—we’d love your feedback! 🚀

/r/Python
https://redd.it/1j9hype
UV or PyEnv for student python teaching / python installs (linux)

I teach python across a number of courses (primarily on linux) from 1st year just learning to program to MSc Level Machine learning.

For the last few years I have used pyenv to manage the python versions the students are using, either as a pyenv global for a specific version of python for the 1st years. To using pyenv for anaconda install for the MSc students.

I have not really used virtual envs with the students as it adds a lot of complexity to the students learning and they tend not te be very good at tidying up etc.

I'm thinking of moving to uv but as it doesn't quite work like pyenv I'm not sure how to manage the students python installs.

My initial idea is to write a script to install uv and then install the required python version and then install the required default packages (numpy etc etc) and generate a default root / home level venv and make this transparent to the students so basically when they login they are in a venv with everything they need.

Pros to this is the students just run python and it works which for the 1st years is a big win.

In

/r/Python
https://redd.it/1j9g0ii
Gemma 3 released: beats Deepseek v3 in the Arena, while using 1 GPU instead of 32 N

Chatbot Arena Elo Score


https://blog.google/technology/developers/gemma-3/

/r/MachineLearning
https://redd.it/1j9npsl
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
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
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