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
Wednesday Daily Thread: Beginner questions

# Weekly Thread: Beginner Questions 🐍

Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.

## How it Works:

1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.

## Guidelines:

This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).

## Recommended Resources:

If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.

## Example Questions:

1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?

Let's help each other learn Python! 🌟

/r/Python
https://redd.it/1cs75gc
How can I do an auth?

I'm starting with django, and I understand that its architecture is loosely coupled, however I don't know where to put the authentication app, that is, I know that django gives it to me, but I must always put the logic in an app, whether in the inventory app, which requires login to access it, or in some other app. Where do you put the authentication logic? I understand that you cannot make an authentication app in the traditional way (python manage.py startapp auth) since it throws an error.

I would appreciate any advice :)

/r/djangolearning
https://redd.it/1cry3zx
Lost my job today to an agency

*May come off as a rant, I'm sorry

So my employer hired an agency a few days ago and I got notice today that I'm being let go (I'm the only dev/seo/graphic designer/marketing/network admin).

I'm kind of lost for words right now because they're asking me to help them convert the current state to WordPress, which is what they were using before I built a completely new website.

I've worked for them for 4 months now, and I built a static 70 page website from the ground up. This includes all graphic designs, graphic animations, modals, and the hundreds of design changes because they couldn't tell me what they wanted, without me having to make it first. This includes 30 unique service area pages tailored to those areas and are all ranking decently well in a highly competitive service oriented space.

About 3 weeks ago, I converted the entire website to django (I have nightmares of changing hard-coded urls)

I built a complete admin dashboard, customer & employee portal. I built forms for blog posts and rss feeds that also post to social media. I integrated CMS's, multiple api's; I made analytics dashboards, custom on-site user tracking, automated geofencing campaigns, and more (not trying to

/r/django
https://redd.it/1crwucx
I made a python bot that plays minesweeper

Hello,

I made this Minesweeper bot that I wanted to share with you all.

What My Project Does \-

The bot takes a screenshot of the board and runs a classification algorithm to extract the contents of the board. It then analyzes the board, finds as many mines as it can, and sends clicks. If it cannot find any mines then it guesses the most probable position of a mine.

Target Audience \-

It's a toy project for anyone interested in algorithms or problem-solving.

Comparison \-

This is just my attempt at making a minesweeper bot. I'm sure there are many bots out there that are much more efficient than this.

do let me know, if you feel anything can be done better :)

​

/r/Python
https://redd.it/1csd77f
django-allauth 0.63.0 is out, featuring headless (API) support
https://docs.allauth.org/en/latest/headless/openapi-specification/

/r/django
https://redd.it/1crxo3y
Help me pls 😭, js file not connecting to flask

Okay, so I am making a website by using Flask.I was building an authorization system for the website by using Firebase. And, I was trying to connect the auth.js file(which contains firebase) to the HTML file(login.html). But, for some reason, it is not being connected. I think the issue is in auth.js.
been scratching my head around this for the last 5 hours. some help would be appreciated 😭🙏🏽
github link: https://github.com/Parth1304/career-website



/r/flask
https://redd.it/1csdesi
Does anyone know what "excess events" mean for Sentry?

I got a message in my sentry dashboard "You have exceeded your performance unit limit. We are dropping any excess events". Could someone tell me what this means? Will I still get any exceptions logged, or will I have to upgrade to have this feature? What does excess events mean? Thanks in advance!

/r/django
https://redd.it/1csegt7
Where to Deploy Django & React App?

I want to deploy a small to medium Django & React application and I am currently investigating my options. I don't want to deploy to Azure, AWS, or Google since it seems excessively expensive.

I have used Heroku before but even there it can get progressively more expensive when the app grows. I am now looking towards options such as Digital Ocean or Render.

Has anyone used these services before and if yes, what did you think? Also, do you have any other recommendations?

/r/django
https://redd.it/1csk8r4
Production grade AI Web apps, just using python ?

Hey guys, I have worked on building multiple ai/ml usecases and their specific backends. But now I want build interfaces for easy and quick integration. I saw a blog which used FastUI which looks quick decent but when I tried it just showed me a Json of elements on the page. Are there any other libraries I should use? 🤔

/r/Python
https://redd.it/1csfimo
Need suggestion and searching for a oppertunity .

Hello everyone,

I’m currently working as an Associate Backend Engineer and pursuing my Bachelor of Computer Application. I'm looking to enhance my skill set to improve my chances of getting a better job as I’m not satisfied with the pay at my current position.

Here are the skills and experiences I currently have:

* **Backend Development**: Created a payroll parser for streamlined data processing, integrated real-time communication systems using WebSocket, and designed/deployed diverse APIs with unit tests covered.
* **Notifications**: Implemented notification backends using technologies like Firebase Cloud Messaging for push notifications.
* **Performance Optimization**: Conducted load testing and API profiling to optimize and enhance system performance using tools like Locust and Django Silk.
* **Development Practices**: Introduced Behavior Driven Development (BDD), initiated automation testing using Selenium, and worked on transforming projects to multi-tenant architecture to improve scalability.
* **Testing and Automation**: Experience with unit testing, Pytest, BDD, TDD, and stress testing.
* **Web Services and APIs**: Hands-on experience with REST, GraphQL, and various async libraries.
* **Containerization**: Proficient with Docker (Images, Containers, YAML files).
* **Cloud Platforms**: Experience with AWS services such as EC2, S3, and SNS.
* **Databases**: Worked with PostgreSQL, MongoDB, Redis, and MySQL.

I would love to hear your suggestions on what other skills or technologies I should

/r/django
https://redd.it/1cso53l
Frontend sprinkles of Javascript, like Rails/Hotwired but for Django?

I'm new to Django, coming from a Ruby on Rails background. I will have to use Django for an upcoming project and would like to use Django templates with some JS sprinkled in to make the frontend more dynamic. What is the best tooling for introducing some JS functionality without having to use the heavy stacks like React single page application with Django just as an API?


In Rails, they recently introduced the Hotwired framework, which I think is fantastic. Stimulus can be used with Django templates, but as far as I can tell there is no equivalent for the Turbo component.

/r/django
https://redd.it/1cssevb
Get data from HTML to another

On a page use data from a model to fill tables and do calculations in Javascript That page is for audits and quality control, but I need another page for data business and graphics. Using Javascript generated tables using data rendered from views and functions.

How do I render from one page to another without having to do the calculations again, each page has an instance assigned to an id

/r/django
https://redd.it/1csx05s
Fantasy sports (golf) app in Flask
https://golfpool.greenkeepa.com/

/r/flask
https://redd.it/1csvtdp
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/1cszngw
New

Hi everyone,

I’m pretty new to software development in general but I just deployed my first full stack application using netlify for react and render for flask. Issue with render is it goes to sleep after 15 mins of activity.

If I go up the paid plans, will I resolve this issue? Is anyone using those tiers and how’s your experience with them so far?

Also, I used ElephantSQL for my database but their EOL is approaching. I heard Supabase and Aiven are good alternatives. Any insights would be much appreciated on those also!

Thanks a bunch :)

/r/flask
https://redd.it/1csz9r6
PyCon US 2024 is here!

It’s that time of year again, this time in Pittsburgh, Pennsylvania!

You can chat with others in the Python Discord (discord.gg/python) in the #pycon-us channel or in this thread.

If you’re going, leave a comment below. Maybe include a talk you’re excited to hear or summit your excited to attend.

It’d be really great to meet some of you as well! I’ve got stickers ;)

/r/Python
https://redd.it/1ct1tnh
Facing challenge in django channels require help

Currently grappling with a challenge in Django Channels regarding multi-tenancy. While connections work smoothly on threads, transitioning to channels introduces event loops, leading to multiple processes operating on the same thread and causing potential race conditions when modifying tenants. Any insights, ideas, or assistance on resolving this would be greatly appreciated!

/r/django
https://redd.it/1ct5fn7
Apple Health data exploration with Atlas, Clickhouse, Vega-Altair, Quarto

**What My Project Does**

A few days ago I wrote a simple python script ("[Atlas](https://github.com/atlaslib/atlas)") that turns the Apple Health export.xml file (which is about 1 GB in my case, with about 10 years of data) into a very simple parquet file (a bit like a compressed CSV) that is also way smaller (40 MB).

The parquet file has 5 columns:

* type (e.g. "CyclingDistance")
* value (e.g. "12.100")

and 3 datetime timestamps:

* start
* end
* created

This makes it way easier to do data exploration. Here are a few example charts I generated using Clickhouse (chDB) and Vega-Altair in a Quarto notebook.

Step Count:

[https://x.com/\_\_tosh/status/1785397655784337684](https://x.com/__tosh/status/1785397655784337684)

Environmental Noise:

[https://x.com/\_\_tosh/status/1787530483208786029](https://x.com/__tosh/status/1787530483208786029)

Sleep Duration & States:

[https://x.com/\_\_tosh/status/1786505867438768254](https://x.com/__tosh/status/1786505867438768254)

Coffee Consumption:

[https://x.com/\_\_tosh/status/1783906333911076996](https://x.com/__tosh/status/1783906333911076996)

Coffee after 17:00:

[https://twitter.com/\_\_tosh/status/1789304034442043421/photo/1](https://twitter.com/__tosh/status/1789304034442043421/photo/1)

**Target Audience**

For everyone who would like to explore their own Apple Health data or see how to work with a simple .parquet file using Clickhouse (chDB), Vega-Altair and Quarto.

Quarto notebook: [https://github.com/atlaslib/atlas/blob/main/examples/apple-health-exploration-clickhouse-chdb-altair-quarto/index.qmd](https://github.com/atlaslib/atlas/blob/main/examples/apple-health-exploration-clickhouse-chdb-altair-quarto/index.qmd)

In the repo on Github I've added also added instructions for how to get your export.xml file from Apple Health and how to install the python script via pip to use it as a command line tool:

[https://github.com/atlaslib/atlas](https://github.com/atlaslib/atlas)

(⭐️ star to stay tuned for updates)

Curious if you have charts that you would be interested in. Happy to add more examples over the next days!

**Comparison**

This is me playing around with the

/r/Python
https://redd.it/1css42g
Rant/Seeking Reassurance

It's 5am and I haven't slept a bit because I've been going down a grief rabbit hole searching for information that'll prove otherwise that AI wont fully take over coding/programming.

I can remember when I ran my first code and how the dopamine rewired my brain and while I don't entirely hate AI, it's just discerning that basic-intermediate programming will be gone in probably 5 years.

I feel like programming is all I have and have had. I recently just graduated with a degree in Computer Science, I'm beginning to fear if i made a mistake making programming both my hobby and career(career which I haven't even had lol)

Hell, the reason for this rant is that I'm just desperate for reassurance because I'm miserable.

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