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
Cool services you've made with FastAPI

Hey Everyone, I was just wondering what kind of cool projects people have made using FastAPI? What did you like about the framework and what did you dislike? Is FastAPI used a lot with ML models or computer vision services. Would love to hear your experiences and projects!

/r/Python
https://redd.it/1eeeoti
I built an e-commerce site

I built an e-commerce site. If you guys have some spare time, can you guys test out my site and give me some feedback, please? Any feedback will be greatly appreciated. Thank you very much. Here is the site at Pythonanywhere Here is the username and password: new_user1, testuser123

/r/djangolearning
https://redd.it/1ee9cwd
Giving the option to the user of allowing concurrent login

Hi there,
i am new to django. I implemented the disabling of concurrent login on the same account using different devices by the use of sessions.
So i thought of why not letting the user itself decide if he wants to allow concurrent login or not.

I tried searching for solutions to this but my search was fruitless.
Any help is appreciated !

/r/djangolearning
https://redd.it/1edpig2
Running Background Tasks in Production (Azure Web App)


 have a Django backend project in which i use django-background-tasks to send scheduled emails in the background , in development environment i need a second terminal running the command :
python manage.py process_tasks

now for the production environment i hosted the backend on azure web app and tried the approach of

supervisor (http://supervisord.org/configuration.html) creating a conf file that gets executed on the server but for now i have to manually connect to the server via ssh and run this file the whole point of using the module is to automate this part yet it doesn't seem to work

https://preview.redd.it/sb0urf0232fd1.png?width=833&format=png&auto=webp&s=076055d0f2ad8ea6f9786604aa31d031ef2f7528

also tried to add to the deployment workflow this part :

- name: Set up Supervisor
        run: |
          # Install Supervisor
          pip install supervisor
          # Create logs directory if it doesn't exist
          mkdir -p logs
          chmod 666 logs
          # Start Supervisor
         

/r/djangolearning
https://redd.it/1edfdu1
This media is not supported in your browser
VIEW IN TELEGRAM
My first flask app, got popular on Instagram (2m views, 50k+ users) what do you all think?

https://redd.it/1eelt6t
@pythondaily
Starting a new django job tomorrow

what should I know? what its a must to study?

context: I have only basic notions of this framework, like already build a simple CRUD and thats all. even tho the company selected me because because, I dont really know why but they liked me, but its the only tech of the company Im not very familiar. Im very nervous

/r/django
https://redd.it/1eepb7o
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/1eellgu
What benefit do PostgreSQL connection pools offer over CONNMAXAGE ?

Django 5.1 has psycopg connection pool support: https://docs.djangoproject.com/en/5.1/releases/5.1/#postgresql-connection-pools

How exactly is this different from the existing CONNMAXAGE setting which I assumed was using persistent connection pools already.

/r/django
https://redd.it/1eet0bl
Thoughts on using Figma/Webflow with FastAPI


I dislike working on the front-end. I plan to use Figma exports or Webflow for the front end of my project. Is it sufficient to use FastAPI with Jinja templates for optimal performance?

/r/Python
https://redd.it/1eeqqtq
I created a command line tool using Python and Ollama to automatically create PRs on GitHub

Hey everybody!

# What My Project Does

I created this command line tool called jit that analyses your diffs and commit messages to generate a pull request description (based on your project's PR template if it has one) and then creates a pull request on GitHub (draft by default) using GitHub CLI.

# Target Audience

This tool is meant for developers that use GitHub. Mostly meant for hobby projects, but if you want you can use it on a production project (for work/clients) because:

* it utilizes a local LLM (no sharing your code to 3rd party APIs)
* The pull requests follow the template specified in your repository
* The pull request is marked as draft by default

# Comparison

I have not found any cli tools that do this in this manner. But I think GitHub's Copilot for Pull Requests will certainly generate better descriptions: [https://githubnext.com/projects/copilot-for-pull-requests/](https://githubnext.com/projects/copilot-for-pull-requests/)

# More about me and jit

I am predominantly a full-stack web developer (React, NestJS) for my job, but I love playing around with Python and other things. I have developed this using Python and Ollama with llama3.

I have been using jit almost every day, for about a month now, and it has made such a big difference in my day-to-day as a

/r/Python
https://redd.it/1eehm1a
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/1ee9dra
Django boilerplate
http://www.djangoship.com

/r/djangolearning
https://redd.it/1edpjxn
How long would it take to switch from SQLite to SQL?

Going from non prod to prod soon.

Also, anyone know how long it takes to implement google login? So users can click sign in with google etc

Thanks!!

(I am on azure)

/r/django
https://redd.it/1eexzx3
Do you feel like Python's type hinting got "stable"?

Basically the title.

I was reading through [https://docs.python.org/3.13/library/typing.html](https://docs.python.org/3.13/library/typing.html) and noticed that quite a lot happened over the last few years. Doing a text search for `deprecated since version x` with `x` being one of `3.9` to `3.13` I found these according numbers of occurrences:

* `3.9` -> 37
* `3.10` -> 0
* `3.11` -> 1
* `3.12` -> 3
* `3.13` -> 5

Which makes me question how "stable" Python type hinting has become these days. Do you think that there are still rough edges that need major overhauls or is Python 3.13 actually mostly where we need it to be in order to productively use static typing?

/r/Python
https://redd.it/1ef1ym0
Is django (+ htmx) the right thing for me?

Hi everybody!

I'm coming from the data science python path. Long time ago I learned html and css - builded some static websites while studying but never got really into it - a little bit of bootstrap, jquery or wordpress on top was all I needed.

Now I want to build a website where different users can access different dashboards. After processing the data from different sources, it will be stored in a postgres database from where I want to access the data with django and build some dashboards for different use cases and users.

Furthermore I want to create some questionnaires where users have to log in and answer in predefined intervalls and store these values in my database too.

Most of my visualizations I do with matplotlib, seaborn and vega-altair in streamlit apps for now, but I don't like being limited by streamlit anymore. And my projects are getting bigger.

So I am searching a framework to learn which meets my needs.

Can you recommend django + htmx to me in good conscience?

Should I take the effort and learn a javascript framework?

Thank you for your thoughts!

/r/django
https://redd.it/1ef5zyw
🐶 immunipy: Find vulnerable dependencies in your Python projects

# What My Project Does

I've created immunipy a Python SCA tool that acts as a watchdog, keeping an eye out for security vulnerabilities and reporting them promptly, written in Rust. immunipy will scan your requirements.txt or poetry.lock files and search for existing vulnerabilities in your dependencies, if any of your dependencies is reported as vulnerable then you will get the information, such as: package, version, fixed version (if exists), vuln id, aliases and the location.

It's easy to use and is really fast, all the vulnerabilities are reported in real time.

# Target Audience

I think that immunipy is useful for every project, specially the production ready ones, due that every time that you run it you will get an instant scan of your dependencies.

# Comparison

It's easy to use, just pip install immunipy and you can run it! Also, you can add it in your CI/CD pipeline and run it regularly, this is useful if you want to keep your projects free of vulnerable dependencies.

/r/Python
https://redd.it/1ef02hg
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/1eff15m
How to Edit DOCX Documents on the Fly Using Flask?

Hi everyone,

I'm currently working on a Flask application and need to edit DOCX format documents on the fly. Has anyone done this before? If so, could you point me to any source code or libraries that can help with this?

Thanks in advance! ☺️

/r/flask
https://redd.it/1efhsde
Spotify Route isnt working

I have been working on my Spotify Player Project with React and Flask when all of a sudden my route for playlist retrieval stops working and all of my other routes remain fine. I didn't touch it or anything it just broke all of a sudden if anyone could offer any help it would be much appreciated. https://github.com/00fff/SoundLink

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