pythondaily | Education

Telegram-канал pythondaily - Python Daily

1102

Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels

Subscribe to a channel

Python Daily

Is Django REST Framework worth it over standard Django for modern apps?

**Hey everyone! 👋**

I’ve been working with Django for building traditional websites (HTML templates, forms, etc.), but now I’m exploring building more modern apps — possibly with React or even a mobile frontend.

I’m considering whether to stick with **standard Django views or adopt Django REST Framework** (DRF) for building APIs. I get that DRF is great for JSON responses and API endpoints, but it feels like a bit more overhead at first.

For those who’ve worked with both —

* Is the learning curve of DRF worth it?
* Do you use DRF for all projects or only when building separate frontends/mobile apps?
* Are there performance or scaling benefits/drawbacks?

Would love to hear your experiences. Thanks in advance!

/r/django
https://redd.it/1lqfzsw

Читать полностью…

Python Daily

A Python-Powered Desktop App Framework Using HTML, CSS & Python (Alpha)

Repo Link: [https://github.com/itzmetanjim/py-positron](https://github.com/itzmetanjim/py-positron)

# What my project does

PyPositron is a lightweight UI framework that lets you build native desktop apps using the web stack you already know—HTML, CSS & JS—powered by Python. Under the hood it leverages `pywebview`, but gives you full access to the DOM and browser APIs from Python. **Currently in Alpha stage**

# Target Audience

* Anyone making a desktop app with Python.
* Developers who know HTML/CSS and Python and want to make desktop apps.
* People who know Python well and want to make a desktop app, and wants to focus more on the backend logic than the UI
* People who want a simple UI framework that is easy to learn.
* Anyone tired of Tkinter’s ancient look or Qt's verbosity

# 🤔 Why Choose PyPositron?

* **Familiar tools:** No new “proprietary UI language”—just standard HTML/CSS (which is powerful, someone made Minecraft using only CSS ).
* **Use any web framework:** All frontend web frameworks (Bootstrap,Tailwind,Materialize,Bulma CSS, and even ones that use JS) are available.
* **AI-friendly:** Simply ask your favorite AI to “generate a login form in HTML/CSS/JS” and plug it right in.
* **Lightweight:** Spins up on your system’s existing browser engine—no huge runtimes bundled with every app.

# Comparision

|Feature|PyPositron|Electron.js|PyQt|
|:-|:-|:-|:-|
|Language|Python|JavaScript, C/C++ or backend JS

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

Читать полностью…

Python Daily

Help with cloudinary integration

https://github.com/ReevuChatterjee/CloudinaryTrial.git
so here is my repo
why cant i save my image files to cloudinary. it gets saved in the root directory again and again help me fix it

/r/djangolearning
https://redd.it/1lq86gu

Читать полностью…

Python Daily

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/1lqbbv9

Читать полностью…

Python Daily

Flask Security Best Practices for Software Engineers

Hi all,

I'm Ahmad, founder of Corgea. We've built a scanner that can find vulnerabilities in Flask applications, so we decided to write a guide for software engineers on Flask security best practices:

https://corgea.com/Learn/flask-security-best-practices-2025

In this article, we’ve covered:

Common Flask security misconfigurations we keep seeing in the wild
How to safely manage your secret keys, sessions, and cookies
Input validation and preventing common attacks like XSS and SQL Injection
Best practices for authentication and password storage
Deployment hardening tips (headers, HTTPS, etc.)
Real code examples for each practice

We’ve written this with both new Flask developers and experienced engineers in mind.

Would love feedback from the community → What’s a Flask security mistake you’ve seen (or made 😅) that others should know about?


Anything else you’d like us to add in future updates?


PS: We love Flask and have used it for some of our services ❤️

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

Читать полностью…

Python Daily

Django tip Custom Management Commands

/r/django
https://redd.it/1lpug8i

Читать полностью…

Python Daily

async_rithmic: a fully async Rithmic gateway for algorithmic trading

# What My Project Does

`async_rithmic` is an open-source Python SDK that brings fully asynchronous access to the [Rithmic API](https://www.rithmic.com/) (a popular low-latency gateway for futures market data and trading).

With `async_rithmic`, you can:

* Place, modify, and cancel orders in a modern, non-blocking way.
* Easily subscribe to market data and build real-time event-driven trading systems.
* Retrieve historical market data

# Links

* [GitHub Project link](https://github.com/rundef/async_rithmic)
* [Documentation link](https://async-rithmic.readthedocs.io/en/latest/)

# Why I Built It

The only other Python wrapper I'm aware of is outdated, unmaintained and has a flawed architecture. I needed something:

* Fully async (for use with asyncio and fast, concurrent pipelines)
* Open source, with a clean, idiomatic API
* Easy to use in an event-driven trading system

After building several bots and backtesting platforms, I decided to open-source my own implementation to help others save time and avoid re-inventing the wheel.

# Target audience

* Python developers working with low-latency, event-driven trading or market data pipelines
* Quantitative researchers and algo traders who want fast access to Rithmic feeds for futures trading
* Anyone building their own backtesting or trading framework with a focus on modern async patterns

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

Читать полностью…

Python Daily

Want to gain experience

I am learning django nowadays and want to know how real projects work, so if someone is working on some django project and need someone's help I am ready to help so I can learn. (For free)

Even if you don't want my help please share your repo. So I can see how exactly we work in real world project in django.

/r/djangolearning
https://redd.it/1lpqzam

Читать полностью…

Python Daily

Code Sharing and Execution Platform Security Risks?

Currently working on a Python code sharing and execution platform aimed at letting users rapidly prototype with different libraries, frameworks, and external APIs. I am aware of the general security concerns and the necessity of running code in isolation (I am using GCP containers and Gvisor). Some concerns I'm thinking of:

\- crypto mining
\- network allowances leading to malicious code on external sites
\- container reuse

Wondering what everyones thoughts are on these concerns and if there are specific security measures I should be implementing beyond isolation and code-parsing for standard attacks?

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

Читать полностью…

Python Daily

pyfiq -- Minimal Redis-backed FIFO queues for Python

What My Project Does

pyfiq is a minimal Redis-backed FIFO task queue for Python. It lets you decorate functions with `@fifo(...)`, and they'll be queued for execution in strict order processed by threaded background workers utilizing Redis BLPOP.

It's for I/O-bound tasks like HTTP requests, webhook dispatching, or syncing with third-party APIs-- especially when execution order matters, but you don't want the complexity of Celery or external workers.


This project is for:

Developers writing code for integrating with external systems
People who want simple, ordered background task execution
Anyone who don't like Celery, AWS Lambda, etc, for handling asynchronous processing

Comparison to Existing Solutions

Unlike:

Celery, which requires brokers, workers, and doesn't preserve ordering by default
AWS Lambda queues, which don't guarantee FIFO unless using with SQS FIFO + extra setup

pyfiq is:

Embedded: runs in the app process
Order-preserving: one queue, multiple consumers, with strict FIFO
Zero-config: no services to orchestrate

It's designed to be very simple, and only provide ordered execution of tasks. The code is rudimentary right now, and there's a lot of room for improvement.

Background

I'm working on an event-driven sync mechanism, and needed something to offload sync logic in the background, reliably and in-order. I could've

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

Читать полностью…

Python Daily

Making a Simple HTTP Server with Asyncio Protocols

Hey,

If you're curious about how Asyncio Protocols work (and how you they can be used to build a super simple HTTP server) check out this article: https://jacobpadilla.com/articles/asyncio-protocols

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

Читать полностью…

Python Daily

How do you choose your Django hosting provider?

Hey guys, what are your usual go-to solutions when you're hosting your Django projects, and why?

Is price the most important factor, or is it the feature set, credibility of the company, or how do you choose the right one?

I'm conducting a small research project to gain a deeper understanding of this topic. Thank you for your help

/r/django
https://redd.it/1lp00rp

Читать полностью…

Python Daily

Is it unreasonable to pair Django with Astro as well as htmx?

So basically you have a website that is completely static up until the login page. Does Django’s project structure work well with this? Where you can basically use Astro to efficiently develop the static pages and not have to use “bloated” Django or rather ssr as a whole for the completely static portions. Then I’m also not sure if Django is suitable to be used with htmx, but I really like the concept of not having to reload the entire page request. It’s kind of like Astro’s island architecture but for ssr in a backwards twisted way where you could make the comparison.

I’m also torn between using golang with Templ to learn backend development or going with Django in python. Htmx and Astro pair-ability is definitely a must, so if it’s easily doable without some hacky round about way in Django, then I will probably go with that for simplicity, employability, and overall more widespread use.

/r/djangolearning
https://redd.it/1ln514x

Читать полностью…

Python Daily

ViewORM for SQLAlchemy

Hello, Python community! Here is a package I developed for some projects I work at, and hopefully it might be helpful to a broad audience of developers: **SQLAlchemy-ViewORM** for managing simple and materialized views in ORM manner with any DB support.

* [PyPI](https://pypi.org/project/SQLAlchemy-ViewORM/)
* [Documentation](https://sqlalchemy-vieworm.readthedocs.io/en/latest/)
* [GitHub](https://github.com/AivanF/SQLAlchemy-ViewORM)

# What My Project Does

Features:

* **Standard views**: Traditional simple SQL views that execute their query on each access.
* **Materialized views**: Views that store their results physically for faster access.
* **Simulated views**: For databases that don’t support materialized views, they can be mocked with tables or simple views. Actually, *this was the primary reason of the project* – to simplify quick tests with SQLite while deployments use Postgres. The lib allows to control the way of simulation.
* **Views lifecycle control**: create, refresh or delete the views all together or each one separately, depending on your project / business needs.
* **ORM interface, dialect-specific queries**: views can be defined as a static SQL/ORM query, or as a function that takes DB dialect and returns a `selectable`. After creation, the views can be used as ordinary tables.

What it lacks:

* **Migrations**, Alembic support. For now, migrations related to views should be handled manually or by custom scripts. In case the project receives

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

Читать полностью…

Python Daily

D Monthly Who's Hiring and Who wants to be Hired?

For Job Postings please use this template

>Hiring: [Location\], Salary:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] and [Brief overview, what you're looking for\]

For Those looking for jobs please use this template

>Want to be Hired: [Location\], Salary Expectation:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] Resume: [Link to resume\] and [Brief overview, what you're looking for\]

​

Please remember that this community is geared towards those with experience.

/r/MachineLearning
https://redd.it/1loqe5e

Читать полностью…

Python Daily

Am I on the right path? Learning React + Flask for Full Stack + AI Career Goals

Hey everyone!

I'm currently learning React for front-end development and planning to start learning Flask for the backend. My goal is to become a full-stack developer with a strong focus on AI technologies, especially areas like Generative AI and Agentic AI.

I'm also interested in Python, which is why Flask seems like a good fit, and I’ve heard it's lightweight and beginner-friendly. Eventually, I want to transition into AI development, so I feel like learning full-stack with Python will give me a solid foundation.

Am I on the right path? Or would you recommend learning something else (like FastAPI, Django, or maybe diving directly into AI tools and frameworks)?

Any advice or guidance is appreciated — especially from folks who've gone down this road. 🙏

Thanks in advance!

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

Читать полностью…

Python Daily

The one FastAPI boilerplate to rule them all

Hey, guys, for anyone who might benefit (or would like to contribute - good starting point for newbies)

For about 2 years I've been developing this boilerplate (with a lot of help from the community - 20 contributors) and it's pretty mature now (used in prod by many). Latest news was the addition of CRUDAdmin as an admin panel, plus a brand new documentation to help people use it and understand design decisions.

* Github: [https://github.com/benavlabs/FastAPI-boilerplate](https://github.com/benavlabs/FastAPI-boilerplate)
* Docs: [https://benavlabs.github.io/FastAPI-boilerplate/](https://benavlabs.github.io/FastAPI-boilerplate/)


Main features:

* Pydantic V2 and SQLAlchemy 2.0 (fully async)
* User authentication with JWT (and cookie based refresh token)
* ARQ integration for task queue (way simpler than celery, but really powerful)
* Builtin cache and rate-limiting with redis
* Several deployment specific features (docs behind authentication and hidden based on the environment)
* NGINX for Reverse Proxy and Load Balancing
* Easy and powerful db interaction (FastCRUD)



Would love to hear your opinions and what could be improved. We used to have tens of issues, now it's down to just a few (phew), but I'd love to see new ones coming.

*Note: this boilerplate works really well for microservices or small applications, but for bigger ones I'd use a DDD monolith. It's a great starting point though.*

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

Читать полностью…

Python Daily

Django's new Ecosystem page is live - featuring community-approved packages
https://www.djangoproject.com/community/ecosystem/

/r/django
https://redd.it/1lqc3w0

Читать полностью…

Python Daily

The logging module is from 2002. Here's how to use it in 2025

The logging module is powerful, but I noticed a lot of older tutorials teach outdated patterns you shouldn't use. So I put together an article that focuses on understanding the modern picture of Python logging.

It covers structured JSON output, centralizing logging configuration, using contextvars to automatically enrich your logs with request-specific data, and other useful patterns for modern observability needs.

If there's anything I missed or could improve, please let me know!

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

Читать полностью…

Python Daily

Best Resources to Learn Django in 2025?

Hey everyone,

I'm looking to get into Django and would really appreciate some guidance on the best resources out there in 2025. I'm comfortable with Python and have done some basic web dev (HTML/CSS/JS), but I'm new to backend frameworks like Django.

What I'm hoping to find:

A beginner-friendly roadmap or course
Up-to-date tutorials (text or video)
Good books or documentation
Projects or exercises to practice

I’ve seen a few tutorials floating around, but I want to make sure I'm learning from sources that are relevant and align with Django’s latest version.

Any tips, recommendations, or personal favorites would be hugely appreciated!

Thanks in advance 🙏

/r/django
https://redd.it/1lpy3kr

Читать полностью…

Python Daily

This simple CPU benchmark tool is my first Python project.

Hey all, I just joined this community and decided to share my first actual project! It is a benchmark tool that creates a CPU score, also dependant upon read/write speeds of the RAM, by calculating prime numbers. Link to the Github repository: https://github.com/epicracer7490/PyMark/blob/main/README.md

It's just a fun hobby project, made in a few hours. Feel free to share your results!

It can be unaccurate because, unlike Geekbench etc. it runs single-core and is dependant on Pythons CPU usage priority. Here's my result: Intel i7-12650H, CPU SCORE = 4514.82 (Length: 7, Count: 415991)

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

Читать полностью…

Python Daily

CSRF token missing error

I realize this may not be Flask specific problem. But I was hoping for some tips anyway. The status of my current project, is that it works OK on development, but behaves different on production.


The only difference I can note, is that the moment I test my password reset link on production, I will never ever be able to login AGAIN, no matter what I try/refresh/URLed. I did not test the password reset link on development, as I had trouble doing so with a localhost mail server. So this makes it difficult to pinpoint the source of error.

(NOTE: sending the password reset email itself works. there admin_required and login_required decorators elsewhere, but not complete, will removing ALL endpoint protection make it easier to debug?)


As you can tell, Im quite (relatively) noob in this. Any tips is extremely appreciated.


Attached is the pic, as well as much of the code. (The code is an amalgamation from different sources, simplified)

# ===== from: https://nrodrig1.medium.com/flask-mail-reset-password-with-token-8088119e015b
@app.route('/send-reset-email')
def sendresetemail():
s=Serializer(app.config'SECRET_KEY')
token = s.dumps({'someid': currentuser.mcfId})


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

Читать полностью…

Python Daily

Built a CLI tool that bridges multiple Python backtesting libraries to live APIs!

I just released my first significant open-source project, tackling an interesting architectural challenge. Different Python backtesting libraries (zipline, backtrader, vectorbt, backtesting.py) all have completely different APIs, but deploying strategies to live trading means rewriting everything from scratch.

So I built StrateQueue, a universal adapter between any backtesting library and live broker APIs. The technical challenge was normalizing signals across multiple library architectures and creating a clean plugin system for broker integrations, achieving \~11ms signal processing latency.

The CLI makes deployment dead simple:

stratequeue deploy \
--strategy examples/strategies/sma.py \
--symbol AAPL \
--timeframe 1m

DEMO

Since this is my first major open source contribution, I'd love feedback on code organization, API design, and Python best practices. The adapter pattern implementation was particularly fun to solve.

If you're interested in fintech applications with Python, I'd welcome contributors to help expand broker integrations or optimize performance. Even if you're just curious about the architecture, a GitHub star would help with visibility!

GITHUB

DOCS

TL;DR:

What my project does: StrateQueue is the fastest way from backtest to live trading

Target

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

Читать полностью…

Python Daily

Simple beginners guide

Python-Tutorial-2025.vercel.app


It's still a work in progress as I intend to continue to add to it as I learn. I tried to make it educational while keeping things simple for beginners. Hope it helps someone.



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

Читать полностью…

Python Daily

Best alternatives to Django?

Are there other comprehensive alternatives to Django that allow for near plug and play use with lots of features that you personally think is better?

I wouldn't consider alternatives such as Flask viable for bigger solo projects due to a lack of builtin features unless the project necessitates it.

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

Читать полностью…

Python Daily

I have created an app to manage agroforestry systems

https://redd.it/1loyjaz
@pythondaily

Читать полностью…

Python Daily

What is the best vps (interms of price) to host my django + react app.....(i have a background process script too)



/r/djangolearning
https://redd.it/1llmq48

Читать полностью…

Python Daily

Python script to batch-download YouTube playlists in any audio format/bitrate (w/ metadata support)

I couldn’t find a reliable tool that lets me download YouTube playlists in audio format exactly how I wanted (for car listening, offline use, etc.), so I built my own script using yt-dlp.

# 🔧 Features:

Download entire playlists in any audio format: `.mp3`, `.m4a`, `.wav`
Set any bitrate: 128 / 192 / 256 kbps or max available
Batch download multiple playlists at once
Embed metadata (artist, title, album, etc.) automatically

It’s written in Python, simple to use, and fully open-source.

It was created using ChatGPT and It performs as described.

Feel free use it ,if you need it

📽️ [YouTube tutorial link\] -https://youtu.be/HVd4rXc958Q
💻 [GitHub repo link\] - https://github.com/dheerajv1/AutoYT-Audio

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

Читать полностью…

Python Daily

Will requiring login deter users from trying my mood tracker?

I am finishing up my first web application, a simple mood tracker where users log daily mood and notes. All pages require login so data stays private. I’m worried visitors will see the login wall and leave without trying the core features. Is that a dealbreaker? What’s the easiest way to let people try the main functionality without sacrificing privacy? I’m using React with a Django REST backend and session based authentication.

/r/django
https://redd.it/1louful

Читать полностью…

Python Daily

How to Implement login by either email or phone number?

Hello, I'm trying to develop an online store project, and I need a way to allow users to use either email OR phone number for registration. Keyword being Or. However since this is an online store, for actual purchase i will require users to provide phone number later. For now, is there a way to let users sign up with email or phone number? (CustomUser maybe?)

/r/djangolearning
https://redd.it/1low9b8

Читать полностью…
Subscribe to a channel