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
Sunday Daily Thread: What's everyone working on this week?

# Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

## How it Works:

1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.

## Guidelines:

Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

## Example Shares:

1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟

/r/Python
https://redd.it/1hz9oaq
Building My First Ecommerce with Django

I wanted to share my journey building a custom ecommerce site for a client. While I have experience creating enterprise tools and APIs for inventory management and ecommerce integrations (like Shopify), this project was unique because the client specifically wanted a fully custom-built platform tailored to their needs. It’s my first time creating a complete ecommerce site with Django, and the learning experience has been incredible.

The project, [GetVases](https://www.getvases.com), is an online boutique for selling vases. It needed to be visually appealing, user-friendly, and reliable. Balancing these requirements while diving into features like payment integration and stock management was both exciting and challenging.

# Technical Challenges

1. **Integrating Payments with Stripe**: Secure payment processing was a priority for the client. I initially started with PayPal, but its confusing documentation and webhook handling led to weeks of frustration. Switching to Stripe was a game-changer:
* I used the `stripe` library to handle payment requests.
* Webhooks were set up to update order statuses in real time.
* I’m still refining security measures for these endpoints—any best practices you can share?
2. **Real-Time Stock Management**: The client required dynamic inventory updates as customers placed orders. I implemented this using Django

/r/django
https://redd.it/1hz7xgd
Django + htmx

Hello is there people making theirs own saas web apps with django + htmx if yes how is the experience is it as fast as going with a js framework like next js , nuxt js ..
i m struggling to choose to learn python + django or going for react + next js to build my own saas apps
Thnks for the feedback

/r/django
https://redd.it/1hzal6h
MongoDB with Django, WHY?

Has anybody here ever needed to use MongoDB with Django? I'm curious to know why there is such a demand for MongoDB in the Django community, considering that Django's ORM is deeply tied to a relational structure. Why the push for Mongo?

And by "demand," I mean enough people want this for me to notice.

The top recommendations I keep seeing are terrible.

1. Use **Pymongo** - This is bad because you loose a lot of Django features such as the built-in ORM, Auth, etc
2. **Djongo** - This is NOT a valid solution. Only works with Django 3.0.5 and does not really work. Also, it has not been maintained for several years.

/r/django
https://redd.it/1hz5iby
Train an LLM from Scratch

# What My Project Does

I created an end-to-end LLM training project, from downloading the training dataset to generating text with the trained model. It currently supports the PILE dataset, a diverse data for LLM training. You can limit the dataset size, customize the default transformer architecture and training configuration, and more.

This is what my 13 million parameter-trained LLM output looks like, trained on a Colab T4 GPU:

In ***1978, The park was returned to the factory-plate that the public share to the lower of the electronic fence that follow from the Station's cities. The Canal of ancient Western nations were confined to the city spot. The villages were directly linked to cities in China that revolt that the US budget and in Odambinais is uncertain and fortune established in rural areas.

# Target audience

This project is for students and researchers who want to learn how tiny LLMs work by building one themselves. It's good for people who want to change how the model is built or train it on regular GPUs.

# Comparison

Instead of just using existing AI tools, this project lets you see all the steps of making an LLM. You get more control over how it works.

/r/Python
https://redd.it/1hzg5fh
D Have transformers won in Computer Vision?

Hi,

Transformers have reigned supreme in Natural Language Processing applications, both written and spoken, since BERT and GPT-1 came out in 2018.

For Computer Vision, last I checked it was starting to gain momentum in 2020 with An Image is Worth 16x16 Words but the sentiment then was "Yeah transformers might be good for CV, for now I'll keep using my resnets"

Has this changed in 2025? Are Vision Transformers the preferred backbone for Computer Visions?

Put another way, if you were to start a new project from scratch to do image classification (medical diagnosis, etc), how would you approach it in terms of architecture and training objective?

I'm mainly an NLP guy so pardon my lack of exposure to CV problems in industry.

/r/MachineLearning
https://redd.it/1hzn0gg
How to Protect My Django Website Hosted on Lambda from Bots Without Wasting Requests?


Hi, everyone!

I’m hosting a Django website on AWS Lambda, and since Lambda charges based on the number of requests, I’m worried about bots abusing the site and driving up my costs.

I know tools like CAPTCHA can help filter bots, but since the request would already reach the Lambda function before the CAPTCHA is served, it doesn’t prevent the cost from those initial requests.

Are there strategies or tools that can block bots before they hit the Lambda endpoint? I’ve heard about WAFs (Web Application Firewalls), but I’m unsure about the best approach or whether there are other effective solutions for this type of setup.

Any advice would be greatly appreciate!


/r/django
https://redd.it/1hzmqka
How to prepare for aptitude?

I am just starting to prepare for aptitude tests, but I find it hard to solve the problems. I understand in videos that how to solve ,but i can’t figure out how to solve it. Many problems also seem the same, which confuses me. Can you suggest some easy-to-understand YouTube channels for learning aptitude and give tips to help me improve?

/r/django
https://redd.it/1hzpnzu
Python with type hints and Mypy: regret for not using statically typed lang?

If a company adopted Python and then, after several years, integrates MyPy, wouldn't they be better off if they'd start with a statically typed language instead of Python?
This sounds like an uphill battle to get to some half-baked type-safety, but I'm not versed in Python development, so asking the pros here (I realize this might not be the best place to ask this question, to say the least, but I'll give it a try)

/r/Python
https://redd.it/1hzk4vb
D Simple Questions Thread

Please post your questions here instead of creating a new thread. 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 title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/1hzprm8
FuzzyAI - Jailbreak your favorite LLM

My buddies and I have developed an open-source fuzzer that is fully extendable. It’s fully operational and supports over 10 different attack methods, including several that we created, across various providers, including all major models and local ones like Ollama. You can also use the framework to classify your output and determine if it is adversarial. This is often done to create benchmarks, train your model, or train a detector.

So far, we’ve been able to jailbreak every tested LLM successfully. We plan to maintain the project actively and would love to hear your feedback. We welcome contributions from the community!

/r/Python
https://redd.it/1hzpqxu
Built My First Document Scanning and OCR App – Would Love to Hear Your Thoughts!

Hi everyone! 👋

I recently finished ocr-tools ,a small project, and as someone still learning and exploring new skills, I wanted to share it with you all! It’s a simple web app where you can:

# What My Project Does

Upload an image (like a photo of a document).
Automatically detect the document's corners and apply perspective correction.
Extract text from the document with OCR and save it as a searchable PDF.

I built this using FastAPI, along with OpenCV for the image processing and Tesseract for the OCR. The process taught me so much about working with images, handling user inputs, and creating APIs. It’s designed to be straightforward and helpful for anyone who wants to scan documents or images quickly and cleanly.

Here are some of the main features:

Clean UI: Upload images easily and process them in a few clicks.
Perspective correction: Automatically detects and crops the document to give you a straightened view.
OCR output: Extracts text and saves it to a PDF.

# Target Audience

It is just a toy project to learn new skills

# Comparison

There are a lot of projects like this and better than this one

Thanks for reading, and I hope you find it as fun as I did

/r/Python
https://redd.it/1hzpohx
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 description 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

**Description**: 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

**Description**: 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

**Description**: Create a script 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/1i00vbq
I made a Blood Analysis Tool because I'm a True Crime junkie

I made this project with OpenCV and Streamlit. Let me know what you think?

https://youtu.be/SGF-PqMpctY

GitHub (please watch the video): https://github.com/saifaldin14/BloodSplatterAnalysis

What My Project Does: This is a small 2D Blood Analysis App inspired by the True Crime videos I like watching!

Target Audience: Programmers and YouTube enthusiasts who like seeing cool projects

Comparison: This is a simplified version of real-world forensic analysis tools. It uses a lot of the same computer vision techniques in other projects but its idea is far more unique. I think the techniques showed in this video are really useful for people trying to learn image analysis and computer vision.

/r/Python
https://redd.it/1hzqc40