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
Looking for a Django course that teaches like Tony Alicea teaches JavaScript (in-depth, from the ground up)

Hi everyone,

I'm currently learning React through Tony Alicea's JavaScript course, and I really love his teaching style. He doesn't just show you what to do — he explains why things work, diving into the inner workings of the language (execution context, closures, hoisting, call stack, etc.).

Now, I'm learning Django, and I'm trying to find a course that teaches it in that same deep, conceptual way — where you actually understand how Django works under the hood, not just how to build an app by following steps.

Here’s what I’m specifically looking for in a Django course:

Explains the architecture and internals of Django — request/response cycle, middleware, URL resolution, template engine, ORM mechanics, etc.

Helps you think like Django, not just use it

Covers Django REST Framework for building APIs (I plan to use React on the frontend)

Bonus: touches on auth, customization, and possibly deployment

What I’ve tried so far:

Corey Schafer’s YouTube tutorials – Solid explanations and pacing, but the series feels incomplete and stops short of advanced topics.

Jose Salvatierra’s Django Bootcamp (Udemy) – Good if you want to learn how to use Django, but doesn’t go into how Django works internally or why it’s built that way.

JustDjango Pro – Haven’t tried yet; looks promising

/r/django
https://redd.it/1m6y03l
How do you work with 3rd party django apps?

While it is a great oppurtunity to use one of the many availbale 3rd part django apps, there obviously potential pitfails in using them.

For example, I'm currently thinking about to integrate django-cryptography, but it's last significant contributions are around 2 years ago with 4 contributors stated in the repo. I would say there is potential security/compatibility risk - if not now, then in the future - especially in such topics as cryptography.

How do you handle the integration of external django apps? On which parameters and attributes of an app do you look? What are cutoffs you use to decide against an external app?

/r/django
https://redd.it/1m754ty
Issues with collectstatic when moving to an external storage

I am moving to external storage (Blackblaze B2 Cloud which is compatible with Amazon S3).
It should have been very simple, but even though Blackblaze settings were correct and testing of uploading files were successful) - collectstatic have the static files copied to the local folder and not to the external storage.

I spent many hours with ChatGPT and at the end the solution was:

1. To create a custom storage backend which will override the django storage
2. To put the calls for it at the end settings.py

Now it works fine, but it doesn't seem like a very elegant nor straight forward solution.
Did anyone experience similar issues and find a better solution?
Thanks

/r/django
https://redd.it/1m770wm
Celery Beat stops sending tasks after 2 successful runs

I’m running Celery Beat in Docker with a Django app. I redeploy everything with:

docker compose -f docker/docker-compose.yml up -d --build

Celery Beat starts fine. I have an hourly task (dashboard-hourly) scheduled. It runs at, say, 17:00 and 18:00, and I see the expected logs like:

Scheduler: Sending due task dashboard-hourly (dashboard-hourly)

dashboard-hourly sent. id->...

But after that, nothing. No more task sent at 19:00, and not even the usual "beat: Waking up in ..." messages in the logs. It just goes silent. The container is still "Up" and doesn't crash, but it's like the Beat loop is frozen.

I already tried:

Setting --max-interval=30

Running with --loglevel=debug

Logs confirm that Beat is waking up every 30s... until it stops

Anyone run into this ? Any ideas why Beat would silently freeze after a few successful runs ?

/r/django
https://redd.it/1m7ilos
Built a simple license API for software protection - would love feedback/contributions!

Hey everyone! 👋

I've been working on a lightweight license management API and thought the community might find it useful.

What My Project Does: This is a FastAPI-based license management system that provides:

License key generation and validation via REST API
User registration and authentication
Hardware ID binding for additional security
Admin dashboard for license management

Target Audience: This is aimed at indie developers and small teams who need basic software protection without the complexity or cost of enterprise solutions. It's production-ready for small to medium scale applications, though it could benefit from additional features and testing for larger deployments.

Comparison: Unlike commercial services like Keygen, Paddle, or Gumroad's licensing:

Self-hosted \- you control your data and don't pay per license
Lightweight \- minimal dependencies, easy to deploy
Simple \- no complex subscription models or advanced analytics
Free \- open source alternative to paid services

However, it lacks the advanced features of commercial solutions (detailed analytics, payment integration, advanced security).

GitHub: https://github.com/awalki/license\_api

Still in early stages, so would really appreciate any feedback, contributions, or suggestions! Whether it's code review, feature requests, or pointing out security issues I missed 😅

Thanks for checking it out!

/r/Python
https://redd.it/1m7cib1
D - NeurIPS'2025 Reviews

Hey everyone,

NeurIPS 2025 reviews should be dropping soon (July 24th AoE), and I thought it might be a good idea to start a thread where we can share our thoughts, experiences, and reactions.

Feel free to post your initial impressions, any surprises (good or bad), questions about rebuttals, or just how you’re feeling about the process this year. Whether it’s your first submission or your tenth, you’re not alone in the rollercoaster.

Let’s keep things constructive and supportive. Good luck to all!

/r/MachineLearning
https://redd.it/1m74ugv
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/1m7pfb4
Efficient Method to handle soft delete

Hi,

Soft delete = setting is_active equal to false, instead of actually deleting the object.

In almost every model that we create we put is_active or is_deleted Boolean field.

Now as there complexity of the project increases, it gets really difficult to handle this in every view.

Specially when quering related objects sometimes we forget to handle is_active and we end up sending data which shouldn't be sent.

Sometimes we need to restore the deleted thing as well.

How to handle on_delete thing in this situation for related models.

Is there any way this can be gracefully handled like using some kind of middleware.



/r/django
https://redd.it/1m7u1o3
Microsoft Defender Flagging uvx as Suspicious on Work PC

Hey folks,

I’ve been working on a project where I use uvx to launch scripts, both for MCP server execution and basic CLI usage. Everything runs smoothly on my personal machine, but I’ve hit a snag on my work computer.

Microsoft Defender is flagging any uvx command as a suspicious app, with a message warning that the program is new/recent which is blocking me from running these scripts altogether - even ones I know are safe and part of my own codebase.

Has anyone run into this before? Are there any sane workarounds on my end (e.g., whitelisting the binary locally, code signing, etc.), or am I doomed unless Defender eventually “learns” to trust uvx?

I know in the end it is limited by company policies but just wondering if there's something that I can try to circumvent it.

Any advice would be hugely appreciated. Thanks!

Project link for reference



/r/Python
https://redd.it/1m7hypm
Wagtail Space is a go!

/r/django
https://redd.it/1m7kj0a
Scalar product with lists as coordinates

Hello guys,

I have quite theoretical question. I have an exercise to make scalar product out of:

a = [(1, 2), (3, 4), (5, 6)]
b = [(7, 8), (9, 10), (11, 12)]

So from my perspective that would be:

`def scalar_product(x, y):`

`return [sum(sum(i * j for i, j in zip(m, n)) for m, n in zip(x, y))]`

But i am curious, does things like that happen in real programming? Or should i present it as:



def scalar_product(x, y):
return [sum(i * j for i, j in zip(m, n)) for m, n in zip(x, y)]?

/r/Python
https://redd.it/1m7zw86
Does it have a name? Weird spiral shape I made with the turtle module in Python

Hi, I accidentally made this geometric shape in Python and it looked really familiar, so I was wondering if it had a name or something

Thx :-)

Source code: https://pastebin.com/8T6tKEGK
The shape: https://imgur.com/a/1cmgWYt

/r/Python
https://redd.it/1m81n93
Flask-Nova: A New Flask Extension for Zero-Boilerplate APIs with Auto Docs & Type Safety

Hey r/flask,

As much as we love Flask for its simplicity and flexibility, let's be real: building modern APIs with authentication, validation, and proper documentation can become a repetitive grind. I kept finding myself writing the same boilerplate code project after project.

That's why I'm excited to share **Flask-Nova** – a new extension for Flask designed to drastically accelerate API development!

# What is Flask-Nova?

Flask-Nova is a modern extension that helps you build APIs faster by baking in essential features like:

Automatic OpenAPI/Swagger docs (`/docs`): Get interactive API documentation with zero extra effort. No more hand-written docs.
Type-safe input models: Define your request data using Pydantic-style models, ensuring automatic validation and cleaner code.
Decorator-based routing: Define your API endpoints with simple, elegant decorators – say goodbye to verbose boilerplate.
Built-in HTTPException: Handle API errors cleanly and consistently with semantic HTTP status codes.
Status helpers: Use intuitive constants like `status.CREATED`, `status.BAD_REQUEST`, etc.
Depend() for Dependency Injection: Write cleaner, more modular, and testable code by easily injecting dependencies into your route handlers.
Extensible and Pythonic design: Built with Flask developers in mind, it feels natural and easy to extend.
Compatible with native Flask: Seamlessly integrates into your existing Flask applications.

# Why should you check it

/r/flask
https://redd.it/1m81swl
Flask-Nova – A Lightweight Extension to Modernize Flask API Development

Flask is great, but building APIs often means repeating the same boilerplate — decorators, validation, error handling, and docs. I built Flask-Nova to solve that.

## What It Does
Flask-Nova is a lightweight Flask extension that simplifies API development with:

- Auto-generated Swagger docs
- Type-safe request models (Pydantic-style)
- Clean decorator-based routing
- Built-in dependency injection (Depend())
- Structured HTTP error/status helpers

## Target Audience
For Flask devs who:
- Build APIs often and want to avoid repetitive setup
- Like Flask’s flexibility but want better tooling

## Comparison
Compared to Flask: Removes boilerplate for routing, validation, and

## Install
pip install flask-nova

## Links
- GitHub: https://github.com/manitreasure1/flasknova
- PyPI: https://pypi.org/project/flask-nova/
- Example App: https://github.com/manitreasure1/flask-nova-tutorials


/r/Python
https://redd.it/1m82flz
A very modular framework for RAG setup in some lines of code

Hey everyone,

I've been working on a lightweight Retrieval-Augmented Generation (RAG) framework designed to make it super easy to setup a RAG for newbies.

**Why did I make this?**
Most RAG frameworks are either too heavy, over-engineered, or locked into cloud providers. I wanted a minimal, open-source alternative you can be flexible.

**Tech stack:**

* Python
* Ollama for local LLM/embedding
* ChromaDB for fast vector storage/retrieval

**What I'd love feedback on:**

* General code structure
* Anything that feels confusing, overcomplicated, or could be made more pythonic

**Repo:**
👉 [https://github.com/Bessouat40/RAGLight](https://github.com/Bessouat40/RAGLight)

Feel free to roast the code, nitpick the details, or just let me know if something is unclear! All constructive feedback very welcome, even if it's harsh – I really want to improve.

Thanks in advance!

/r/Python
https://redd.it/1m860pg
D - NeurIPS'2025 D&B Track

# Hey everyone,

I think it's a good idea to have a separate discussion for the datasets and benchmarks track, feel free to share your scores or any other relevant feedback.

Let’s keep things constructive and supportive. Good luck to all!

/r/MachineLearning
https://redd.it/1m8ad4q
spamfilter: The super easy, yet highly advanced all-rounder for spam filtering

Hey there, Python friends!

I'm the maintainer of [spamfilter](https://github.com/mags0ft/spamfilter), a project I started a few years ago and have been working on ever since. In the recent days and months, I've spent significant time overhauling it - and now I'm happy to present the second iteration of it to you!

It's now quite literally easier than ever to stick together a spam filter that catches an **impressive amount of slop**, which is super valuable for people working on online interactive experiences involving Python (like Flask/Django websites, Discord bots, ...)

My library features:

* the concept of **abstracting more complex spam filters into so-called "pipelines"** to make your spam filtering rules easily understandable, pythonic and object-oriented
* a big collection of **pre-made spam filters** that allow you to build your own pipelines right away
* some pre-made pipelines for commonly used scenarios like **article websites and online chats**
* an all-new and (humbly said) nice [documentation](https://mags0ft.github.io/spamfilter/) with a lot of details
* **third-party API support** if you want it
* and, because everyone does it, an optional **deep integration** with AI providers and 🤗 Transformer models to detect spam quickly

A quick taste test to show you how the most basic usage would look like:

```python
from spamfilter.filters import Length, SpecialChars
from

/r/Python
https://redd.it/1m8gqr9
I'm building an "API as a service" and want to know how to overcome some challenges.

Hey devs, I’m building an API service focused on scraping, and I’m running into a problem.

The main problem I'm facing is having to manually build the client-side ability to self-create/revoke API keys, expiration dates, and billing based on the number of API calls.

Is there a service focused on helping solve this problem? Do you know of anything similar?

Appreciate any recommendations!

https://preview.redd.it/qasvl5xysvef1.png?width=2856&format=png&auto=webp&s=fd175766069a357b87703cf76c78695bc3f93fdb



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