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
: are replaced with \x3a

this is i have set in the .env file

DATABASE_URL=mysql+pymysql://root:@localhost/test_flask_db

os.getenv("DATABASE_URL",'')

mysql+pymysql\\x3a//root\\x3a@localhost/test_flask_db

if i access like this then im getting : are replaced with \\x3a

how can i solve this issue.

/r/flask
https://redd.it/1kierwb
I feel stuck, books recommendations?

I’ve been programming in python for almost 2 years. I love python and I’m focusing in data analytics using python.

I’m tired of watching YouTube videos and tutorials, do you guys have some books to recommend?

I’m looking to improve my programming skills in general, to understand in a deeper level how python works or useful things to know about it idk.

I haven’t read any programming books in my life so idk what they talk about haha

Preferably, intermediate level books.

Thank you!


/r/Python
https://redd.it/1kif0pz
I built cutieAPI, a Python CLI tool for interactive API testing with a Rich TUI.

I created CutieAPI, a terminal-based, beginner-friendly API manager.

Most beginners are intimidated by curl commands—I was one of them too! That’s why I built this tool to simplify API interactions in the terminal.

Check it out and let me know what you think!

here github link :

https://github.com/samunderSingh12/cutieAPI.git

/r/Python
https://redd.it/1kie6tn
Looking for Full Stack Django Engineer (Django/Angular)

I work for a large public sector software company and I am looking to hire a full-time Django full stack engineer (US citizens only due to security compliance for some of the data we deal with). We are deciding between Django or .NET for the backend, and it will largely be dependent on the best resource we find and their skill set. On the frontend, we are are planning to use Angular (to be consistent with our other applications).

I have hired two other Django developers that I found through this subreddit in the past, and they both have been awesome, so hoping for a similar experience again.

The job is located in College Station, TX. In a perfect world, the candidate we choose would be close to this location, but I am open to hiring a remote resource if we can't find the right person close (some travel will be required, especially at the beginning if this is the case). The primary reason we would like the resource to be close is that they will need to work with the existing product team to understand the existing product in order to build automation and tooling to simplify the configuration and deployment

/r/django
https://redd.it/1kii3az
JetBrains will no longer provide binary builds of PyCharm Community Edition after version 2025.2

As the title says, PyCharm Community Edition will only be available in source code form after version 2025.2

Users will be forced to build PyCharm Community Edition from source or switch to the proprietary Unified edition of PyCharm.

https://www.jetbrains.com/help/pycharm/unified-pycharm.html#next-steps

/r/Python
https://redd.it/1kitdld
I made a Vim Game in Python

I made a vim game in python using pygame. I would describe it as if Letter Invaders from Typing Tutor 7 had vim motions. It is in the early stages of development, so please go easy in the comments.

\#What My Project Does

It is a vim game in pygame designed to help the user build up speed and familiarity with the vim motions

\#Target Audience

People who use vim and want to become fast with the motions

\#Comparison

Alternative games include VimBeGood and Golf.Vim. This is closer to VimBeGood, in that it focuses on building up speed, rather than giving the user a single puzzle to study.

\# Repo

https://github.com/RaphaelKMandel/chronicles-of-vimia

/r/Python
https://redd.it/1kiseo7
How to deploy?

Hello guys !! Iam new to flask , learnt and made a small application using flask , HTML , CSS , JS . Iam not understanding how to deploy it? . Iam from MERN stack background . I use vercel , netlify , firebase more to deploy those . But iam stuck with flask deployment . Can anyone help me out?

/r/flask
https://redd.it/1kiozil
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/1kix1lf
What's New in Wagtail is NEXT week!

/r/django
https://redd.it/1khxegv
I uploaded my flask app in a shared hosting with cpanel, but getting 404 error

I uploaded my flask app and install that app as a package. I have no terminal access beacuse of shared hosting. All i can do is run script through cpanel run-script interface.

if i include blueprint or routing in __init__.py, at the root of the package where passenger_wsgi.py located all routing works without any error. But if i have routing or blueprints in app.py, even in that same directory, i get 404 error.

what is the solution, is there will be any problem if i use __init__.py
thanks in advance.

/r/flask
https://redd.it/1kizc3x
Kamal deploy makes database upgrades effortless.

/r/django
https://redd.it/1kj6xkj
D Best Way to Incorporate Edge Scores into Transformer After GNN?

Hi everyone,

I’m working on a social recommendation system using GNNs for link prediction. I want to add a Transformer after the GNN to refine embeddings and include score ratings (edge features).

I haven’t found papers that show how to pass score ratings into the Transformer. Some mention projecting the scalar into an embedding. Does adding the score rating or the relation scalar is not recommended ?

Has anyone dealt with this before please?

/r/MachineLearning
https://redd.it/1kj7ylw
🚀 I Built a Django App to Track Income, Expenses, Crypto & Bank Accounts – Django Income Tracking

# Hey everyone!

I'm excited to share a personal project I've been working on: **Django Income Tracking** – a web app built with Django to help you get a comprehensive overview of your finances.


Check out how it looks here -> [https://www.youtube.com/watch?v=piMv2jAwbo8](https://www.youtube.com/watch?v=piMv2jAwbo8)

Get the code here -> [https://github.com/vic-cieslak/portfolio-income-manager](https://github.com/vic-cieslak/portfolio-income-manager)

Let me know what you think! No strings attached ;p



# 💼 What can it do?

* **Track Income**: Log income from multiple sources, categorize it, and calculate totals based on hourly rates.
* **Manage Expenses**: Track and categorize your spending to stay on top of your budget.
* **Oversee Your Portfolio**: Monitor cryptocurrency investments (real-time prices via CoinGecko) and bank account balances.
* **Interactive Dashboard**: View your net worth, monthly summaries, portfolio breakdowns, and recent transactions – all visualized with dynamic charts.
* **User Settings**: Personalize your experience (currency preferences coming soon!).
* **Modern UI**: Cyberpunk-inspired, responsive design for both desktop and mobile.

# 🛠 Tech Stack

* **Backend**: Django, Python
* **Frontend**: HTML, CSS, JavaScript, Bootstrap 5
* **Database**: SQLite (default)
* **Charts**: Chart.js
* **Package Management**: Poetry

I built this to manage my own finances in one place and decided to share it with the community. It’s still evolving, with future features planned like advanced forecasting and client management.

The [`README.md`](http://README.md) includes full feature descriptions and

/r/django
https://redd.it/1kj9a50
Is there any huge diference between django 4 and 5?

Hello, I've just started learning django and I was looking for books to get deeper, and the question remains is, is there any huge diference between django 4 and 5, because all the books I've got is for django 4.

/r/djangolearning
https://redd.it/1kh75fp
I fully developed and deployed my first website!

\# What My Project Does

I've been learning to code for a few years now but all projects I've developed have either been too inconsequential or abandoned. That changed a few months back when a relative asked me to help him make a portfolio. I had three ways of going about it.

1. Make the project completely static and hard code every message and image in the HTML.
2. Use WordPress.
3. Fully develop it from scratch.

I decided to go with option 3 for three main reasons, making it fully static means every change they want to make to the site they would need me, WordPress would have been nice but the plugins ecosystem seemed way too expensive for the budget we were working with, and making it from scratch also means portfolio for myself so we both get a benefit out of it.

The website is an Interior Design portfolio. Content-wise it isn't too demanding, just images and text related to those images. The biggest issue came from making it fully editable, I had to develop an editor from scratch and it's the main reason I don't want to touch CSS ever again 😛.

The full stack is as follows. Everything is dockerized and put

/r/Python
https://redd.it/1kjdt6n
No matter what i do, database record will not update while testing.

Hi, I'm trying to develop a simple crud app where user can save their contacts. Using django and htmx.

Naturally there must be a view to edit individual contacts. So the view works fine. Upon click, a htmx request is sent, a modal shows that will be populated with a form, and the form itself is prepopulated with that specific record data.

Upon submitting, a htmx post request is sent, record is updated, i trigger an event (using HX-Trigger) to clean up the form, close the modal, and refresh the table.

Everything is OK so far.

The problem is when i try to test this view. Using pytest (for fixtures) and pytest-django (for database access). The status code will return 200, but the record itself will NOT update (i check the record before and after the request).

Here is the code:

View (Contact is my model):

@loginrequired
def contact
edit(request: HttpRequest, pk: int) -> HttpResponse:
    context = {}
    try:
        item = Contact.objects.get(pk=pk)
        if item.user != request.user:
            raise Contact.DoesNotExist("Such

/r/django
https://redd.it/1kjimw2
are non-SPA websites outdated?

I am learning django, fairly new, developing a big project right now slowly to put on my resume and as a hobby in general, i have notice that to make the user experience smoother and to beat the dull atmosphere i'd need to incorporate alot of JS that i have never used, i've actually never touched js code which makes me intimidated by web development now, my question i guess is are non-SPA websites still fine where you wouldnt have all these cool transitions in the website and instead have a bunch of pages linking to each other and whatnot, because i dont want to rely on chatgpt to give me js code that i cant even read and put on a passion project.

/r/django
https://redd.it/1kj5x0i
fastAPI & flask

Has anyone ever built an end-to-end web app using fastAPI(to build the APIs) and flask(for the templates, ie frontend)?

I was wondering how this even looks like in practice. Say you're using the create app factory-blueprint method for your flask side. You need to register routes and all that stuff. How will you tie this to your API that uses fastAPI?
Putting a reverse proxy like caddy further complicates things(I think). Do you run the fastAPI app and the flask app separately??

I understand that you can technically build everything using fastAPI as it supports templating using Jinja. But I'm just wondering if fastAPI and flask is even possible.

/r/flask
https://redd.it/1kjmdlp
Bootstrap 5 + Jinja + Forms

Can somebody recommend any decent library / macro set that will render Django form in jinja templates ? I don’t want to reinvent the wheel…

/r/django
https://redd.it/1kjbr9r
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/1kjnxrz
Announcing Traeger 0.2.0, now with Rust bindings (and Python and Go).

Traeger is a portable Actor System written in C++ 17 with bindings for Python, Go and now Rust.

https://github.com/tigrux/traeger

The notable feature since version 0.1.0 is that it now provides bindings for Rust.

The Quickstart has been updated to show examples in the supported languages.

https://github.com/tigrux/traeger?tab=readme-ov-file#quick-start

For version 0.3.0 the plan is to provide support for loadable modules i.e. to instantiate actors from shared objects.

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