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
Tinyprogress 1.0.1 released

# What My Project Does:

It is a lightweight console progress bar that weighs only 1.21KB.

# What Problem Does It Solve?

It aims to reduce the dependency size in certain programs.

# Comparison with Other Available Modules for This Function:

* **progress** \- 8.4KB
* **progressbar** \- 21.88KB
* **tinyprogress** \- 1.21KB

# GitHub and PyPI:

Check out the project on GitHub for full documentation:
[https://github.com/croketillo/tinyprogress](https://github.com/croketillo/tinyprogress)

Available on PyPI:
[https://pypi.org/project/tinyprogress/](https://pypi.org/project/tinyprogress/)

# Target Audience:

Python developers looking for lightweight dependencies.

/r/Python
https://redd.it/1ivclq9
Pixerise v0.12 Released: Introducing Ray Casting and Improved Rendering Features

The release v0.12 is out!

Pixerise is a high-performance 3D software renderer implemented in Python. Designed for educational purposes and systems without GPU access, Pixerise provides a complete CPU-based rendering pipeline optimized with NumPy and Numba JIT compilation:

https://github.com/enricostara/pixerise

This version introduces some major improvements and new features:

New Features: 

 Ray Casting \- Precise 3D object selection with mouse interaction

🎨 Group Colors \- Assign and manage colors for model groups

👁️ Visibility Toggles \- Right-click to show/hide model groups

Performance: 

1/z depth interpolation for more accurate triangle rasterization

🎯 Optimized ray casting with bounding sphere culling

Developer Experience: 

🧹 Implemented Ruff for code formatting

📚 Improved documentation with architecture diagrams and API docs

/r/Python
https://redd.it/1ivdslk
My Ever-Expanding Python & Django Notes

Hey everyone! 👋

I wanted to share a project I've been working on: **Code-Memo** – a personal collection of coding notes. This is NOT a structured learning resource or a tutorial site but more of a living reference where I document everything I know (and continue to learn) about Python, Django, Linux, AWS, and more.

Some pages:
📌 **Python Notes**
📌 **Django Notes**

The goal is simple: collect knowledge, organize it, and keep expanding. It will never be "finished" because I’m always adding new things as I go. If you're a Python/Django developer, you might find something useful in there—or even better, you might have suggestions for things to add!

Would love to hear your thoughts.

/r/djangolearning
https://redd.it/1itzsds
Hello, I made a small webapp with Streamlit, FastAPI and docker to convert my images to PDFs

Hi!

I started my self-hosted journey a couple of days ago, and this is my first webapp in a docker container.
It converts images to PDFs and merge PDFs together based on existing libraries.

It taught me how to use FastApi with streamlit, and how to make them speak to each other with docker. I hope it can help you too! ;)

https://github.com/LittleYellowPanda/MakeItPrivate.git

If you have any questions, or advice, feel free to comment!



/r/Python
https://redd.it/1iuy6kg
NEW! Time travel debugger for python

Hello everybody,

Recently I have been working on a time travel debugger for python that has VS code integration out of the box. I plan on posting a few demos here before production, and would appreciate any constructive criticism on it.

The main features include:

* Take a full trace of the program by vscode
* Control trace position using timline
* Taint analysis - track variable value history


I was also wondering whether you have some suggestions for features for the product. Also, if you need early access to it, please do let me know and I'll see what I can do, mention your use case and what were you trying to achieve with the product.

I will appreciate any suggestions!

/r/Python
https://redd.it/1iurwd3
Pykomodo – A Parallel Code Chunker

What My Project Does
pykomodo is a Python-based tool that parallelizes code chunking for large codebases. It supports both traditional line-based splitting and an AST-based “semantic” approach for .py files—so top-level functions and classes don’t get split across multiple chunks. When i made pykomodo a while back, this feature was still in the works.

What Problem Does It Solve?
When dealing with huge repositories (especially if you’re feeding them into large language models or other analysis), it’s helpful to chunk the files into more manageable pieces.

Comparison With Other Available Chunkers

repomix: Another open-source code chunker that focuses on certain features

GitHub and PyPI

GitHub: https://github.com/duriantaco/pykomodo
PyPI: [https://pypi.org/project/pykomodo/](https://pypi.org/project/pykomodo/)

Install with:

`pip install pykomodo==0.0.4`


Target Audience

Python developers who need to chunk large codebases for LLM input, archiving .. etc
Projects that want to preserve function/class blocks within Python files.

Additional Highlights

Semantic (AST-based) chunking for .py files (at least for now): big single functions remain un-split.
Dry-run mode: see which files would be chunked
Ignore/unignore patterns: skip entire folders like **/node_modules/** or re-include specific files.
Threaded chunking: speeds up scanning and file reading for large repos.
Enhanced chunker (optional) can remove redundancy or calculate relevance scores for LLM usage.

Feel free to

/r/Python
https://redd.it/1ivlrys
What are some of the challenges that you experience?

Keen to learn what pain points others experience when it comes to using Django for API development.

/r/django
https://redd.it/1ivto1r
Livedocs – a modern, real-time collaborative Python notebook. Improving ergonomics for Python

Hi everyone, we (me and two other Python/Rust/Typescript devs) just built a collaborative Python notebook. We built it from the ground up, but are still using Jupyter at the core, but stripped away everything else that slows it down. Livedocs lives in your browser, and lets you experiment in a notebook and share your work as an app.

Our plan is to make it the fastest, most ergonomic Python notebook around. A few things we’ve shipped:

Added lots of new cell types like charts, SQL (powered by DuckDB), tables, inputs, database saves, and even interacting with LLMs directly via a cell
Notebook is internally represented as a DAG, for reactivity 
Re-built most internals with rust
Added support for user-supplied secrets, built-in vars

We’re looking to improve the Python editing experience by connecting the editor to an LSP and adding AI generation to help produce code. 

We’re looking for feedback on the notebook from Pythonistas on the ergonomics of the notebook. We want to keep the experience as close to a local development environment as possible. 

/r/Python
https://redd.it/1ivt2df
Database Backup

What's your go-to solution for a Postgres database backup? I would like to explore some options, I am using docker compose to Postgres container and Django. I have mounted the Postgres data.

/r/django
https://redd.it/1ivr4r7
Django Background task library comparison

How does the following Background task queue library compare? I am looking at background/asynchronous task queue, orchestration of tasks ( kind of DAG, but not too complicated) and scheduling functionality. Monitoring would be nice, but not at the expense of running another service.

1. Celery based task queue with Flower monitoring, or Django built-in
2. django-q2 - It doesn't require another broker and uses django-ORM.
3. prefect - Originally written as ETL platform. But, it seems to work just fine for background tasks as well.
4. DEP 0014 proposed as one of the battery in Django, not released yet. Use django-tasks instead in the meanwhile
5. dramatiq

Does anyone has experience, It would be quite a task to try these out and write a Pro/Con so seeking community experience.

/r/django
https://redd.it/1ivu6ep
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/1ivwtvk
I wrote a faster alternative to autoenv

I got issues with autoenv that was too slow on my system so I wrote autoenv-rs

# What My Project Does

It works mostly like autoenv: overrides cd so that scripts stored in .env files are automatically sourced when moving through the file tree.

While it's a flexible tool, I mainly use it to activate and deactivate python virtualenvs.

# Target Audience

For bash shell users only.
If autoenv is too slow and you've been using it without configuration, you might like this.
It should run fine in your dev environement but don't use it in a production environment, it is not safe.

# Comparison

- faster than autoenv
- drop in replacement as long as you did change autoenv configuration
- adds cd -v argument to show which environments are sourced
- fixes some autoenv issues when sourcing environments of parent folders
- only supports bash, while autoenv supports multiple shells
- no authorization is asked to source .env files contrary to autoenv (might be dangerous)

/r/Python
https://redd.it/1iw14i7
Very small web server: SQLite or PostgreSQL?

Hi devs! :) I am trying to build a simple license server in Django with 2 goals: 1. create and manage license keys, 2. verify license keys of client apps. The project currently has 0 customers and will have max 50-100 customers (client apps) needing verification in \~2 years. The client app will verify license at a few points during its run (start of client app, random check or maybe when user will use an expensive feature like object detection task in my client app). My biggest challenge is not over-engineering things to keep it light, simple but production-ready (meaning actually using the system to verify user license info with basic security in mind).

In this case, would you recommend using SQLite or PostgreSQL? What would you say are the pros and cons?

More context: I am a beginner at Django. I have several years of data science experience in python. I have the client built in PySide6. I am planning to host the server on an affordable place. This is a fun project I do on the side, not my main job.

/r/django
https://redd.it/1ivvs5k
I made a Python app that turns your Figma design into code

🔗 Link — https://github.com/axorax/tkforge

# What My Project Does

TkForge is a Python app that allows you to turn your Figma design into Python tkinter code. So, you can make a GUI design in Figma and use specific names like "textbox", "circle", "image" and more for interactable elements then use TkForge to get the code for a fully functional working GUI app from your design.

And it's free, open-source and regularly maintained!

# Target Audience

TkForge is made for anyone who wants to make a GUI with Python easily and efficiently. It's fast and you can make some really complex and beautiful GUI's with it.

# Comparison

There's another project similar to TkForge called Tkinter Designer. Personally without being biased, I think TkForge is better. TkForge supports everything Tkinter Designer does and more. TkForge generates better code, supports more elements, allows you to add placeholder text (which you can't by default in tkinter), automatically sets foreground color and a lot more! Placeholder text and foreground color generation is a bit buggy though. I use TkForge for most of my tkinter projects. You can get help in the Discord server.

# Updates

I updated the app to support multiple frames, fixed a lot of previous bugs and added checks

/r/Python
https://redd.it/1iw3lnu
Are DataLemur Python Problems Enough for Data Science Interviews?

Hey everyone,

I recently started using DataLemur to learn SQL, and I have to say, it’s a great place for practicing! But I have a question regarding their Python problems—are they enough to prepare for a Data Science interview?

Or are there other good platforms where I can practice Python specifically for Data Science?

P.S. Please don’t mention LeetCode 😅

/r/Python
https://redd.it/1iw6ks8
Facing problem with sending JWT cookie to frontend

So, I have this login view,

     


@apiview(['POST'])
def login(request):
    username = request.data.get('username')
    password = request.data.get('password')


    user = authenticate(username=username, password=password)


    if user is not None:
        refresh = RefreshToken.for
user(user)


        response = Response({
            "user": {
                "id": user.id,
                "username": user.username,
                "email": user.email,
                "name": user.name  # Assuming your User model has 'name'
            },
            "success":

/r/django
https://redd.it/1iw7t5y
Learn concepts and ideas easily with my new web app

Hi guys,


Feel free to take a look at my new web app that is designed to help people quickly and easily understand concepts or terms that they hear.


Check it out at https://teachmelikefive.com/

thanks

/r/flask
https://redd.it/1iw8gds
I Built an Open-Source Algo Trading Framework for Instant Backtests & Live Deployment

Github : https://github.com/himanshu2406/Algo.Py

# What My Project Does

So I've been working on a framework made in Python that makes live trading incredibly easy, and even almost no-code !

It seamlessly integrates with any preset backtesting strategy, allowing you to take them straight to live trading with minimal effort.

Dashboard Overview : https://youtu.be/OmlaBnGcUi4?si=e1aizaIaYpRNMHFd

One-Click Backtest Deployment Overview : https://youtu.be/T\_otTHdLCCY?si=A7ujRzV6I5ESfgEQ

It's still in very early beta, but I’ve packed in as many functional features as possible, including:

# Key Features

Intuitive Dashboard
Easily backtest, view results, save and deploy in a single click.
Auto-Detects Your Strategy – If your function generates valid entry/exit signals, the framework will automatically detect and integrate it.
Scheduler for Automation – Run your entire pipeline at custom fixed intervals or specific times
Custom Data Layer (Finstore):
Stores and streams data using a Parquet-based data lake, making it much faster than traditional databases.
Multi-Broker Support – Execute across multiple brokers with real-time debug logs via Telegram.
End-to-End Pipelines – Effortlessly fetch, store, and stream data for crypto, equities, and more.
Multi-Asset Backtests :
Backtest a strategy across an entire market across hundreds of symbols and thousands of data

/r/Python
https://redd.it/1iwccvr
The pitfalls of benchmarking your package like numpy does

Recently I decided to use [asv (Airspeed Velocity)](https://asv.readthedocs.io/en/latest/) for benchmarking performance of [django-components](https://django-components.github.io/django-components) (we want to be faster than Django templates). asv is used by numpy, scipy, or astropy.

With asv, we are able benchmark render time and memory consumption.

There was a lot of pitfalls and even a couple of bugs I had to fix to get things working. I've documented them all in [this PR](https://github.com/django-components/django-components/pull/999) (also contains screenshots).

The PR covers these use cases:

* Performance report on pull requests.
* Benchmarking the package across releases.
* Displaying performance results on a website.

I'm not big on writing blogs and tutorials (at least not by myself), so I hope to share resources at least this way. The PR is still very informative if you want to introduce benchmarking to your project.

If you find this useful and you'd want to make this into a more human-digestible format, send me a message!

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