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
Displaying HTTP response code in Jinja

I want to display the response code sent from my Flask backend (e.g. 400 200 201 etc.) in Jinja - how can I access this?

/r/flask
https://redd.it/1hgg9uf
What features should all flask apps have?

I've been programming for about a year and a half now and built a small flask app to manage my music business. Basically a management application with some API integration and sqlalchemy. The app now works fine and is stable, but I'm wondering if there are any features/functions/etc. that all flask apps should have implemented, that don't seem obvious to a beginner like me. Cybersecurity and complex algorhithms still go a bit beyond my understanding, but I wanna make my app as secure, stable and reliable as possible.

/r/flask
https://redd.it/1hgfd8y
Spotify data visualizations

* **What My Project Does**

My project offers a visualization of spotify data through a web application.

* **Target Audience**

The project is aimed at anyone who uses Spotify and likes music

* **Comparison**

My project is different from a classic Spotify wrapped because it offers new features, is interactive and allows you to select the period of interest. Plus you can watch it more than once a year :)


Feel free to give me suggestions with pull requests and issues as I plan to expand the project further. [Github](https://github.com/marcobadiello/Esame-Sistemi-2.git)

/r/Python
https://redd.it/1hgn2bu
Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1hgon88
I built web app using Django!

Hello everyone 👋,

I just wanted to show off a web app I made using Django. Outside of tutorial projects, this is my first official project. It's called Salted Vanilla and it's a scented candle cataloging web app.

I used this tutorial by Kostja to start the project and I built from there. I'm using Appliku to deploy on AWS Lightsail. I used ChatGPT to help with model structure and relationships. I am using Django templates, a little Bootstrap, and most recently Bootstrap Studio for the front end.


Here is the git repo


Here is a video demo you can check out


If you have any critiques on structure or anything, please let me know!

/r/django
https://redd.it/1hgh025
Where to store passwords in production

Hello everyone. I have a flask app i want to deploy on pythonanywhere. In my app i have a function that sends an email and i need to store a password for the email that is a sender. My question is how do i store that password safely when deployed so that i cant be viewed. Also would appreciate if anyone can suggest any other sites for deployment of flask apps. Thanks

/r/flask
https://redd.it/1hgycgl
D Best survey papers of 2024?

As an AI researcher who is starting out, I usually start by seeing survey papers related to a field, then creating a roadmap to further deep dive into my research topic. I am eager to see the sub's viewpoint of the best survey papers they came across in 2024.

/r/MachineLearning
https://redd.it/1hgwjqu
Django reaches its 2024 fundraising goal 🌈🎉

/r/django
https://redd.it/1hh1zjq
Benchmark library that uses PostgreSQL

I am writing an open-source library that simplifies CRUD operations for PostgreSQL. The most similar library would be SQLAlchemy Core.

I plan to benchmark my library against SQLAlchemy ORM, SQLAlchemy Core, and SQLModel. I am unsure about the setup. I have the following considerations:

\- Local DB vs Remote DB. Or both?
\- My library depends on psycopg. Should I only use psycopg for the others?
\- Which test cases should I cover?
\- My library integrates pydantic / msgspec for serialisation and validation. What' the best practice for SQLAlchemy here? Do I need other libraries?

What are your opinions. Do you maybe have some good guidelines or examples?

My library is not yet released but quite stable. You can find more details here:
Github: https://github.com/dakivara/pgcrud
Docs: https://pgcrud.com

/r/Python
https://redd.it/1hh4s52
Rest GET api deployed in flask+gunicorn giving 404 error

I have deployed a REST GET api in my development environment using gunicorn+flask on linux. However, I'm getting 404 error. This api used to work in the same environment before but now started getting 404. I checked the code and the url map as well in my flask app and this api is listed there. Any ideas how to troubleshoot this thing.

/r/flask
https://redd.it/1hh4srh
Deployed my basic app to Render but CSS isn’t working

I have “django-tailwind” installed in my project the theme name is “theme”

I ran collect static and pushed to git. When I run gunicorn on my local machine after collecting static it worked.


My images shows up, but my tailwind css isn’t showing.

/r/djangolearning
https://redd.it/1hhidrx
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/1hhfmi6
I made a step-by-step tutorial on setting up JWT authentication with HttpOnly cookies using Django and Next.js

This is my second DRF JWT authentication tutorial. I made it because, after my first tutorial, where tokens were stored in local storage, I was asked for an httpOnly cookies implementation and for more detailed explanations for each step.

In this tutorial, I tried to keep things simple; I didn’t add too many custom features. Instead, I focused on explaining the process as I coded, while trying not to be too boring.

Here’s the link:
https://youtu.be/TS1v\_-ppICk

I really hope you find it helpful! Feel free to let me know your thoughts or if you have any suggestions!

/r/django
https://redd.it/1hhc7vp
Implementing Retrieval-Augmented Generation with LangChain, Pgvector and OpenAI

https://www.codemancers.com/blog/2024-10-24-rag-with-langchain/?utm\_source=Social+media&utm\_medium=reddit

/r/Python
https://redd.it/1hhlg8x
I made an open source, self hostable, AI meeting Copilot

Hey Everyone 👋

I recently built **Amurex**, a self-hosted AI meeting copilot that actually works:

**What My Project Does**

Amurex is a self-hosted AI meeting copilot that:

* Records meetings seamlessly (no bot interruptions).
* Delivers accurate transcripts instantly.
* Drafts follow-up emails automatically.
* Keeps a memory of past meetings for easy context.
* Provides **real-time engagement suggestions** during boring meetings (unique feature!).

It’s open source, self-hosted, and ensures full data privacy with no subscriptions or vendor lock-in. And of course, it uses [Robyn](https://github.com/sparckles/Robyn) as the backend ;)

**Target Audience**

Perfect for professionals, privacy-conscious users, and open-source enthusiasts who want smarter meeting tools.

**Comparison**

|**Feature**|**Amurex**|**Others**|
|:-|:-|:-|
|Real-Time Suggestions|Yes|No|
|Seamless Recording|Yes|Bot interruptions|
|Self-Hosted Privacy|Full control|Third-party servers|

**GitHub**: [https://github.com/thepersonalaicompany/amurex](https://github.com/thepersonalaicompany/amurex)
**Website**: [https://www.amurex.ai/](https://www.amurex.ai/)

Would love to know what you all think of it. 😊

/r/Python
https://redd.it/1hh89i3
How to Set Up a Django Frontend: A Complete Tutorial

Today, I shared a guide on setting up the Django frontend, diving into file structure, static files, and how to integrate them seamlessly.

* **Blog Link :** [How to Set Up a Django Frontend: A Complete Tutorial](https://django-learning.hashnode.dev/how-to-set-up-a-django-frontend-a-complete-tutorial)

This blog builds on the previous one, where we explored Django Admin and Models, including tips on creating classes and using foreign keys effectively.

* **Previous Blog Link** : [How to Use Django Admin and Models: A Beginner’s Guide](https://django-learning.hashnode.dev/how-to-use-django-admin-and-models-a-beginners-guide)
* **First Blog Link :** [Getting Started with Django: Basic Setup and Overview](https://django-learning.hashnode.dev/django-setup-and-basic-overview)

Give it a read and let me know your thoughts in the comments! 💬 Your feedback helps me make these guides even better! 😊

/r/django
https://redd.it/1hhop30
Modern JS in Django

I would like to know how you all handle modern js in your django projects, stuff like installing third-party package, usage of bundlers or no build approach. I wanna improve my DX, so I interested on how other django dev do

/r/django
https://redd.it/1hhqdd6
JH container shows regular CPU spikes even when no clients are connected: normal behavior?

I'm running the JupyterHub single-user image and noticing spikes in CPU usage ever ~30s or so

Is this normal for JH? Looking at the output of top in the container shows the python3 process is being called periodically. Any thoughts on how I can troubleshoot this assuming it's not normal behavior? Thanks.

/r/IPython
https://redd.it/1hhvom8