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
Django AI Assistant - Open-source Lib Launch

Hey folks, we’ve just launched an open-source library called Django AI Assistant, and we’d love your feedback!

What It Does:

* **Function/Tool Calling**: Simplifies complex AI implementations with easy-to-use Python classes
* **Retrieval-Augmented Generation**: Enhance AI functionalities efficiently.
* **Full Django Integration**: AI can access databases, check permissions, send emails, manage media files, and call external APIs effortlessly.

How You Can Help:

1. Try It: [https://github.com/vintasoftware/django-ai-assistant/](https://github.com/vintasoftware/django-ai-assistant/)
2. ▶️ [Watch the Demo](https://www.youtube.com/watch?v=bSJv4OIKLog&ab_channel=VintaSoftware)
3. 📖 [Read the Docs](https://vintasoftware.github.io/django-ai-assistant/latest/get-started/)
4. Test It & Break Things: Integrate it, experiment, and see what works (and what doesn’t).
5. Give Feedback: Drop your thoughts here or on our GitHub issues page.

Your input will help us make this lib better for everyone. Thanks!

/r/djangolearning
https://redd.it/1dw6i4z
I made this using DRF and React

I build a canine blog site using DRF and React as front-end. If you guys have some spare time, can you guys give me some feedback on my project? Any feedback will be greatly appreciated. Thank you. Here are the back-end and front-end code. And here is the project at Netlify. Here are the test username and password: test_user, Canineblog123

/r/djangolearning
https://redd.it/1dw2jtp
New to the web building community - need some advice

Hey Django community!

I'm new to the web building community but not entirely alien to programming. Though, having said that, my experience lies in SQL and SAS.

Can someone advice on the benefits of Django as compared to Flask if I want to build a website for price comparison?

I have an idea where users can compare prices and make the best decision for their purchase.

Read up on the benefits of flask and Django but I am not from a computer science background so I can be quite illiterate to the technical jargons.

Would appreciate if anyone could dumb it down for me and advice me on flask or Django for a "Price Comparison" website!

Thank u!

/r/django
https://redd.it/1dwkyqr
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/1dwcc4t
I'm a Python Backend Developer, How to Create a Modern and Fast Frontend?

Hi everyone,

I'm a backend developer working with Python and I'm looking for a simple and quick way to create a modern and clean frontend (web app) for my Python APIs.

I've been learning Next.js, but I find it a bit difficult and perhaps overkill for what I need.

Are there any tools or platforms for creating simple and modern web apps?
Has anyone else been in the same situation? How did you resolve it?
Do you know of any resources or websites for designing Next.js components without having to build them from scratch?

Thanks in advance for your opinions and recommendations!

/r/Python
https://redd.it/1dwf2sh
Scope Boundaries for Notebooks — Research Study on an extension I've been developing

Hi Everyone. My name is Eric Rawn. I’m a PhD student at UC Berkeley working with my advisor Professor Sarah Chasins. I research how to make notebook programming environments better, and have been working on an extension for notebooks which introduces scope boundaries to collections of cells. We think this might help programmers avoid some of the pain points with notebooks, but we won’t know until we study its use in the real world. The goal is to make it easier to keep variables tidy within a notebook without requiring programmers to change how they like to use notebooks. We’re interested in evaluating how our extension aids how real users program (you all!), and so we’re running a 4-6 week study with folks who use Jupyter notebooks regularly in their everyday programming.

The extension will log some usage data locally on your machine, which you'll send to me at the end of the study. We'll then spend about an hour chatting about your experience, the kind of work you do daily, how you use notebooks, and any other thoughts or feedback you have. Participants will be compensated for their time spent interviewing, at $30/hour. The consent form has detailed information about the

/r/JupyterNotebooks
https://redd.it/1dwbgqr
App 100% python with django. What python frontend can I use?

Hi,
I'm currently using flask + dash bootstrap components for my app.
I'm looking for a 100% python frontend (no react, vue etc).
Any suggestions?

/r/django
https://redd.it/1dwnf3p
Shed Skin restricted-Python-to-C++-compiler 0.9.9

I have just released version 0.9.9 of Shed Skin, a restricted-Python-to-C++ compiler. It comes with a whole host of small improvements, and also a nice new (constructive solid geometry) example, which becomes about 15 times faster on my system (not 15%.. 15 times!).

If you think this is a cool project, please consider helping out. There is always enough work (low-hanging fruit even) on both the Python and C++ side.

/r/Python
https://redd.it/1dwkz20
zealot: prevent N+1 queries in Django

hey everyone!

i just released zealot, a library for detecting N+1 queries in your Django project.

i've wanted something like this for a long time. there are some similar libraries out there, but none of them did everything i wanted, and the most popular would miss certain types of N+1.

zealot is pretty simply: install it, and it'll raise an exception (or log a warning) whenever it detects an N+1 query, with a helpful error message so you can fix it and be on your way.

all feedback is very welcome!

/r/django
https://redd.it/1dwvpjo
Tango with Django

I cant buy tango with Django 2023 version, but i got access to 2017 version of the book. Can i read and do django for this or is there any major difference to the both. (I am a initial learner of django)

/r/djangolearning
https://redd.it/1dvbjoa
I made a Python library to plot chemical trends | Plotium

# What does my Project do?

Plotium is a python library used to plot chemical trends like Atomic radii, Electronegativity, etc of specific parts of the periodic table, like types of elements, group or a specific block.

Right now, Plotium can plot trends of:

1. Electronegativity

2. Density

3. Atomic Radii

4. Melting Point

5. Boiling Point



Divided into:

1. Block Wise (S,P,D,F)

2. Types (Actinoids, Lanthanoids, etc)

3. Groups (1 - 18)

# Target Audience

Students/people who love chemistry. This library will also be useful for teaching students several exceptions and trends.

# Comparison

I haven't seen any trend plotter other than one hotmap plotter. But what I'm aiming is graphing these trends.

# GitHub

GitHub Link: https://github.com/rohankishore/Plotium

/r/Python
https://redd.it/1dwy0bg
Do not know how to speedup your code? Just distribute!

Hi all!

I have created just-distribute package aimed mainly at those at the beginning of their Python journey, but it may be handy also for advanced users.

pip install just-distribute

https://github.com/jakubgajski/just\_distribute

It is basically wrapping up popular libraries / approaches to speeding up code into one handy decorator \\@distribute.

I would appreciate any suggestions and feedback! Hope it will help someone :)

/r/Python
https://redd.it/1dwzx4j
Ultimate SQL Learning Resource: Case Studies, Projects, and Platform Solutions in One Place!

Hi everyone !!

Check out Faizan's SQL Portfolio on GitHub! 🚀

This comprehensive resource includes:

Case Studies: Real-world scenarios from Danny Ma's 8 Week SQL Challenge.
Platform Solutions: SQL problems & solutions from 7 different platforms including DataLemur, Leetcode, Hackerrank, Stratascratch and more.
Projects: Detailed SQL projects with data analysis techniques.
Resources: List of compiled SQL resources from different channels like YT, Books, Tutorials etc.

and much more!!

Perfect for students and professionals to enhance their SQL skills through practical applications. Explore, learn, and improve your SQL expertise!

🔗 https://github.com/faizanxmulla/sql-portfolio

Thank you so much for considering! If you would like to connect, feel free to reach out to me on LinkedIn.

Happy learning! 

/r/flask
https://redd.it/1dwq55m
Flask authentication and clean architecture

I am a beginner with flask. I am receiving auth token from a flutter firebase setup using google sso login. How to get the data encrypted using secret key in flask app. I am actually looking for good coding practices (clean architecture) developer uses generally on flask apps.

/r/flask
https://redd.it/1dx3v9j
Does anyone know of an extension that will auto create a client class for all my endpoints?

Say I’m using DRF with a bunch of model viewsets. I have a swagger gen extension but is there one that will collect all those same endpoints and create a Python class or file containing all of them? Like using requests or urllib or something like that and have all the endpoints auto implemented for you? I’m sure it’s possible (and opinionated) just haven’t come across anything I’m aware of or could find on google.

/r/django
https://redd.it/1dx33uk
Django cache does not support hash(redis)

I am studying django and i just learned that django's build in cache framework DOES NOT support redis's hash.

Is it strange? for such a mature framework but its built in cache does not support in-memory database's hash? i asked chatgpt and they confirmed it.

I manually created my own function that uses the built in cache.set and put a json.dumps(dict) in it and in my redis GUI it still shows up under the string. I am worried that my own custom function may not be as efficient as the redis's hash since its really considered as a string. Is it advisable to put a dict as string or should i just opt out of the django cache and use a third party library to handle redis?

/r/django
https://redd.it/1dwthj6
Migration issue after Wagtail Update

I have updated Wagtail from 5.2.2 to 6.1.2 and it's telling me that I need to run migrate. When I do I get the below error.

django.db.utils.OperationalError: (3821, "Check constraint 'permission_or_permission_type_not_null' is not found in the table.")

I have no idea how to fix this.

I updated Wagtail with pip install -upgrade wagtail

/r/django
https://redd.it/1dx9fia
Experienced django dev looking for opportunities

Hello everyone,
As mentioned in the title, I’m a software developer with good experience in Django, used it professionally for 3 year and also used it before that during my college for some projects. I’ve also answered queries on this community whenever I could. Now I’m looking for new opportunities, I’ve used Django with react and have good understanding of both, I do not want to limit myself to a specific stack because I’m also eager to learn new technologies. That said if any of you are looking to hire someone with this skill set and experience then please reach out

/r/django
https://redd.it/1dwst1j
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/1dx3ae2