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
Trouble with Staticfiles in Django

I am Django beginner learning Django with tutorials, i do understand the tutorial and i do make a note in a way that I understand and i do update my notes when I practice but i also made notes on how to setup staticfiles and add images in Django, but i am having trouble everytime I practice the images part every other part works fine except the images part, i do everything as mentioned in my notes but in the end it just fails (the image doesn’t load up) the last time it happened it was some syntax error and based on that I updated my notes and this time the same thing is happening again and i am not able to figure out at all as to why it’s happening.

Is there any issue in Django which makes the image load sometimes and not load sometimes or am i doing something wrong?

/r/djangolearning
https://redd.it/1j4cx2a
best practices re passing parameters as keyword, rather than positional

I've been a professional programmer for 20 years but I have seen a peculiar trend in the last few years. A lot of newer or more junior developers specify arguments as keyword arguments if there are 2 or more. So for something like the below where there are no optional or keyword-only args (i.e. the function is defined def get_widgets(db_session:Session, company_code:str, page:int, rows_per_page:int) -> list[Widget]):

widgets = getwidgets(dbsession, companycode, page, rowsperpage)

They will insist on writing it as:

widgets = get
widgets(
dbsession=dbsession,
companycode=companycode,
page=page,
rowsperpage=rowsperpage
)

To me this kind of thing is really peculiar and quite redundant. Is this something that is getting taught during, say, "Intro to Data Engineering" courses or introductions Python in general? It's kinda grating to me and now I'm seeing some of them requesting changes to Pull Requests they're assigned to review, asking that method/function calls be rewritten this way.

Am I right in considering this to be weird, or is this considered to be current best practice in Python?

/r/Python
https://redd.it/1j4wdwo
Self-hosted RSS/ATOM reader with LLM-generated tags, scoring, filtering, and sorting

Check it on github: [https://github.com/Tiendil/feeds.fun](https://github.com/Tiendil/feeds.fun) \[Python on backend\]

# What My Project Does

It behaves like a regular news reader, but has extra tag-related features:

How it works:

* For each news entry, the reader automatically assigns a lot of tags.
* You can create rules like `books + sci-fi -> +5 score`, `politics + new-york -> -10 score`.
* News are sorted by score, so you always see the most interesting news first.

# Target Audience

Those who are overwhelmed by news and want to save their own time.

The code is stable and should run smoothly in production.

For me it saves over 80% of news-reading time, simply by filtering out most of the non-relevant news.

# Comparison

The nearest reader with similar functionality is Tiny Tiny RSS. I was testing the idea with LLM-tags on it, but I found its tag-related features too limited and hard to patch.



/r/Python
https://redd.it/1j472bj
A way I make money with Python without committing to a full-time job

I have some free time but not enough for a regular job. I’m looking for ways to earn by coding small projects, like building a simple website, automating tasks with scripts, or debugging Python code. Please tell me if there are any platforms or other recommendations for finding these types of projects.

/r/Python
https://redd.it/1j5058h
Remake of an old flash game called Ores using Pyxel, and it runs in the browser.

# What My Project Does:

I remade an old flash game called Ores using Pyxels that I call Stack Pusher. You can play it in your browser and I think thats pretty neat. Any constructive feedback is absolutely welcomed.

# Target Audience:

Anyone on earth with internet.

# Comparison:

Here is a video of the original https://www.youtube.com/watch?v=vVu9ROoBZKQ

# How To Play:

Stop the blocks from being pushed of the screen! Destroy touching blocks of the same color to earn points towards leveling up. When you level up the screen restarts, but gets tougher every level. If the blocks go off the left side of the screen you lose.

# Links:

Stack Pusher Github (https://github.com/wyattferguson/stack-pusher)

Play in your browser (https://wyattferguson.github.io)

/r/Python
https://redd.it/1j54j94
Should I be using more data structures?

A long time ago, I learned a lot about Hashmap, Red-Black-Trees and a many, many more. However in my day-to-day Data Centric Programming in Python I only use sets, lists, dicts and Dataframes. I do use trees if I have a recursive structure, but rarely.

Am I missing out and could improve my code by revisiting data structures or are these just a non-issue when doing high level data pipelines in Python?

/r/Python
https://redd.it/1j57nj3
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/1j5a404
Seeking Python Backend Projects – Developer Upskilling in Django, Flask, FastAPI, SQL

Hi everyone,

I’m currently working in Python automation and have recently been dedicating time to upskilling in backend development. I’ve been learning frameworks like Django, Flask, FastAPI, and working with SQL, and I’m eager to put these skills into practice on real projects.

I’m reaching out to see if anyone is working on a project that could use an extra pair of hands for Python backend development. Whether it’s a side project, a startup idea, or an open-source initiative, I’m excited to contribute, learn, and grow through hands-on experience.

I believe in continuously pushing myself, not just in coding but also in maintaining a balanced lifestyle. A good coding session followed by a solid gym workout has always helped me stay motivated and clear-headed—sometimes, the best ideas come when you’re not at the desk!

If you have any opportunities or know someone who might be looking for help, please feel free to reach out. I’m open to collaboration and would appreciate any advice or pointers as I navigate this transition into more backend-focused roles.

Thanks for reading and have a great day!

Looking forward to connecting with you all.

/r/djangolearning
https://redd.it/1j5d0hw
Looking for a couple of senior Django devs

We’re building a mental health practice management app that will offer unparalleled automation and more features than anything currently available in the US. There are some technically challenging components, so we’re looking for two Senior Django Developers:

* One Senior++ Dev with architecture experience (top range of the budget: \~$7K)
* One Senior Dev without architecture duties ($5K-$6K range)
* (We're also open to mid-senior devs for which the range would be around $4K-$5K)

We need strong Python backend developers with experience in Django or FastAPI (we're using Django, and need quick ramp-up, so I believe these two would be the most relevant experience), SQL, Celery, security, and API performance optimization. Bonus if you know AWS, OpenAPI, CI/CD or have startup/healthcare experience.

The details:

* Contract: Independent contractor (Self-employed/LLC)
* Salary: $4K-$7K/month (gross), depending on seniority
* Hours: Mon-Fri, 12:00 - 21:00 EET (incl. 1h lunch) - these are the hours that our current devs work, but we're flexible as long as there's an overlap
* Culture: no BS, no useless meetings, we want to get stuff done

I want to make sure no one falls through the cracks, and with Reddit messages, there’s a chance I might miss some. To make sure your application is seen, upload it to[

/r/django
https://redd.it/1j505g3
I built DjipFast - a shipfast alternative but for django

Marc Lou's Shipfast is great. I wanted something like this - but for Django.

I know that Django already has "Batteries included", but when it comes down to it, there are a lot of pitfalls and configuration errors that took me days to fix in the past.

If you are using DaisyUI + Tailwind i think you might especially appreciate the *no Node.js* dev workflow of compiling the CSS.


Let me know what you think :)

https://djipfast.com

/r/django
https://redd.it/1j5insz
Docker and Kubernetes

Hi all,

I’ve worked mostly on backend in terms of creating models, APIs having OpenAPI specification docs etc and also have used docker containers and tied multi containers using docker compose.

Now I’ve been introduced to Kubernetes and this one pod one container is so confusing to me.

Why do we need pods? Make it manageable? Why not someone include these management/ scaling methods etc in docker itself? It feels like adding additional wrapper to docker and repeating writing config files etc.

If I have a VM then I can only have one Kubernetes to manage all the docker files?

E.g. In one VM I can setup multiple website/ backends right? How does Kubernetes help me there?

/r/django
https://redd.it/1j5c3hy
Rio Hits 100K Downloads & 2K GitHub Stars – Open Source Python Web Apps

Hey everyone,

Over the past 10 months, my friends and I created Rio, an open-source framework to help Python developers build modern web apps without needing HTML, CSS, or JavaScript. Today, we’re excited to share that Rio surpassed 100,000 downloads and over 2,300 GitHub stars since launch! 🎉

A huge thank you to this amazing community for the support, feedback, and contributions that have helped us improve Rio!

What is Rio?

Rio lets you build full-stack web apps entirely in Python. With Rio, the UI is defined using Python components, inspired by React and Flutter. Instead of writing HTML/CSS, you compose reusable UI elements in Python and let Rio handle rendering and state updates. The backend and frontend stay seamlessly connected using WebSockets, so data syncs automatically without manual API calls. Since Rio is fully Python-native, you can integrate it with any Python library, from data science tools to AI models.

We’ve seen people build everything from CRM tools to dashboards, LLM interfaces, and interactive reports using Rio, but we’re always looking for ways to improve. If you’re a Python developer interested in web apps, we’d love to hear:

* What do you like about Rio?
* What’s missing?
* What features would you love to see?

[https://github.com/rio-labs/rio](https://github.com/rio-labs/rio)

/r/Python
https://redd.it/1j5ofdj
Are There Any Tools for Detecting Unhandled Exceptions or Hidden Asynchronous Calls in Python?

Title: Any Tools to Detect Unhandled Exceptions or Hidden asyncio.run() Calls in Python?

Hey Python devs,

I often struggle with unhandled exceptions and hidden async issues in Python. Existing tools (mypy, pylint, pyright) help, but they don’t fully solve these problems.


1. Unhandled Exceptions

When calling third-party functions, it’s unclear what exceptions they raise:

import somelibrary

def process():
result = some
library.dosomething() # What exceptions can this raise?
return result

• No easy way to detect **undocumented exceptions**.

• Hard to ensure **exceptions are properly handled across the call stack**.



**2. Hidden
asyncio.run() Calls**

A function might internally use 
asyncio.run(), breaking if called from another event loop:

async def process():
result = something() # Is there already an
asyncio.run() inside?

def outside
process():
asyncio.run(process()) # Will this break?

• Detecting nested asyncio.run() calls is tricky.

• Some libraries use async without making it obvious.



Questions for the Community:

• Are there tools that statically analyze these issues?

• Would it be worth starting an open-source project for exception tracking and async validation?

Would love to hear your thoughts! 🚀

/r/Python
https://redd.it/1j5pged
Django 5.2 Shell auto import tip

/r/django
https://redd.it/1j5nwzh
I made a comics site and did what everyone says is impossible!

You know what people say about flask? That it's great for medium and small projects, pff

I didn't listen. I went with my head and used the framework I like and make big :)) LONG LIVE FLASK LMAO

I created a fully functional comics site inspired but not too much by mangadex.

Database, users, comments, etc.

eh I'm going to try to put images of the code in reply because I'm super dumb and I don't know how to put images on reddit post

I really want to help people, if you have questions for flask projects, I think I'm finally at a level where I'm not ready to help!



If u wanna see the site : https://javu.xyz/ ( YES IT'S XYZ BUT AINT SCAM I'M JUST BROKE SORRY )
and it's might be down sometime cause i still dev, .. yes i use port 80 in dev progress, but i need to show my friend and get feedback and too dum to use Ngnix SORRY 🥲

/r/flask
https://redd.it/1j5mxei
Seeking Experienced Django Developer to Help Finalize Our Learning Management System (LMS)




Hello Redditors,

We're a team building a cutting-edge Learning Management System (LMS) using Django, and we're looking for an experienced Django developer to help us finalize the project.

Project Overview:

Our LMS aims to solve problems for private career colleges in Alberta and the way they manage their courses, students, and instructors. We've made significant progress, but we need an expert's touch to ensure the project meets the highest standards.

Responsibilities:

- Review and optimize our existing Django codebase
- Implement new features and functionality as needed
- Ensure scalability, security, and performance
- Collaborate with our team to resolve any issues or bugs

Requirements:

- 3+ years of experience with Django development
- Strong understanding of Django's ORM, templates, and views
- Experience with google classroom and google workspace API
- Excellent problem-solving skills and attention to detail
- Strong communication and collaboration skills

What We Offer:

- Competitive rates (negotiable)
- Opportunity to work on a high-impact project
- Flexible working hours and remote work options
- Collaborative and supportive team environment

If you're a seasoned Django developer looking for a new challenge, we'd love to hear from you! Please share your experience, portfolio, and availability in the comments below.



/r/django
https://redd.it/1j5wc0n
D What are the best practices for using PySpark with ML libraries

I use Pyspark for the data processing part of my project because my dataset is pretty large and using Pandas dataframe would be very slow.

But once my data is ready I want to use some of the methods from sklearn such as Stratified splitting which is not available on pyspark.ml. I considered converting the Pyspark data frame into the Panda's data frame and from there using sklearn and other ml libraries but this part is very computationally expensive and leads to memory errors

/r/MachineLearning
https://redd.it/1j5y3d2
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/1j645mw
Polars Cloud; the distributed Cloud Architecture to run Polars anywhere

The team of Polars is releasing Polars Cloud. A way to remotely run Polars queries. You can apply for early access.

https://pola.rs/posts/polars-cloud-what-we-are-building/

/r/Python
https://redd.it/1j61i82
can i get some help beta testing my flask chatroom before i upload to python anywhere

i made a chatroom on replit before uploading for me and some friends i need help finding bugs and testing the profanity filter.

https://2715b3d1-7a59-402a-8c03-a163c99efbdd-00-22r3agubyqyof.kirk.replit.dev/chat


if you would like you can join the final version after testing



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