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
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/1f3ojlk
Documentation difficult to navigate

I find Django documentation VERY annoying to navigate. Everything seems to be explained "by example" and actual reference overviews are hard to find. I feel like the documentation reads like one long tutorial on everything that Django has, but it leaves out many details that I would want to know, as I really don't like much "magic" happening in my code and the Django framework itself already introduces enough of that.

For example, the IntegerChoices class of Django models: I can't find it through the search bar, it is NOT in the General Index, but it is mentioned in the examples in the IntegerFields documentation under enumeration types. How would I have been able to find this if I encountered this class and wanted to look it up? Visit every possible related page and ctrl+F?

I just want to see for every class an overview of its member functions, what goes in, what comes out and which type everything is supposed to be in an exact, unambiguous way, like most other documentation of anything else ever. I don't want to read a book when I quickly want to find something...

Am I the only one annoyed

/r/django
https://redd.it/1f39njx
Anaconda Blues anyone else?

Despite the post here from 4 years ago, looks like Anaconda is going shopping for revenue from unsuspecting companies. We are a non profit that happens to have various solutions that leverage anaconda. Wondering if anyone has been through this and what their results were?



/r/Python
https://redd.it/1f3mfsk
Python Zen and implications

I was encouraged to reconsider my understanding the true implications of some of the Python Zen design principles, and started questioning my beliefs.

In particular "Explicit is better than implicit". Pretty much all the examples are dead-trivial, like avoid "import *" and name your functions "read_something" instead of just "read".

Is this really it? Has anyone a good coding example or pattern that shows when explicit vs. implicit is actually relevant?

(It feels that like most of the cheap Zen quotes that are online, in which the actual meaning is created "at runtime" by the reader, leaving a lot of room for contradictory interpretations)

/r/Python
https://redd.it/1f3pbet
Has Anyone Used Lemon Squeezy with an HTML Django Project?

I'm looking to integrate Lemon Squeezy into my HTML Django project and was wondering if anyone here has experience with it. How well does it work, and are there any tips or best practices you can share? Any insights or advice would be really helpful!

/r/django
https://redd.it/1f3vdqq
We just open sourced! Launch websites, APIs, and workers to AWS / GCP with Python

Hey everyone, my team and I spent the last 6 months refactoring our DevOps platform into an open source deployment tool for AWS / GCP - LaunchFlow.

GitHub repo: https://github.com/launchflow/launchflow

Docs: https://docs.launchflow.com/

What My Project Does

The Python SDK lets you launch websites, APIs, and workers to AWS / GCP with minimal configuration—no messy YAML required.

Networking, permissions, and other environment configurations are automatically handled for you. It only takes one line of code to deploy static sites, serverless APIs, managed Postgres, Kubernetes clusters, and more.

Target Audience:

Developers building on AWS / GCP.

LaunchFlow is not just for deploying Python applications.

The Python SDK is used to define your infrastructure in code, but you can deploy any static or Dockerized application to AWS or GCP.

Python is just the language for your cloud configuration, similar to how Terraform uses HCL.

Comparison:

LaunchFlow is most commonly compared to CDK for Terraform and Pulumi.

LaunchFlow is a higher-level abstraction than both of these tools. It provides a more opinionated way to define your infrastructure and handles things like networking, security, and environment management out of the box.

We’re also going much deeper on “deployments” than other IaC tools do. Terraform / Pulumi are typically paired with a separate deployment tool, whereas LaunchFlow combines release management with the

/r/Python
https://redd.it/1f3hexb
Seeking Advice: Building a Web App as a Data Engineer

I'm a data engineer who would like to gain some experience in front-end development. I'm getting frustrated not being able to represent the data we store in the database to the user.

To gain experience, I would like to build a web app to track my investments, similar to the image attached. I have good exposure to JavaScript and I'm currently learning React, as well as Python.

My question is: Should I use Django for this project or go with full JavaScript using React? I'm quite new to web development. Based on my research, it seems that Django would mainly be useful for creating an API for the front-end to use. If that's the case, I might opt for FastAPI since it has less boilerplate.

Anyway, I'm a bit lost and unsure of what I should do.

Thanks for your help!



Dashboard example



/r/django
https://redd.it/1f3yv0u
Building a Custom Paint Store: Time and Cost Estimation for Advanced Color Matching API Development

https://preview.redd.it/2609503u0lld1.png?width=1280&format=png&auto=webp&s=dd1d3d37e597ea224ae26fd73b342bebed70cbd3

https://preview.redd.it/u4ybjkou0lld1.png?width=420&format=png&auto=webp&s=f8287bb1588e09b485532817698637c8a11b7eeb


I'm developing a website for selling construction paints. For the past two weeks, I've been working with an assistant to create a color palette like the one in the first screenshot. We've also implemented a color input field that checks both our color palette and the palettes of competitors (everything is legal, it's just to ensure the correct spelling of color names and numbers from other companies, in case a customer wants our paint but with a color from another brand, without any trademark or copyright issues). This is the basic functionality we have right now.

Here's the new functionality described in the third screenshot (which I photoshopped for now):

1. Implement a color search feature.
2. Display similar colors.
3. Show the selected color and a room in that color.
4. Below that, display other room options. When a user clicks on a room, they will see it in the selected color (the image won't be pre-prepared; the room will be recolored in the selected color using code, and the recolored room image will be saved. There will be 8,000-10,000 colors and 6-8 room images).
5. Add the ability for users to upload their own room images, select walls, and have them recolored

/r/Python
https://redd.it/1f3z83t
is learning flask in Canada worth it?

Here are the job openings in the area near me. php =600 django=111 flask=76 .net=2000 spring=287 springboot=492 node=1.200 ruby=292 ROR=328 go=470

It kind of discourages me from learning flask, is flask growing in job openings or will go start to eat away at its market share?

/r/flask
https://redd.it/1f3twz6
I wrote some flask code. Would anyone be willing to review the code I wrote. Everything works I just want to get someone opinion of the code. If yes I will private message you the code.

I wrote some flask code. Would anyone be willing to review the code I wrote. Everything works I just want to get someone opinion of the code. If yes I will private message you the code.

/r/flask
https://redd.it/1f3m6g7
Help designing model for including sem/year

I'm creating models to store questions and syllabus of different courses.

eg. program: Master of Fine Arts (MFA), courses: Sculpture, Visual arts

This is what I have in mind so far:

#django and postgresql
#from django.db import models

class Program(models.Model):
    programid = models.IntegerField(unique=True)
    program
code = models.CharField(maxlength=100)
    program
name = models.CharField(maxlength=100)


class Course(models.Model):
    course
id = models.IntegerField(unique=True)
    coursecode = models.CharField(maxlength=100)
    coursename = models.CharField(maxlength=100)
    coursecredit = models.IntegerField()
    course
icon = models.CharField(maxlength=50)
    program = models.ForeignKey(
        Program, on
delete=models.CASCADE, relatedname="courses"
    )

class Syllabus(models.Model):
    course = models.ForeignKey(Course, on
delete=models.CASCADE, relatedname='syllabus')
    topic = models.CharField(max
length=100)
    content = models.TextField()
    hours = models.IntegerField()
 

/r/django
https://redd.it/1f3robj
2023 Python Developers Survey Results

# 2023 Python Developers Survey

Results are in for the official Python Developers Survey, conducted in partnership with JetBrains!

The survey is a joint initiative between the Python Software Foundation and JetBrains.

Read more about it here.

/r/Python
https://redd.it/1f43acl
D Post any bginner questions to r/MLQuestions!

I have recently inherited the subreddit r/MLQuestions, as the other mods had been innactive for 10 months and 4 years respectively. I have been sprucing up the sub, adding flairs, rules, etc, and I am trying to increase engagement and make it more useful for those who want to ask questions. Basically, stackoverflow but dedicated to beginn\
r questions about ML. So if any of you have questions that your are too embarrased to ask here, ask at r/MLQuestions! I will also be introducing a system similar to r/changemyview, where each question someone answers, they get an increment to their user flair that shows how many questions they have answered!

BTW the mods gave me permission to post this, so thank you guys for this, very cool.

/r/MachineLearning
https://redd.it/1f3yfjg
How to add alt to img in django-summernote?

As title says. I am add blog post via admin panel. I have integrated django-summernote. I am not able to find any way to add alt tag to image uploaded inside post.

I followed this to integration https://djangocentral.com/integrating-summernote-in-django/

Thanks

/r/django
https://redd.it/1f48kyr
Fileuploads blocking Workers

Hello everybody,

I encountered a problem which got pretty big for my App now. Sometimes the app becomes unresponsive for a long time and will answer the request after like 50 seconds.

I think it is because a lot of users are uploading images and this blocks my gunicorn workers. Users might have a bad internet connection for example. Like this when 12 images are uploaded with bad connection and I only have 10 workers, this will cause a problem. (I also use Azure Blob Storage as my file storage)

How would you handle that?

Thank you in advance for your advice :)

/r/django
https://redd.it/1f487e9
Created CLI that writes your semantic commit messages in git and more.

I've created CLI, a tool that generates semantic commit messages in Git

Here's a breakdown:

What My Project Does Penify CLI is a command-line tool that:

1. Automatically generates semantic commit messages based on your staged changes.
2. Generates documentation for specified files or folders.
3. Hooks: If you wish to automate documentation generation

Key features:

`penify-cli commit`: Commits code with an auto-generated semantic message for staged files.
penify-cli doc-gen: Generates documentation for specified files/folders.

Installation: pip install penify-cli

Target Audience Penify CLI is aimed at developers who want to:

Maintain consistent, meaningful commit messages without the mental overhead.
Quickly generate documentation for their codebase. It's suitable for both personal projects and professional development environments where consistent commit practices are valued.

Comparison Github-Copilot, aicommit:

Penify CLI generates semantic commit messages automatically, reducing manual input. None does.
It integrates documentation generation, combining two common developer tasks in one tool.

Note: Currently requires signup at Penify (we're working on Ollama integration for local use).

Check it out:

PyPI: [https://pypi.org/project/penify-cli/](https://pypi.org/project/penify-cli/)
GitHub: https://github.com/SingularityX-ai/penify-cli

I'd love to hear your thoughts and feedback!

/r/IPython
https://redd.it/1f4b888
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/1f4hgd2
Looking for freelance Django/Python Dev, how much should I pay?

Hello hello,

Not a Django dev myself but need someone with Python, Django, and API / Rest experience. I'd say probably mid-level for about \~12 hours a month, only to go up from there. Any idea on what a good hourly rate for such a freelancer would be?

/r/django
https://redd.it/1f4dkin
How to properly record and send audio data from react to flask backend

I want to send audio data from react in a interval of approx. 10sec to my flask backend. Here is my code, it is working but music format is not write.


react code snippet

useEffect(() => {
socket.connect();

function sendData(data) {
var form = new FormData();
form.append("file", data, "data.mp3");
form.append("title", "data.mp3");

axios
.post("http://127.0.0.1:5000/save-record", form, { headers })
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error(error);


/r/flask
https://redd.it/1f4978m
Question on Macros vs Partial Templates

Hi,

Question on using macros vs partial templates.

Is there a preference or difference between the two? It seems like with the latest jinja updates, we can just pass variables to the partial template as well.

{% extends "home/home_base.html" %}
{% from "home/macros/nav_bar_macros.html" import nav_bar%}

{% block content %}
<div class="h-full">
<nav id="nav-bar" class="flex p-7 justify-between items-center">
<img src="{{ url_for('static', filename='images/logo.svg') }}">

<div>
{{ nav_bar(current_page)}}
</div>
</nav>

<div id="main-container" class="w-10/12 mx-auto mb-12">

{% include 'home/marketplace/partials/_recommended.html' with context %}
{% include 'home/marketplace/partials/_explore.html' with context %}

</div>
</div>
{% endblock %}




Per the code block above, i am using a macro for my dynamic nav bar, and also using partial templates. Both seem to do the same thing and my server can return a macro (via get_template_attribute) or just

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