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
Best gui for local client app?

I'm writing an application which is local. No server. I'm using python and I'm wanting to know people's opinions on the best gui to use.

So far I've used tkinter but it feels clunky and heavy, like it's from the early 2000s.

Can anyone recommend something better for modern looking stuff? Maybe I'm using tkinter wrong?

Any advice would be appreciated.

/r/Python
https://redd.it/1gfopgm
Improve TTFB

Hello,

I’m running into a response time issue with a Flask server in a test setup, and I’m hoping someone might have insights on how to tackle it. The server is set up to handle a pretty large data retrieval task—about 110MB, consisting of around 15,000 rows of complex JSON objects. Flask seems to handle the retrieval and processing reasonably well; it takes about 3 seconds to generate the JSON response. So far, so good.

The problem arises after the data is ready to be sent. I’m seeing a significant delay—around 6 additional seconds—between the endpoint finishing and the start of the response download. This delay feels unusually long, especially given the relatively quick processing time of the data retrieval itself. To troubleshoot, I measured the times directly in the endpoint method and looked at the Time to First Byte (TTFB) using Postman, which confirmed this lag.

I also tried enabling GZIP compression through Flask-Compress, hoping that reducing the response size might help speed things up. However, this didn’t have any effect; the response size stayed roughly the same, and the transmission time didn’t improve.

At this point, I’m not sure what else to try to minimize that 6-second delay. Does anyone have suggestions

/r/flask
https://redd.it/1gfu0fb
D I’m an ML/programming educator - I was invited as ceo of codesmith to Berlin Global Dialogue (tech/AI insider conference) - see what they said behind closed doors - AMA

Edit (5pm PT): Thanks so much all for really great questions - I'm going to pause now but will take a look over next 24 hours and try to answer any more questions. V grateful for chance to do this and to others who helped answer some of the Qs too from their perspective (shoutout u/Rebeleleven)

\--


I recently had the opportunity to attend the Berlin Global Dialogue, which has been likened to Davos but with a stronger focus on technology and AI . The lineup was impressive: Hermann Hauser, the founder of ARM, executives from OpenAI and ASML, and a mix of founders from emerging startups tackling everything from quantum ML to supply chain optimization. Even leaders like President Macron and the German Vice Chancellor were there, engaging with critical tech issues that impact us all.

As the CEO of Codesmith – a small, independent tech school with a data science and machine learning research group (last year we contributed to TensorFlow) – I was invited to announce our latest endeavor: Codesmith’s AI & ML Technical Leadership Program.

I shared this experience in an AMA on r/technology and had a great conversation—but the depth of questions around ML/AI didn’t quite match

/r/MachineLearning
https://redd.it/1gfv37y
D Monthly Who's Hiring and Who wants to be Hired?

For Job Postings please use this template

>Hiring: [Location\], Salary:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] and [Brief overview, what you're looking for\]

For Those looking for jobs please use this template

>Want to be Hired: [Location\], Salary Expectation:[\], [Remote | Relocation\], [Full Time | Contract | Part Time\] Resume: [Link to resume\] and [Brief overview, what you're looking for\]

​

Please remember that this community is geared towards those with experience.

/r/MachineLearning
https://redd.it/1gg4bau
Is anyone using Whitenoise with CloudFront in 2024?

So, I recently built a web app using just good old fullstack Django and I'm serving my assets locally with Whitenoise. When I moved to production, I configured CloudFront according to the Whitenoise docs (https://whitenoise.readthedocs.io/en/stable/django.html#use-a-content-delivery-network), but apparently these docs are very out of date (there's this issue from 2020 commenting on this https://github.com/evansd/whitenoise/issues/264) and I have been facing some weird bugs. All assets served by cloudfront are just 301 redirects, so each asset file is being served twice, apparently. Not only that, there's also a weird CORS error with a font I'm serving locally, without any other external CDNs.

Has anyone had any success using cloudfront to serve assets together with whitenoise? Does this setup even make sense anymore now that cloudfront is able to compress with both gzip and brotli?

/r/django
https://redd.it/1gg2wv8
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/1gg1913
Guidance for a carrier-shifter

/r/djangolearning
https://redd.it/1gfjp3p
Generate programming language files from YAML

Hello party people,

a while ago I started a project called confluent to generate code for different programming languages based on a language neutral YAML configuration to make updating constants-files for different languages easier. As time moved on, I found some flaws in how I implemented this project (especially the name bugged me). So today I'm proud, to finally release it under its new name: ninja-bear 🥷🐻

It uses the same configuration principles but adds more flexibility for developers to add their own stuff by offering a plugin-system.

Lets say you only want to generate files for C and TypeScript, no problem. Install ninja-bear, ninja-bear-language-c and ninja-bear-language-typescript and you're ready to go.

Here's a short demo on how to use it: https://youtu.be/bya\_exGrS68

Let me know what you think :)

/r/Python
https://redd.it/1ggepxe
How about a GUI based on Rust's Iced for your Python projects

I've just released version 0.3.1 of IcedPyGui. Rust bindings using pyo3 and built with maturin.

IPG has many widgets now and more will be added each month. If you have ever used dearpygui, you'll find the syntax similar.

There are a ton of examples at https://github.com/icedpygui/IcedPyGui-Python-Examples

These examples will easily get you started.

The rust repository is https://github.com/icedpygui/IcedPyGui

The Iced respository is https://github.com/iced-rs/iced

/r/Python
https://redd.it/1gg2har
Seeking Advice on Best Stack for UI in a Multi-Tenant Web App

Hey everyone,

I'm a backend/data engineer with 10 years of experience, and I'm hitting a roadblock with the UI for a multi-tenant web app I’m building. My client isn’t satisfied with the current Streamlit-based UI, even after adding custom React components.

The backend is solid—I’ve set up all the necessary queries and table schemas, and I know exactly how the visuals should look. The app is designed to allow admins to manage CRUD operations for users and metrics, with the ability to view all users' data, while individual users can only see their own information. For authentication, I'm using AWS and Cognito to handle login and user management.

I recently came across Django/react templates, which seem like a great fit for my needs, but I’m finding component libraries a bit overwhelming. I also checked out Reflex.dev, though it feels somewhat clunky.

At this point, I'm open to simplifying the stack, even if that means dropping multi-tenancy. I’d really appreciate any recommendations on an easy way to layer a UI over my database and queries, particularly one that works well with AWS and Cognito.


Thanks in advance.

/r/Python
https://redd.it/1gg6mjm
Scrunkly - Stupidly simple script runner

# Where?

You can find it here:

Source - [nokusukun/scrunkly](https://github.com/nokusukun/scrunkly)
PyPI - scrunkly · PyPI

What My Project Does
Scrunkly is a zero dependency script runner that fits my needs for a script runner.

# Comparison

pyproject.toml
I use this for stuff like needing to deploy and ssh so a pyproject.toml isn't as portable.

Why not use X?
I can't add features to it that caters to my needs.

# Target Audience

We've been using it in production for the startups that I worked with for quite some time.

Example

# run.py
import scrunkly
from scrunkly import withenv, py

dev
env = withenv({
"DEBUG": "1",
"MONGO
DBURI": "mongodb://localhost:27017",
"MESSAGING
URL": "mongodb://localhost:27017",
"MONGODBNAME": "test",
"AWSREGION": "ap-southeast-2",
"AWS
S3BUCKETNAME": "test-...",
"AWSACCESSKEYID": "AKI...", # these only have access to test buckets
"AWS
SECRETACCESSKEY": "eyFi7...",
})



/r/Python
https://redd.it/1ggi2el
Tutorials for Building a Full-Stack E-Commerce

everyone! I’m looking for recommendations on the best Udemy or YouTube tutorials to learn how to build a full-stack e-commerce app (clothing) with a nice design, delivery service, Stripe integration, and an admin panel .... All what an e-commerce need . I have experience with Flutter, so I understand the logic, but my client specifically wants the app built with Django or Laravel. I’m ready to invest around 25 hours into this, so if you know any comprehensive courses or tutorials that fit the bill, please let me know. Thanks in advance!

Feel free to tweak it as needed! Good luck with your project! 😊

/r/djangolearning
https://redd.it/1gf91i4
Internal streamlit app expanding, whats next?

Hi all!

I work freelance as a Analytics Engineer. My role with one of my major clients has taken somewhat of a turn lately, as i have been building a couple of internal streamlit apps to automate some of their internal functions in the company. This is all fine and dandy, we have been hosting some on a local server, and in other cases i merely installed python on their PC and made them a quick shortcut that boots up the server.


They want to make some of these apps available to their international offices.

It is VERY low traffic (would go from about 5 daily users, to about 30-40 daily users. Each using the app for aproximately 1-2 hours a day, so some sort of serverless solution seems obvious.

So what do you think would be a suitable solution going forward?
Deploy on some sort of cloud solution? (seem like you can host it in a serverless fashion which seems obvious given the low traffic.)
Switch framework? (Taipy looks quite promising)
Ditch the fullstack python idea and rebuild it with a proper seperate frontend? (my frontend development capeabilities are VERY limited.)

Something entirely different?

Thank you

/r/Python
https://redd.it/1ggp5h0
I need a job

I am a backend developer with 1.5 years of experience in Python, Django, flask, FastAPI, Rust, PostgreSQL, MySQL. I’m in Ghana, West Africa but I can work remotely anywhere. I can work within any time frame or difference. I really need job 🙏🏾
This’s my GitHub: https://github.com/miky-rola

/r/django
https://redd.it/1ggnrxe
Upify - quickly deploy Flask apps to the cloud for free

I see a lot of posts in here asking about where to deploy Flask or where to deploy it for free. You can deploy your app to serverless environments, so that it’s not taking up resources if it’s not being used, which should be good for most projects since they don’t get that much traffic. Both AWS Lambda and GCP Cloud Run offer free tiers that should be more than enough for most people to host multiple apps.

Upify is an open source CLI tool, written in Go that makes deploying a Flask app to serverless very easy. It just creates configs and wrappers on top of your existing app. Basically, you have to set up creds for the provider, run a few commands, and you should get back a URL that you can call.

https://github.com/codeupify/upify

https://reddit.com/link/1ggjs87/video/r7tuf4bbk4yd1/player



/r/flask
https://redd.it/1ggjs87
Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1ggsqvj
Help

Hy guys can you suggest me what is best way to create database for our simulation team ?

So that we can access it whenever we want to check the properties of material.

If we wanna import new material also once validated we can do that also.

Anyone out there to help me out ?

/r/IPython
https://redd.it/1gggex1
File Path Validation Library

# Where?

You can find it here:

* **Source** \- [FPV - GitHub](https://github.com/Voltaic314/File_Path_Validator)
* **PyPI** \- [FPV · PyPI](https://pypi.org/project/file-path-validator/)



# What My Project Does

FPV is a file path validation and cleaning library that consolidates all the quirky file path rules from different operating systems and cloud storage providers. It's designed to help automate compliance with various platform-specific file naming rules, especially when working with cloud storage services or syncing data across multiple systems.



# Comparison

# Why not use OS-based utilities?

While some built-in OS libraries can validate or clean file paths, they don’t generally cover complex scenarios—like cross-platform checks or cloud provider restrictions. FPV aims to address specific constraints unique to services like SharePoint, Box, OneDrive, and more.

# Can’t I just use regex or string manipulation?

Sure, but FPV organizes these rules into classes so that each supported platform has predefined validations and cleaning methods, saving you the time it would take to code all these restrictions individually. FPV can validate and clean file paths based on the platform’s unique restrictions, with modular classes for each service.



# Target Audience

FPV can be a handy tool for:

* Devs who automate file handling and processing across cloud platforms.
* People using Python scripts that require cross-platform file path generation and validation.
*

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