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

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

What’s your approach to organizing Python projects for readability and scalability?

I'm working on improving my Python project structure for better readability and scalability. Any tips on organizing files, folders, modules, or dependencies?

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

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

Python Daily

Practice resources

Recently complete watching “code bro” YouTube python learning
And now I wanted to practice on those skill. Do you have any recommended researchers to practice from it?

I tried “code war” and i think the Questions there is a little off ( some of the question there are weird and I don't think I'll ever run into them again)

I know “leet code” is more difficult question aiming for interview question but maybe I should learn from them

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

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

Python Daily

Tuesday Daily Thread: Advanced questions

# Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

## How it Works:

1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.

## Guidelines:

* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.

## Recommended Resources:

* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.

## Example Questions:

1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the

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

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

Python Daily

An open-source alternative to Yahoo Finance's market data python APIs with higher reliability.

"Hey folks! 👋

I've been working on this Python API called defeatbeta-api that some of you might find useful. It's like yfinance but without rate limits and with some extra goodies:

• Earnings call transcripts (super helpful for sentiment analysis)
• Yahoo stock news contents
• Granular revenue data (by segment/geography)
• All the usual yahoo finance market data stuff

I built it because I kept hitting yfinance's limits and needed more complete data. It's been working well for my own trading strategies - thought others might want to try it too.

Happy to answer any questions or take feature requests!"

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

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

Python Daily

Best Way to Split Scientific PDF Text into Paragraphs?

Hi everyone,

I'm working on processing scientific articles (mostly IEEE-style) and need to split the extracted text into paragraphs reliably.

Simple rules like \\n or \\n\\n often give poor results because:

Many PDFs have line breaks at the end of each line, even mid-paragraph.

Paragraph separation isn't consistent.

I'm looking for a better method or tool (free if possible) to segment PDF text into proper paragraphs
Any suggestions (libraries methods......) would be appreciated!



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

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

Python Daily

any django package for user credit usage/balance ?

hi everyone!

I'm building an AI based web application with django, celery.

I want to allow users have pay-as-you-go model. There will be credit purchasing.
is there any package for this purpose ?

Thanks

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

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

Python Daily

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

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

Python Daily

Django 5 healthcheck

Hello, I am looking to create a healthcheck endpoint for my django app and I was hoping for it to be a little bit more thorough than just returning an HTTP 200 OK response. My idea was to do something that at least check for DB and cache connectivity before returning that successful response. Are there any recommended/ best practices for this?

I could certainly just perform a read to DB and read or write something to the cache, but was just curious to what others are doing out there since I feel that might be inefficient for an endpoint that's meant to be quick and simple.

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

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

Python Daily

Starting Over at 40: How Solo Python Freelancing Let Me Trade Burnout for a Zero-Stress, Profitable

It took me twenty years, two burn-outs, and a hard look at what I really wanted from a working week to understand how I could earn a comfortable living and stay sane. This article is the unfiltered story of my learning curve. It’s 100 percent real; I wrote every line, using AI only to polish grammar and structure. If you are wondering whether a mid-career switch to Python freelance work could fit your own life, read on: I will lay out every step, the money, the mistakes, and exactly how I organise my days now so you can decide what might translate to your situation.

adrien.d_84254/starting-over-at-40-how-solo-python-freelancing-let-me-trade-burnout-for-a-zero-stress-profitable-870931ac8203">Link to full post here

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

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

Python Daily

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

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

Python Daily

Finally tried Django 5.1’s {% querystring %} tag — it’s amazing (especially with HTMX)

While working on a Django project for a client, I had to build a fairly complex UI with HTMX — filtering, sorting, pagination — all driven by query parameters.

As you probably know, updating URLs in Django templates without clobbering the rest of the querystring used to be a pain. I was halfway into writing a custom tag (again) when a colleague pointed me to Django 5.1’s new {% querystring %} template tag.

Game. Changer. 🙌

It handles adding, removing, and updating query parameters cleanly — no loops, no custom tags, just elegant syntax.

I was so happy I found it and I hope it can make someone else happy :)

From the official docs: here

I wrote a short blog post walking through the tag, with examples of real-world usage (pagination, multi-param filters, HTMX integration, etc.) if your'e interested in some more info:

👉 alonwo/django-5-1s-game-changing-querystring-template-tag-finally-url-parameters-made-easy-d2edb539590f">Django 5.1’s Game-Changing QueryString Template Tag: Finally, URL Parameters Made Easy



Hope it’s useful — and I’d love to hear how others are using it or if you’ve got tips I missed!

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

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

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

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

Python Daily

Blog Understand how Python works using daily koans

When I first started using Python, I did what everyone does: followed tutorials, bookmarked cheat sheets, and tried to memorize as much as I could. For a while, it worked. At least on the surface.

But even after months of writing code, something felt off.
I knew how to use the language, but I didn’t really understand it.

Then I stumbled across a line of code that confused me:

== False # False
if : # Also False

I spent longer than I care to admit just staring at it.
And yet that little puzzle taught me more about how Python handles truth, emptiness, and logic than any blog post ever did.

That was the first time I really slowed down.
Not to build something big, but to sit with something small. Something puzzling. And that changed the way I learn.

So I started a little experiment:
Each day, I write or find a short Python koan, a code snippet that seems simple, but carries a deeper lesson. Then I unpack it. What it looks like on the surface. Why it works the way it does. And

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

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

Python Daily

Can someone help me with a clear guide to Django auth process customization ?

Hello guys !! I'm new in the django world, and i feel a little confused by the authentication process of this framework. A come frame laravel where i used to create the auth process by myself (although there are some ready to use kits like breeze). But in Django, i've realized that the authentication system is a built in feature of the framework. I searched for a way to customize it, but all the tutorials i found were not as clear as i needed. So if someone has some tips or suggestions for me, il be delighted to explore them 🙂. Thanks in advance.

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

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

Python Daily

toycrypto: Some toy cryptographic modules and related tools

### toycrypto

Some toy cryptographic modules and related tools that should never, ever be used for anything other than demonstation purposes.

Python's "one int to rule them all" makes it very attractive for illustrating cryptographic notions and computations.

- PyPi
- Github
- Documentation

### What My Project Does

toycrypto is a collection of modules which can be used to illustrate or teach about basic cryptographic concepts.
It has few third party dependencies and no required dependencies on anything that would prevent its use in a pure Python environment.

It started out as a place for me to collect various things I had written in Jupyter notebooks or in teaching notes.

A few examples:

- The oldest (and ugliest) code in the project is the Elliptic Curve module, which I had originally created to so that I could talk about the doubleandadd algorithm (and its vulnerabilites to side channels).

- The birthday problem module because I needed something that would efficiently provide reasonable approximations for the kinds of numbers and probability I wanted to talk about.

- A more recent module is the security games,
which can be used to illustrate things like IND-CPA.

- The number theory module started out to just give me pure Python utilities that I would otherwise have used Sage

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

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

Python Daily

How is PySide6 as a GUI development option?

I've been looking into native GUI app development, and PySide6 came up—does anyone have experience with it?

Also, is building GUI apps with Python kind of a bad idea in general?

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

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

Python Daily

Feeling Overwhelmed as a Django Beginner, Is This Normal?

Hi guys, I recently started learning Django. I'm not completely new to backend development though, I understand the basics, since I had been using Flask for a while. However, I never worked on any real-world projects, just personal ones.

My first programming language was Python, then I moved on to Flask, and now I'm learning Django. I also know HTML and a bit of CSS. I've never really had any formal training; most of my learning has been through YouTube.

Lately, I’ve come to realize how little I actually know. Everything feels overwhelming. I keep learning every day, but there's always something new to figure out. I just started learning Django REST Framework (DRF) through a YouTube course. It was only yesterday or so that I found out about Django Ninja, another option for building REST APIs (I think it supports async too), I discovered it thanks to a Udemy course I got on using Redis with Django by Very Academy.

I've been applying for internships and junior developer roles. I've even sent emails to startups and organizations offering to work as an unpaid intern just to gain real world experience. How did you guys manage to keep going through all this?

Also, in

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

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

Python Daily

Django 2024 Annual Impact Report
https://www.djangoproject.com/weblog/2025/jun/30/django-2024-annual-impact-report/

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

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

Python Daily

What best works for frontend if I use DRF?



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

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

Python Daily

Django DRF with django All Auth. Cross origin question.

Hey I'm trying to make Django DRF that uses django all auth with a React frontend.

The error is 403 (screenshot):

Backend - localhost:8000

Frontend - localhost:3000

Header's I'm sending along with the fetch request:

headers: {
'Accept': "application/json",
},
credentials: 'include',headers: {
'Accept': "application/json",
"X-CSRFToken": getCSRFToken() ?? '',
},
credentials: 'include',

(the function is tested and returns the token properly)

There is an example project, which I tried to replicate with no luck:
[https://codeberg.org/allauth/django-allauth/src/branch/main/examples/react-spa](https://codeberg.org/allauth/django-allauth/src/branch/main/examples/react-spa)

Request headers for 403:

POST /auth/browser/v1/auth/signup HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: http://localhost:3000/
X-CSRFToken:
Content-Type: text/plain;charset=UTF-8
Content-Length: 59


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

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

Python Daily

With Python 3.14 free-threading support coming up, will this be useful for Django's future performances?

I am not very familiar with how this is handled in Django, but does the Django team have a roadmap of supporting this feature and how long down the road should we expect it to roll over?



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

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

Python Daily

Django rest job advice?

Hey guys i have been doing works with django more than a year. I am much comfortable with it that no other framework gives me courage. The best framework for me for backend currently i enjoy. So i wanna build career specifically on this cause i enjoy for hourse doing django rest stuffs.
But in my country there are only few companies that hires django developers.

I want to try remote company that hires django/fastapi developer. How to get job posts? I tried LinkedIn but failed many times bu sending cv...can anyone help me how to get a remote job? What should i add in CV?
I will pleased to have a network who are working as a django/python developer.

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

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

Python Daily

Showcase: I built perplexity clone with Django and React

I built a Perplexity clone with Django + React! 🔥

Knowmore is my latest open-source project featuring:

Real-time streaming AI responses
Web search integration for current info
Django async/ASGI backend
React + TypeScript frontend
Anthropic & OpenAI LLM integration
FireCrawl for web scraping

Check it out: https://github.com/ahmadrosid/Knowmore

Currently open to new opportunities as a Django/Python/React developer. If you're hiring or know someone who is, drop me a line at **hey@ahmadrosid.com** 📧

Would love your feedback on the code and architecture! 🚀

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

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