Python Daily – Telegram
Python Daily
2.56K subscribers
1.49K photos
53 videos
2 files
39.1K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Stripe alternatives for subnoscription

Hi everyone! Recently I published my wife platform and we are using stripe.

The total cut by them is \~5% and I wonder if is there any alternative I am not aware that we can use which offers better rates.

Does anyone has an experience with other services?

/r/django
https://redd.it/1h9gmhv
D Self-Promotion Thread

Please post your personal projects, startups, product placements, collaboration needs, blogs etc.

Please mention the payment and pricing requirements for products and services.

Please do not post link shorteners, link aggregator websites , or auto-subscribe links.

--

Any abuse of trust will lead to bans.

Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the noscript.

--

Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.

/r/MachineLearning
https://redd.it/1h99kae
RedSage is a terminal-based pair programming assistant that integrates with LLMs. Opensource.

Need a junior developer that can program with you? I built one in Python.

What my project does?

After installing the program, you can start RedSage right from your terminal. It’s an AI-powered pair programming assistant that connects to LLMs like OpenAI and Claude to help you write code, explain concepts, and even review your changes in real-time.

Comparisons:

Unlike complex IDE plugins, RedSage is lightweight and works directly from the command line, giving you intelligent code suggestions, context-aware explanations, and seamless Git integration without the overhead. Think of it as having a junior developer by your side, but with no setup hassles and a super-fast workflow. Perfect for anyone looking for a simple, yet powerful coding companion.

LINK: https://github.com/chisasaw/redsage


Conclusion:

I'd like your feedback and project direction. It's entirely built in Python and available on Github. The link i above.



/r/Python
https://redd.it/1h9jd21
ARM Native Python execution time higher than x64 Python?

I am running below python code X Elite Surface Laptop 7. With python x64 and arm64 (3.11.8)
I get below execution speeds:

x64: 28.32 seconds
arm64: 33.34 seconds

I have run it multiple times, I get similar values. I was expecting native python to run much faster than emulated python.
What am I missing? Also please point to different sub if needed.

import time
import math

def calculatepi(iterations):
pi = 0
for i in range(iterations):
pi += 4 * (-1)**i / (2 * i + 1)
return pi

if name == "main":
iterations = 100000000
start
time = time.time()
pivalue = calculatepi(iterations)
endtime = time.time()
elapsed
time = endtime - starttime
print(f"Pi value: {pivalue}")
print(f"Elapsed time: {elapsed
time:.2f} seconds")

I am running below python code on X Elite Surface Laptop 7.
With python x64 and arm64 (3.11.8), I get below execution speeds:

x64: 28.32 seconds
arm64: 33.34 seconds

I have

/r/Python
https://redd.it/1h9o1ed
How OAuth and normall user signup/login will work together

I know it's naive but I can't grasp the whole process of it.

I am creating a app (Django, React, Postgres) and I have normall Login/Signup via my own RESTful endpoints and I also want to give my users the option to signup with Fb/google etc.

For my own RESTful views I'm using Toke authentication but I am not sure how the OAuth Access token will work with that
Do I need to create a authentication token after successful authorization from Resource server ??

I hope It's not a bad question
Thanks

/r/django
https://redd.it/1h9o1m2
I added Bootstrap templates to Neapolitan - Quick CRUD views for Django

I just contributed example templates to Neapolitan (Carlton Gibson's CRUD views library). Create full CRUD interfaces with 4 lines of code!

I Made it work with Bootstrap + Crispy Forms - would love your feedback!

https://github.com/carltongibson/neapolitan/pull/72

/r/django
https://redd.it/1h9lzgm
Deply 0.5.1 Released: New Collectors, 10x Performance Boost, and Stronger Architectural Rules

Hello everyone,

It's Archil again, checking in from Wrocław, Poland. I'm excited to announce the release of Deply 0.5.1, an updated version of my Python tool for enforcing architectural patterns and dependencies in larger codebases. I've noticed steady downloads since the previous post, and I'm genuinely grateful to everyone who has tried Deply or provided feedback.

# What My Project Does

For those new here here is my previous post, Deply analyzes your code structure and verifies that your Python project adheres to a defined architecture. You specify layers, set rules, and Deply enforces them—helping maintain clean, modular, and maintainable code as your project grows.

# Target Audience

Ideal for developers and teams building medium to large Python applications who need to maintain clear, enforceable architectural boundaries. It also suits those aiming to teach or learn best practices.

# Comparison to Other Tools

• pydeps:

Focus: Visualization of dependencies

Comparison: pydeps provides a visual map of imports, helping you understand how parts of your code relate. Deply goes further by actively enforcing rules on these dependencies, ensuring that your project structure adheres to architectural guidelines instead of merely displaying it.

• import-linter:

Focus: Import-based dependency constraints

Comparison: import-linter is excellent for managing import hierarchies and preventing forbidden dependencies. Deply builds on this

/r/Python
https://redd.it/1h9qjjj
Python Django Backend Developer | Software Engineering Student

Hi guys, I am looking for a job/internship as a Django backend developer. Tbh I think I am very highly qualified as a fresher. I am also learning React js. So, do you have any opportunities in mind for me?

/r/django
https://redd.it/1h9clhl
Monday Daily Thread: Project ideas!

# Weekly Thread: Project Ideas 💡

Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.

## How it Works:

1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.

## Guidelines:

* Clearly state the difficulty level.
* Provide a brief denoscription and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.

# Example Submissions:

## Project Idea: Chatbot

**Difficulty**: Intermediate

**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar

**Denoscription**: Create a chatbot that can answer FAQs for a website.

**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)

# Project Idea: Weather Dashboard

**Difficulty**: Beginner

**Tech Stack**: HTML, CSS, JavaScript, API

**Denoscription**: Build a dashboard that displays real-time weather information using a weather API.

**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)

## Project Idea: File Organizer

**Difficulty**: Beginner

**Tech Stack**: Python, File I/O

**Denoscription**: Create a noscript that organizes files in a directory into sub-folders based on file type.

**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)

Let's help each other grow. Happy

/r/Python
https://redd.it/1h9wkuk
Sharing Smoke Simulation Project I have Been Working On

Hello all, I have been working on this project for quite some time and found it to be very useful for my task as a software engineer trying to build Computer Vision applications. My daily job involves working with smokey images and finding models but getting smokey images on demand was not possible and hence I came up with an idea to make a simulator. I modified the existing solution from bijection/smoke.js and implemented it with Python.

Links:

GitHub Repo: [https://github.com/q-viper/SmokeSim/](https://github.com/q-viper/SmokeSim/)
Demo: https://q-viper.github.io/SmokeSim/ (This demo is from only the JavaScript Version.)

## What My Project Does

It simulates a reproducible smoke image using PyGame. The property of the smoke and its particles can be controlled by the properties like size, velocity, lifetime, color, etc. In addition to that, this package can act as an image augmentation and can return the overlayed smoke mask, overlayed image, and smoke too.

## Target Audience

The main target audience would be anyone who is working on Computer Vision projects or image augmentation and looking for a cool way to increase training images. However, anyone who is interested in building something fun with Python and collaboration might find it interesting.

## Comparison

There are packages like Torchvision and Albumentations and this feature

/r/Python
https://redd.it/1h9t8r7
Python Quiz for Beginners and Experts

Curated a 40 questions quiz on Python coding. Test your knowledge with this quiz. Would love to know your score and feedback!!

I will keep updatig this quiz to make it more comprehensive.

Try this Python quiz here.

/r/Python
https://redd.it/1h9fg6x
How can I host my dynamic Django website, which includes an ML implementation like a BERT model, for completely free?

Hey, I want to host my dynamic Django website, which includes ML implementations like a BERT model, an NSFW detector, and CNN, for free because I don’t have any money. I’m just a student, or you could say someone learning ML and DL from the internet. I’m not someone who’s completely mastered coding yet, so I haven’t landed a job—I’m still learning the code and math behind it all. I also come from a non-tech background.

With what I’ve learned so far, I want to expand my knowledge by implementing it in a website. However, I can’t afford to pay for hosting. I know some platforms, like AWS Free Tier, offer free services for 12 months, but what happens after that? From where would I pay? Also, I’m not expecting the website to become popular overnight—it might take more than a year to gain traction.

Can anyone suggest completely free hosting solutions for projects like this? Any advice or guidance would mean a lot!

/r/django
https://redd.it/1ha0h34
Convert Figma design into Python code

🔗 Link — https://github.com/axorax/tkforge

# What My Project Does

TkForge is a Python app that allows you to turn your Figma design into Python tkinter code. So, you can make a GUI design in Figma and use specific names like "textbox", "circle", "image" and more for interactable elements then use TkForge to get the code for a fully functional working GUI app from your design.

And it's free, open-source and regularly maintained!

# Target Audience

TkForge is made for anyone who wants to make a GUI with Python easily and efficiently. It's fast and you can make some really complex and beautiful GUI's with it.

# Comparison

There's another project similar to TkForge called Tkinter Designer. Personally without being biased, I think TkForge is better. TkForge supports everything Tkinter Designer does and more. TkForge generates better code, supports more elements, allows you to add placeholder text (which you can't by default in tkinter), automatically sets foreground color and a lot more! Placeholder text and foreground color generation is a bit buggy though. I use TkForge for most of my tkinter projects. You can get help in the Discord server.

# Updates

I updated the app to support multiple frames, fixed a lot of previous bugs and added checks

/r/Python
https://redd.it/1ha47wt
Question about best practices with ForeignKeys

I'm relatively new to django and i'm working on a project where I'm currently designing the model relationships, and I'm curious about the best practices for handling multiple foreign key references to the same model.

Here's my specific scenario:

I have an Assignment model
I want to track which users are assigned to this assignment (using a many-to-many field)
I'm also creating individual Job models for each assignee
Each Job will have a foreign key to a specific user

My questions for the community:

1. Is it considered an anti-pattern to have both a many-to-many relationship at the Assignment level and individual foreign key references in the Job model?
2. What are the performance implications of this approach?
3. Are there better ways to model this kind of workflow?

/r/django
https://redd.it/1ha50ay
Introducing PyKick: A Python Project Generator for PowerShell

**Hello everyone,**

Even with the intention of sharing, it's always a bit stressful to expose personal work to the community =}

But well... Maybe someone has the same question or need as I did, so with that in mind, I'm sharing my modest work done during my free time in the evenings (when the whole family is asleep =D) As you can see, besides the templates, there isn't anything particularly special – PyKick does what it needs to do and voilà – unit tests were the most time-consuming, as always (the PowerShell module was quick to write).

# What My Project Does

PyKick is an installable PowerShell module (or can be sourced otherwise) that quickly generates a new Python project with Git management, a virtual environment, and Sphinx documentation (if requested). In my Python projects, I need CLI exposure. Therefore, the generated Python project is immediately functional (a `pip install .` results in a CLI providing package information and version - the structure is here, just to complete)

PyKick doesn't aim to replace anything. Not finding something that met my needs, I ended up writing it without realizing it =}

# Target Audience

I think it's quite clear =þ

* If you are a developer or need a

/r/Python
https://redd.it/1ha65l9
Create a complete WORD SEARCH BOOK with a single click.

# [BOOP (Book Of Organized Puzzles)](https://github.com/Muneer320/BOOP)

# Denoscription

BOOP is a Python-based automation project that generates a fully personalized puzzle book. With just a list of words as input, it creates a complete PDF with noscript pages, index pages, word search puzzles, and solutions.

Why did I make this? Honestly:

1. I was bored and needed something fun to work on.
2. I already had a noscript that could make word search puzzles, so I thought, "Why not take it up a notch?"
3. I’ve always wanted to write a book but lack the intellectual supremacy to do so. This project seemed like the next best thing!

# Links

* [Sample PDF Output](https://drive.google.com/file/d/1KkbCUuIuO8hmeHavUyO8e90r4qIQCxPc)
* [GitHub Repository](https://github.com/Muneer320/BOOP)

# What My Project Does

* **Word Search Puzzles**: Generates 17 puzzles per topic, categorized into Normal, Hard, and Bonus modes.
* Normal: 10 puzzles (13x13 grid).
* Hard: 5 puzzles (17x17 grid).
* Bonus: 2 challenging puzzles.
* **Fully Designed Book**: Includes noscript pages, a detailed index, puzzle pages, and solution pages.
* **Automation**: Users only need to input a list of 200 words per topic; the noscript handles everything else.

# Target Audience

* Puzzle enthusiasts looking for custom-made puzzle books.
* Educators creating engaging learning materials.
* Developers interested in Python-based automation

/r/Python
https://redd.it/1ha82ex
Udemy Fred's Python 3 course vs. GT Computing in Python course

I am an average Python programmer (I can do some OOP and simple noscripts, but nothing really advanced) and wanted to improve my skills. I have narrowed down my Python resources to two courses, both in four parts:

1. Fred Baptiste Udemy course on Python 3 (in four parts)

2. Georgia Tech Computing in Python course (in four parts, too)

My employer should be able to reimburse both, so money is not an issue here - the question is which one would you suggest to choose to actually improve my Python skills and practice coding along the way? Meaning learning, but also implementing new concepts (so that they stick)? I assume the Georgia Tech is a nicer certificate to have (which is a plus for sure), but curious about actual content. Thanks so much!

/r/Python
https://redd.it/1ha7o5n
D Has anyone managed to train an LLM with model parallelism?

Hello,

I am working on fine-tuning Llama-3.1 for my master’s thesis research. Unfortunately, my current situation forbids access to high-memory GPUs such as A100s. Instead, I have access to setups with multiple lower-memory GPUs, such as 4×3090 or 8×V100.

Therefore I need to implement model parallelism to train my model as it doesn’t fit into a single GPU. However, I’ve noticed that most frameworks primarily focus on data parallelism, which doesn’t address my needs.

Has anyone successfully trained a model by splitting it across multiple GPUs? If so, could you recommend frameworks or approaches I should explore? I am specifically looking for full training, although I am interested in hearing if someone managed this using LoRA.

Also, if there’s a more suitable subreddit for this type of question, please direct me to there.

Thank you!

/r/MachineLearning
https://redd.it/1habr8l
Best way to serve media files via flask?

Hello,

Working on a flask project currently which will serve a lot of media files. Photos aren't really an issue just videos, im not streaming them since the hadware isn't great enough to do so.

What would be the best way to serve them with low hardware? Use object storage? Or even use flask?

/r/flask
https://redd.it/1hae62n
Flask socketio production server

I have a flask application that is only accessed by me. It is hosted on a google cloud linux VM and I have a firewall set up to only allow my IP.

I've been using socketio.run(app) for now, but get the warning that this is a development server. I tried following tutorials for gunicorn and nginx but encountered problems with socketio and selenium chromedriver (there is so scraping that periodically runs in my app).

Since I don't have problems using the development server and I'm the only person accessing the web app, is there any problem with me leaving my app running like this? I've spent a whole day trying to get a production server up following various tutorials but always seem to have problems.

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