Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels
Requirements to host e commerce
I made e commerce website for my client but in deployment, I want to know how much compute resources (like cpu,ram) need for starters e commerce
/r/djangolearning
https://redd.it/1jyvp0t
How to scrape specific data from MRFs?links in JSON format?
Hi all,
I have a couple machine readable files in JSON format I need to scrape data pertaining to specific codes.
For example, If codes 00000, 11111 etc exists in the MRF, I'd like to pull all data relating to those codes.
Any tips, videos would be appreciated.
/r/Python
https://redd.it/1jyp5mv
A new powerful tool for video creation
In search of a solution to mass produce programmatically created videos from python, I found no real solutions which truly satisfied my thirst for quick performance. So, I decided to take matters into my own hands and create this powerful library for video production: fmov.
I used this library to create a automated chess video creation Youtube channel, these 5-8 minute videos take just about 45 seconds to render each! See it here
# What My Project Does
fmov is a Python library designed to make programmatic video creation simple and efficient. By leveraging the speed of FFmpeg and PIL, it allows you to generate high-quality videos with minimal effort. Whether you’re animating images, rendering visualizations, or automating video editing, fmov provides a straightforward solution with excellent performance.
You can install it with:
pip install fmov
The only external dependency you need to install separately is FFmpeg. Once that’s set up, you can start using the library right away.
# Target Audience
This library is useful for:
Developers who need a fast and flexible way to generate videos programmatically.
Data scientists looking to create animations from data visualizations.
Artists experimenting with generative video content.
Anyone working with video automation or rendering dynamic frames.
If you’ve found other methods too slow or complex,
/r/Python
https://redd.it/1jyphgr
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/1jyloc8
Django newbie struggling -- running out of coffee
Hi everyone!
I'm a web developer student, pretty new to Django. I started using it after I was invited to collaborate on a social impact project.
Lately, I’ve been trying to deploy my web app, but I’m running into some issues with environment configuration. I wanted to split my settings into base
, local
, and production
files (following the HackSoftware Django-Styleguide), but I can’t seem to make it work.
I’m not sure if I need to tweak my `wsgi.py` and `manage.py` to properly point to the production settings. Also, do I need two separate .env
files — one for development and one for production?
This might be something simple, but since I just got started with Django, I’m really struggling. Any help would be super appreciated!
Much love and thanks in advance! 🧡🧡🧡
/r/djangolearning
https://redd.it/1junbia
American brands website - Testing and Review
Hello,
I have just finished building my website which helps you look at American brands and then see who owns them(as well as shell companies). Then if you log in you can create your own lists of people you are trying to avoid and send them to you friends. I would really appreciate any feedback you guys have on it.
Link - https://american-brand.org/
/r/flask
https://redd.it/1jy4kg8
Django for APIs, 5th Edition: Build Web APIs with Python and Django by William S. Vincent - anyone can share it please?
anyone can share it please?
/r/djangolearning
https://redd.it/1jvagqr
Text extraction from PDF, Images, Office Documents and more
Kreuzberg provides an interface for extracting text from PDF,Images, Office Documents and more. This is done with async and sync API.
https://github.com/Goldziher/kreuzberg
/r/Python
https://redd.it/1jxqyzv
Every Python Built-in Method Explained
Hi there, I just wanted to know more about Python and I had this crazy idea about knowing every built-in feature... let's start by methods. Hope you learn sth new. Take it as an informative video with that purpose.
Here's the explanation
/r/Python
https://redd.it/1jy6iqc
My python doesn't work
/r/flask
https://redd.it/1jxuibf
Is this a thing with any framework or library that exposes .env or .env.example?
/r/djangolearning
https://redd.it/1jxxndp
Jupyter Notebook v7.3.2 on Mac (Safari): Keyboard shortcuts not working after reinstall — can’t customize either
Hi all,
I’m using **Jupyter Notebook version 7.3.2 via Anaconda Navigator** on **macOS**, and I access it through **Safari**. I used this setup in the past with no issues — all keyboard shortcuts worked fine, and there were no conflicts with Safari.
Recently, I reinstalled Anaconda (fresh download), and now **none of my old shortcuts work**, and I **can’t customize them either**. When I go to:
>**Settings Editor → Keyboard Shortcuts**
and try to change a shortcut, **nothing happens** — the interface doesn’t respond at all.
I’ve checked:
* Safari permissions/settings — nothing blocking scripts or interaction
* That I’m definitely using Jupyter Notebook and not JupyterLab (Notebook 7.3.2 seems to have a more Lab-like interface)
* Whether it’s a browser conflict — same issue happens in Chrome
Has anyone else experienced this with Notebook 7.x? I have a major assignment due and this is slowing me down.
Any help or workarounds would be hugely appreciated!
/r/IPython
https://redd.it/1jxqdma
Arch. The AI-native proxy server that handles the low-level application logic for agents
# What My Project Does
Arch is an intelligent (edge and LLM) proxy server designed for prompts and agents - and built by the contributors of the widely adopted and loved Envoy. Arch helps you move faster by handling the pesky heavy lifting (aka low-level logic) in building agents: agent routing, fast input clarification, seamless integration of prompts with your tools for common tasks, unified access and observability of LLMs - all outside business logic so that you can focus on the high-level business logic of your agents.
Check out the project here: https://github.com/katanemo/archgw Ask me anything.
# Target Audience
Meant to help developers stay focused on the higher level objectives of their agents (role, instructions, tools) so that they can move faster in building more than a shiny AI demo that runs on their laptop. Arch offers the following capabilities to help people build fast, accurate and task-specific agents that they can observe, protect and itera
Core Features:
`🚦 Routing`. Engineered with purpose-built [LLMs](https://huggingface.co/collections/katanemo/arch-function-66f209a693ea8df14317ad68) for fast (<100ms) agent routing and hand-off scenarios
⚡ Tools Use
: For common agentic scenarios let Arch instantly clarfiy and convert prompts to tools/API calls
`⛨ Guardrails`: Centrally configure and prevent harmful outcomes and ensure safe user interactions
/r/Python
https://redd.it/1jxnk99
Django and React jsx Boilerplate
Hi guys, i have just build biolerplate for django and react jsx . The product has login, signup, forgot password and Not found page , feel free to download the code from github . This is good for people who keep building new products and they dont want to struggle coding the bording features over and over .
Please if you have any issues let me know
code
/r/django
https://redd.it/1jxfopp
Does is actually matter that Python is a simple language?
I started learning software development in my early thirties, but as soon as I started I knew that I should have been doing this my whole life. After some research, Python seemed like a good place to start. I fell in love with it and I’ve been using it ever since for personal projects.
One thing I don’t get is the notion that some people have that Python is simple, to the point that I’ve heard people even say that it “isn’t real programming”. Listen, I’m not exactly over here worrying about what other people are thinking when I’m busy with my own stuff, but I have always taken an interest in psychology and I’m curious about this.
Isn’t the goal of a lot of programming to be able to accomplish complex things more easily? If what I’m making has no requirement for being extremely fast, why should I choose to use C++ just because it’s “real programming”? Isn’t that sort of self defeating? A hatchet isn’t a REAL axe, but sometimes you only need a hatchet, and a real axe is overkill.
Shouldn’t we welcome something that allows us to more quickly get our ideas out into the screen? It isn’t like
/r/Python
https://redd.it/1jxjrky
API working Visual Representation
https://redd.it/1jyuxqj
@pythondaily
Maps with Django⁽³⁾: GeoDjango, Pillow & GPS
https://www.paulox.net/2025/04/11/maps-with-django-part-3-geodjango-pillow-and-gps/
/r/Python
https://redd.it/1jys085
Flask/Keycloak
I am learning flask and have a TINY bit more knowledge of keycloak. My work uses keycloak to get tokens via a client frequently and sends them to various .Net containers running code as well as via gravitee API gateway so while not an expert, it's something I have done a few times and was trying to do something similar in flask.
What is happening is that when I add
@jwtrequired()
flask\jwt_extended does not seem to like the signature. Have tried various fixes by setting a number of:
app.config
using the clientid, the keycloak keys, etc and nothing I do so far has seemed to work. I end up with flask saying Invalid Signature. I also noticed that HS256 was not installed on my keycloak server by default so I fixed that but still no luck(original error was sliglhy different but changed when I added HS256 to my KC server)
NOTE: the flask app ONLY needs to validate the token, it will NEVER request login from an active user since this is a REST API end point(again this matches how a
/r/flask
https://redd.it/1jx610o
My First Github Project using Flask.
Hello everyone. I created a Flask web application that the user provides an image and gets the visual representation of it in text. I also uploaded my project on github and I would like a lot of feedback in every aspect of the project(github, code logic, correct application of the technologies that are being used). Thank you in advance.
https://github.com/HarrisMarinos/image-to-text-converter
/r/flask
https://redd.it/1jx2ngq
Should I keep learning DRF or learn something like ninja as-well?
I have seen many people mention frameworks like ninja and shinobi. I'm still a beginner so I suppose I should keep learning in DRF until i get comfortable and then expand my skillset? Or should I try everything to see what suits me?
/r/django
https://redd.it/1jyhbew
I have almost no knowledge in Python or AI stuff, will starting with something AI related be vice?
i know like C, Cpp, little javascript, but also want to improve in Python, i have used it a little in past but only small hooby projects.
/r/Python
https://redd.it/1jy4bg3
[R] LLMs are bad at writing performant code
/r/MachineLearning
https://redd.it/1jya9sx
Production site is getting 60k DisallowedHost errors per month.
Hello, my business has a django app at example.com with \~150 active users. We're also building a web app for a client and have put it up for live testing on abc.example.com for now.
This app has only \~10 active users right now but ever since it went up we've been getting tens of thousands of `DisallowedHost Level: Error Invalid HTTP_HOST header: 'xx.xx.xx.xx'. You may need to add 'xx.xx.xx.xx' to ALLOWED_HOSTS.` There's thousands of different IPs from different countries, browsers, user agents e.t.c. trying to get routes like /wp-admin /.env.production /laravel/.env and so on. Clearly someone is prodding to get in and it's eating up our sentry quota.
Why is our subdomain getting hit so hard when our main domain, which we are actively advertising, is getting almost none?
What can I do to stop it?
/r/django
https://redd.it/1jy7zi3
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/1jxuxur
TemplateNotFound problem and i can't fix it(going mad)
i get this even tho i have everything right
https://preview.redd.it/a4ln0wevwfue1.png?width=958&format=png&auto=webp&s=11c8df48f081fc075ddb38f6412ac1badf6d4466
https://preview.redd.it/td1tvd4ywfue1.png?width=900&format=png&auto=webp&s=b039dc310cebca9c0a9599540e1ccc3e6742ed5a
It dosen't make sense to me bcs i dowloaded everything and verifyed the codes 20 times each.....I need help please!!!
/r/flask
https://redd.it/1jxmsl0
Jupyter Notebook v7.3.2 on Mac (Safari): Keyboard shortcuts not working after reinstall — can’t customize either
Hi all,
I’m using **Jupyter Notebook version 7.3.2 via Anaconda Navigator** on **macOS**, and I access it through **Safari**. I used this setup in the past with no issues — all keyboard shortcuts worked fine, and there were no conflicts with Safari.
Recently, I reinstalled Anaconda (fresh download), and now **none of my old shortcuts work**, and I **can’t customize them either**. When I go to:
>**Settings Editor → Keyboard Shortcuts**
and try to change a shortcut, **nothing happens** — the interface doesn’t respond at all.
I’ve checked:
* Safari permissions/settings — nothing blocking scripts or interaction
* That I’m definitely using Jupyter Notebook and not JupyterLab (Notebook 7.3.2 seems to have a more Lab-like interface)
* Whether it’s a browser conflict — same issue happens in Chrome
Has anyone else experienced this with Notebook 7.x? I have a major assignment due and this is slowing me down.
Any help or workarounds would be hugely appreciated!
/r/IPython
https://redd.it/1jxqd8m
CSRF Token Error
Hey I get this CSRF Token Error on my webserver.
i dont get where this is coming from because they are the same token before and after.
I checked my steinngs and my conf and cant find the error.
https://preview.redd.it/ar4qu70h4ste1.png?width=1222&format=png&auto=webp&s=28e79c8dc2338487301ac0a1fd642096dbe7097d
https://preview.redd.it/nkco18wj4ste1.png?width=1210&format=png&auto=webp&s=0d2ba8ec728bac99aad92f52527fd353ba6cb815
#This is my settigs for nginx
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# Security headers
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
X_FRAME_OPTIONS = "DENY"
# HSTS settings
SECURE_HSTS_SECONDS = 31536000 # 1 year
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
/r/djangolearning
https://redd.it/1jv1s9a
Built a fully featured Minecraft server list using Django
I created a fully featured Minecraft server list (like those websites that started appearing around 2012) as a challenge.
It uses a good amount of the facilities offered by Django:
* Templates
* Authentication
* Customized admin panel
* Forms (both custom made and some built-in)
* Class (List, Detail, Form and ModelForm) and function based views
* Customized manage commands
* Customized template filter tag for rendering a string of markdown into html and getting file urls from an S3 compatible api
* A considerably complex search page with use of the ORM
Other features not exactly related to Django but still proud of:
* Static and user uploaded images stored on external S3 compatible api
* Anti-bot protection using Cloudflare Turnstile
* Responsive and pretty UI made entirely with Bootstrap
As of now I'm looking for feedback on the UI/UX, search functionality, and maybe suggestions of new features to implement as a challenge. The idea is to have a considerably interesting project I can at least have in my resume one day.
Thanks for reading!
[Website in Question](https://redstonelink.cc)
/r/djangolearning
https://redd.it/1jv9r89
minihtml - Yet another library to generate HTML from Python
# What My Project Does, Comparison
minihtml is a library to generate HTML from python, like htpy, dominate, and many others. Unlike a templating language like jinja, these libraries let you create HTML documents from Python code.
I really like the declarative style to build up documents, i.e. using elements as context managers (I first saw this approach in dominate), because it allows mixing elements with control flow statements in a way that feels natural and lets you see the structure of the resulting document more clearly, instead of the more functional style of of passing lists of elements around.
There are already many libraries in this space, minihtml
is my take on this, with some new API ideas I find useful (like setting ids an classes on elements by indexing). It also includes a component system, comes with type annotations, and HTML pretty printing by default, which I feel helps a lot with debugging.
The documentation is a bit terse at this point, but hopefully complete.
Let me know what you think.
# Target Audience
Web developers. I would consider minihtml
beta software at this point. I will probably not change the API any further, but there may be bugs.
# Example
from minihtml.tags
/r/Python
https://redd.it/1jxkkb8
Implemented python asyncio guest mode, made asyncas work with all UI frameworks like Win32, QT, TK
First, hope you like it and try it:)
Make asyncio work with all GUI frameworks, sample code be implemented in tornado, pygame, tkinter, gtk, qt5, win32, pyside6
[core\] https://github.com/congzhangzh/asyncio-guest
[sample\] https://github.com/congzhangzh/webview\_python, https://github.com/congzhangzh/webview\_python/blob/main/examples/async\_with\_asyncio\_guest\_run/bind\_in\_local\_async\_by\_asyncio\_guest\_win32\_wip.py
[more sample\] https://github.com/congzhangzh/webview\_python\_demo ([wip\] ignore readme)
# GUI support status:
|Framework|Windows|Linux|Mac|
|:-|:-|:-|:-|
|Tkinter|✅|✅|❓|
|Win32|✅|➖|➖|
|GTK|❓|✅|❓|
|QT|✅|✅|❓|
|PySide6|✅|✅|❓|
|Pygame|✅|✅|❓|
|Tornado|✅|✅|❓|
/r/Python
https://redd.it/1jxb8xj