Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels
Google OAuth, Grok Api, Cloudinary not working properly.
Basically, i have two same django projects with same files. One project is deployed in Render and other is deployed in Railway. The Google OAuth, Grok Api, Cloudinary( for handling media files) are working in Render deployed project but not in Railway deployed project. What could be the issues? I have included all the libraries and changed some of the settings, links but even then it is not working. Can anyone help me out!
/r/djangolearning
https://redd.it/1h24ukq
People who have styled/modified the admin page, how did that go?
In terms of difficulty, how bad was it? especially if you had to style it. and was it worth it?
/r/django
https://redd.it/1h2ybk4
Web Scraping Social Media Profiles X, Instagram, Tiktok, Youtube
Hi everyone!
I’ve created a script for scraping public social media accounts for work purposes. I’ve wrapped it up, formatted it, and created a repository for anyone who wants to use it.
# What My Project Does
The main focus of this project is to scrape data from profiles and their posts. For example:
- In my job, I’ve automated it to run daily for our social media profiles, storing the data for later analysis.
- A firend of mine wanted to download all the thumbnails of a youtube channel.
# How it works
The script uses Playwright to intercept requests and clean up the data. It also includes a second part that converts images to Base64 encoding, which is useful when image URLs expire or cannot be displayed directly in an HTML img tag
. For YouTube, it uses the API v3, as it's straightforward to obtain an API key.
I believe the script is easy to use, and you can quickly adapt it to suit your needs. Be sure to check out the README for more details!
# Target Audience
This tool is for anyone who needs to scrape social media data. The code is simple enough to copy, modify, and integrate into your project.
# Comparison
I haven’t extensively
/r/Python
https://redd.it/1h2o2n5
MVP deployed
It doesn't function yet, it's not mobile ready, It doesn't use a database yet, I don't fully understand what I just did... but I'm learning day by day and finally got my django work visible somewhere besides my local.
The app is meant to help people track their poor spending habits. Eventually, a user will be able to add items they want, or need to buy, to the post-it note. Then each day they enter amounts spent on things like fast food or alcohol (anything they want to spend less money on) in the day boxes, and when the total surpasses one of the goal items the user will get a notification stating "You could've bought item 1" etc.
*NOTE: WAY BETTER ON PC (can't grab the note on mobile yet)
[Budge it!](http://laziestj.pythonanywhere.com)
For context, I'm a QA Engineer by day (haven't landed that dev job yet) and recently graduated with a software development degree that focused on java. I've built a stand-alone java app, an android app, and a portfolio website, but I wanted to try something new and django was suggested to me by a hiring manager.
My next steps are
- turning the days into individual objects for data entry and
/r/djangolearning
https://redd.it/1h25vnl
Best library for Magic Links
I've seen there are several libraries for this (django-magiclink, django-magic-link, django-sesame, django-magicauth...)
Which one do you recommend? Or which things I should take into account when choosing?
I'm a Django beginner and I'm pretty lost here.
I want to receive payments using Stripe (Stripe Checkout probably) and send a magic link to the buyers so they can access a protected URL in my Django app. I will have several products (several protected URLs).
I don't need super advanced security or complex features. Just something simple (for me and my users).
Thanks!
/r/django
https://redd.it/1h2n22v
Django templates vs React
Hi everyone, why would I use React over Django’s templating system if I have below 500k users for anything? I feel like using React is pretty overkill for most web applications even if it needs to be dynamic, unless it’s a really custom app that needs to be highly dynamic. I feel that if I really wanted some front end reactivity, I could use libraries like AlpineJS and snabbdom, and that should be enough?
FYI, I can be a big noob. Looking for what people experience and a difference in opinions and perspectives. I ask this question more to find out what others think because I feel like web development can quickly become overkill and overly complex for no reason. So I’m a proponent for keeping things simple. Please share your thoughts/experience! Would kindly appreciate it.
/r/django
https://redd.it/1h2fl3y
What are the best cache backends available in Django?
Hey Django devs! I'm looking to optimize my web application's performance and want to dive deep into caching. What cache backends have you found most effective?
/r/django
https://redd.it/1h2dt34
Creating an intranet
So I've created a flask app and I've hosted it through python anywhere. I want to learn how to create and intranet. Any resource or guidance on how I can make a web app that can only be accessed on a specific network? I know this may not be a flask specific question but that my background.
/r/flask
https://redd.it/1h21rrq
django-fastdev 1.13 released
Django-fastdev is a collection of improvement to Django. The focus is on better error handling/messages.
New since last time I posted:
- Improved TemplateNotFound errors
- Adds a new monkey patch for Model.__repr__
to fix infinite recursion in error messages for DoesNotExist
and MultipleObjectsReturned
(the first is a fastdev bug and the second is a Django bug)
- Reintroduced invalid block check with fixes
https://github.com/boxed/django-fastdev/
/r/django
https://redd.it/1h1yjsi
Creating an AI-powered Image Generation API Service with FLUX, Python, and Diffusers
https://herahaven.ai/blog/creating-an-ai-powered-image-generation-api-service-with-flux-python-and-diffusers/
/r/Python
https://redd.it/1h1tx73
I'm using Google Cloud AppEngine to run a flask python app. Is working just fine. Is there any advantage if I create a docker container for this?
Since Google AppEngine is already a container and I will need to install OS dependencies like Microsoft Visual C++ 14.0 for python-Levenshtein-wheels on Windows (if I want to develop in windows). I don't see any advantage on "dockerize" my project. Am'I missing something?
Edit: Just to clarify "When installing the "python-Levenshtein-wheel" package in Python, you might need to install C++ build tools because the package often includes a compiled C++ component that needs to be built during installation, and your system needs the necessary compilers and build tools to compile this component from source code." Extra build is neccesary while enabling this dependency so is harder to create a truly portable docker image. You will need some different OS dependencies in linux to enable this dependency.
/r/flask
https://redd.it/1h1ecgu
What are you all-time favorite Python talks?
I recently discovered https://pyvideo.org/ with its 19 163 talks from Python conferences.
Do you have any favorite talks or speakers you can recommend?
/r/Python
https://redd.it/1h1qun7
PixelPurge: Game Cleanup Tool
Hey everyone 👋
I’m excited to introduce you to PixelPurge, my latest side project!
# What PixelPurge Does
PixelPurge is a lightweight Python tool designed to help gamers clean up after trying new games. It’s perfect for anyone who loves testing games but hates the leftover files. It tracks new files and folders created while you play and lets you delete them effortlessly.
You can find images and details in the project repository.
# Target Audience
If you’re a gamer who frequently downloads and uninstalls new titles, you’ll love PixelPurge. It’s also great for anyone who wants to reclaim storage space by ensuring no leftover game files clutter your system. While it’s aimed at Windows users, macOS users can use it too.
# Comparison
You might be thinking, “Why not just manually delete leftover files?” Sure, you can, but PixelPurge takes the guesswork out of the process by:
• Automatically tracking changes in monitored directories while games are running.
• Providing an easy GUI for reviewing and selecting files to delete.
• Supporting recursive folder monitoring so nothing is missed.
# Links
• Repository: https://github.com/izaan17/PixelPurge
If you’re curious or have feedback, I’d love for you to check it out. Feel free to contribute, suggest features, or just share your thoughts—this project is all about
/r/Python
https://redd.it/1h1plj9
opennb: Open Jupyter notebooks from GitHub with dependencies, instantly (with uv)!
What My Project Does:
opennb is a tiny CLI tool that lets you open Jupyter notebooks directly from GitHub (or any URL) while automatically handling dependencies in an ephemeral environment. For example:
uvx --with "pipefunc[docs]" opennb pipefunc/pipefunc/example.ipynb
My side project has gotten 420k downloads and 69 GitHub stars (noice!)
Hey Redditors! 👋
I couldn't think of a better place to share this achievement other than here with you lot. Sometimes the universe just comes together in such a way that makes you wonder if the simulation is winking back at you...
But now that I've grabbed your attention, allow me tell you a bit about my project.
# What My Project Does
ridgeplot is a Python package that provides a simple interface for plotting beautiful and interactive ridgeline plots within the extensive Plotly ecosystem.
Unfortunately, I can't share any screenshots here, but feel free to take a look at our **getting started guide** for some examples of what you can do with it.
# Target Audience
Anyone that needs to plot a ridgeline graph can use this library. That said, I expect it to be mainly used by people in the data science, data analytics, machine learning, and adjacent spaces.
# Comparison
If all you need is a simple ridgeline plot with Plotly without any bells and whistles, take a look at this example in their official docs. However, if you need more control over how the plot looks like, like plotting multiple traces per row, using different coloring options, or mixing KDEs and histograms, then I think
/r/Python
https://redd.it/1h1ccfu
Short-Circuiting in Python
Here is my article on Short-Circuiting in Python . It discusses what is short-circuiting with examples, and also discusses the different advantages of using short-circuiting.
/r/Python
https://redd.it/1h30nsp
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1h2zjp4
YTSage: A Modern YouTube Downloader with a Stunning PyQt6 Interface!
What My Project Does:
YTSage is a modern YouTube downloader designed for simplicity and functionality. With a sleek PyQt6 interface, it allows users to:
- 🎥 Download videos in various qualities with automatic audio merging.
- 🎵 Extract audio in multiple formats.
- 📝 Fetch both manual and auto-generated subtitles.
- ℹ️ View detailed video metadata (e.g., views, upload date, duration).
- 🖼️ Preview video thumbnails before downloading.
---
Target Audience:
YTSage is ideal for:
- Casual users who want an easy-to-use video and audio downloader.
- Developers looking for a robust yt-dlp-based tool with a clean GUI.
- Educators and content creators who need subtitles or metadata for their projects.
---
Comparison with Existing Alternatives:
- vs yt-dlp: While yt-dlp is powerful, it operates through the command line. YTSage simplifies the process with an intuitive graphical interface.
- vs other GUI downloaders: Many alternatives lack modern design or features like subtitle support and metadata display. YTSage bridges this gap with its PyQt6-powered interface and advanced functionality.
---
Getting Started:
Download the pre-built executable from the Releases page – no installation required! For developers, source code and
/r/Python
https://redd.it/1h2ta56
What are some really awesome projects/channels you have encountered so far in YouTube?
What are some really awesome projects/channels you have encountered so far in YouTube? Looking for some ideas to work on for a long time now.
Doing same automation and using same libraries, I am feeling kinda bored now. Need some fresh ideas.
/r/Python
https://redd.it/1h2quqa
Web scraping linkedin , indeed like platforms
I am working on my project which fetches job applications from platforms like linkedin , indeed , etc.. and showing the output on my platform.
I just wanted to know is their any api or package which already fetches such stuff ? or i gotta build it myself ?
What are the challenges i will face while building this ?
/r/Python
https://redd.it/1h2huo4
Flask Assets does not detect changes to less files on save but rebuilds with changes.
Hi, my workflow would be such that flask-assets would detect any changes in my less files and automatically restart the flask server and rebuild the assets. Relatively easy frontend development.
I loaded up an older project and reinstalled dependencies to current versions and noticed this funtionaliy changing. While the static files do update on a restart of the development server, the server does not detect changes to less file. Any suggestions on what would be causing this? Running flask 3.1 and flask assets 2.1
/r/flask
https://redd.it/1h1bptd
Conda kernel not found in Visual Studio Code
I'm trying to get back into machine learning. I tried six months ago, but my operating system crashed and I had to reinstall it completely, which was a bit of a shame!
The software might have had some updates since then, which is probably why I'm having trouble. I'm trying to select a kernel with Visual Studio Code, but I'm unsure if I'm doing it right. I followed the method given by VSCode, but I'm still stuck on kernel selection.
I'm happy to say that installing the extensions and creating the Conda environment went well! However, when I select the kernel, I get this message:
https://preview.redd.it/9vvywmhqon3e1.png?width=370&format=png&auto=webp&s=c7c3d0348462346cfd95dc4f4a31f7a10ce7922f
I thought I'd share the list of extensions I've installed in case it helps:
https://preview.redd.it/j2pcqllron3e1.png?width=280&format=png&auto=webp&s=979a3235f150e8bd2fccfd61c3bfca3ebba03dec
I've done a lot of research online, but sadly none of the solutions I found worked.
/r/IPython
https://redd.it/1h2fruc
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1h293f6
D Why aren't Stella embeddings more widely used despite topping the MTEB leaderboard?
https://huggingface.co/spaces/mteb/leaderboard
I've been looking at embedding models and noticed something interesting: Stella embeddings are crushing it on the MTEB leaderboard, outperforming OpenAI's models while being way smaller (1.5B/400M params) and apache 2.0. Makes hosting them relatively cheap.
For reference, Stella-400M scores 70.11 on MTEB vs OpenAI's text-embedding-3-large 64.59. The 1.5B version scores even higher at 71.19
Yet I rarely see them mentioned in production use cases or discussions. Has anyone here used Stella embeddings in production? What's been your experience with performance, inference speed, and reliability compared to OpenAI's offerings?
Just trying to understand if there's something I'm missing about why they haven't seen wider adoption despite the impressive benchmarks.
Would love to hear your thoughts and experiences!
/r/MachineLearning
https://redd.it/1h1u814
D Theory behind modern diffusion models
Hi everyone,
I recently attended some lectures at university regarding diffusion models. Those explained all the math behind the original DDPM (Denoiding Diffusion Probabilistic Model) in great detail (especially in the appendices), actually better than anything else I have found online. So it has been great for learning the basics behind diffusion models (slides are available in the link in the readme here if you are interesed: https://github.com/julioasotodv/ie-C4-466671-diffusion-models)
However, I am struggling to find resources with similar level of detail for modern approaches—such as flow matching/rectified flows, how the different ODE solvers for sampling work, etc. There are some, but everything that I have found is either quite outdated (like from 2023 or so) or very superficial—like for non-technical or scientific audiences.
Therefore, I am wondering: has anyone encountered a good compendium of theoretical eplanations beyond the basic diffusion model (besides the original papers)? The goal is to let my team deep dive into the actual papers should they desire, but giving 70% of what those deliver in one or more decent compilations.
I really believe that SEO is making any search a living nightmare nowadays. Either that or my googling skills are tanking for some reason.
Thank you all!
/r/MachineLearning
https://redd.it/1h1vxe1
Looking remote gig
Any Suggestions on remote gigs ?
/r/django
https://redd.it/1h1uv9x
Django Protego - A Flexible and Dynamic Circuit Breaker
Hi folks,
I'm excited to share a project I've been working on: Django Protego, a dynamic and configurable Circuit Breaker for Django applications.
What is Django Protego?
Django Protego is a library that helps to protect your services from cascading failures by providing a Circuit Breaker mechanism. It's simple to integrate, dynamic, and works seamlessly with Django-based applications.
Key Features:
Dynamic Configuration: Configure failure thresholds, reset timeouts, and half-open retries at runtime.
Global Registry: The circuit breaker state is shared across views via a global registry, ensuring centralized control of your application’s fault tolerance.
Easy to Use: Just decorate your views with @/protego.protect to wrap your views in the circuit breaker logic.
Flexible: Supports multiple circuit breakers in the same project, all configurable independently.
In-Memory: Implements a highly efficient in-memory circuit breaker with no external dependencies.
How It Works:
Protego Client: For each service, the circuit breaker maintains its state (open, closed, half-open) and tracks failures.
Thresholds and Timeout: You can dynamically adjust failure thresholds, reset timeouts, and half-open retries via a central configuration in your Django app.
Global Access: Protego ensures that circuit breakers are initialized once and are accessible globally in your project.
/r/django
https://redd.it/1h18ua0
Python and GoHigh Level Integration
I am looking to have python read a list of names from GoHigh Level CRM and this list contains names that clicked in a link I sent them through email. Then I want python to compare that list to anotherr list that I will be feeding into a folder on my computer on a daily basis and this list contains the names of people from the first list but at this point this new list will say witch of those people actually are confirmed to have signed up. Python will compare these two lists and feed the list of those confirmed people back to the CRM so they can continue on my pipeline. Can this be done?
/r/Python
https://redd.it/1h1pq0x
Causal Discovery Competition Winning Paper Discussion D
I’ve recently come across this post: https://thetourney.github.io/adia-report/ which describes the winning method for a casual discovery competition. It’s not really my field but I do have a reasonable understanding of GNNs and Causal Inference. Anyway, from the report I don’t understand precisely what the winning team was doing. Can anyone either link to a full paper or have a good intuitive and potentially step by step explanation of what they are doing?
/r/MachineLearning
https://redd.it/1h1i0ji
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/1h1isdo