Python Daily – Telegram
Python Daily
2.56K subscribers
1.49K photos
53 videos
2 files
39K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Finding a Django Learning Partner

HI All,

I am in a difficult position in my career with early layoffs and joining at time of recession. Due to all these I have derailed and have been extremely lazy to learn and lack the motivation. I am looking for a partner to learn Django together. Only motive is to share progess and keep each other motivated.

I am good with python and know only some basics of Django. I am a quick learner and academically strong. Preferable partner should be learning Django fully focused. I am a 2022 graduate (if that matters)

Mentors willing to mentor me through this rough phase are appreciated too.

/r/djangolearning
https://redd.it/1gr3z2h
Make your Github profile more attractive as a Python Developer

What My Project Does:

This project automates the process of showcasing detailed analytics and visual insights of your Python repositories on your GitHub profile using GitHub Actions. Once set up, it gathers and updates key statistics on every push, appending the latest information to the bottom of your README without disrupting existing content. The visualizations are compiled into a gif, ensuring that your profile remains clean and visually engaging.

With this tool, you can automatically analyze, generate, and display visuals for the following metrics:

\- Repository breakdown by commits and lines of Python code

\- Heatmap of commit activity by day and time

\- Word cloud of commit messages

\- File type distribution across repositories

\- Libraries used in each repository

\- Construct counts (including loops, classes, control flow statements, async functions, etc.)

\- Highlights of the most recent closed PRs and commits

By implementing these automated insights, your profile stays up-to-date with real-time data, giving visitors a dynamic view of your work without any manual effort.

\---

Target Audience:

This tool is designed for Python developers and GitHub users who want to showcase their project activity, code structure, and commit history visually on their profile. It’s ideal for those who value continuous profile enhancement with minimal maintenance, making it useful for developers

/r/Python
https://redd.it/1gr4qkw
Django models reverse relations

Hi there! I was exploring Django ORM having Ruby on Rails background, and one thing really seems unclear.

How do you actually reverse relations in Django? For example, I have 2 models:

class User(models.Model):
// some fields

class Address(models.Model):
user = models.OneToOneField(User, related_name='address')


The issue it that when I look at the models, I can clearly see that Adress is related to User somehow, but when I look at User model, it is impossible to understand that Address is in relation to it.

In Rails for example, I must specify relations explicitly as following:

class User < ApplicationRecord
has_one :address
end

class Address < ApplicationRecord
belongs_to :user
end


Here I can clearly see all relations for each model. For sure I can simply put a comment, but it looks like a pretty crappy workaround. Thanks!

/r/django
https://redd.it/1gr1v69
Just Finished Studying Django Official Docs Tutorials

I am a BSc with Computer Science and Mathematics major, done with the academic year and going to 3/4 year of the degree. I am interested in backend engineering and want to be job ready by the time I graduate, which is why I am learning Django. My aimed stack as a student is just HTMX, Django and Postgres, nothing complicated.

I have 6 projects (sites) that I want to have been done with by the time I graduate:

* **Student Analytics App**
* **Residence Management System**
* **Football Analytics Platform**
* **Social Network**
* **Trading Journal**
* **Student Scheduling System**

I have about 3 months to study Django and math alternatingly. I believe I can get a decent studying of Django done by the time my next academic year commences and continue studying it whenever I get the chance during my academic year.

Anyways, enough with the blabbering, I just got done studying the Django tutorials from the official docs. I love the tutorials, especially as someone who always considered YouTube tutorials over official docs. This is the first documentation I actually read to learn and not to troubleshoot/fix a bug in my code. I think it is very well written!

I wanted to ask:

* Is there any resource

/r/django
https://redd.it/1greaqn
Looking for a Django dev to join my remote team

Hey everyone! A while ago I posted a job on this thread and managed to find a great developer. He's still with us, going strong, and I'm looking to expand my team again. I'm hoping this community can deliver again!

The role is for a remote Django developer. I'm open to hiring junior, intermediate, and senior developers. The company is Canadian so you must be fluent in spoken/written English, and Canadian applicants will be preferred over non-Canadians.

Please read more about the job here and follow the instructions to apply:

https://blendable.ca/about-us/careers/full-stack-software-engineer/

/r/django
https://redd.it/1grhjxy
Is django a good choice?

Hey guys,

I currently trying to find the best solution to implement for a client of mine.

What started as a simple HRM implementation now runs more towards some kind of lean ERP solution.

I need something that can handle a lot of employee information and turnover across multiple clients and contracts types to generate accurate and pretty much automatic timesheets and invoicing.

The company is pretty only generating pay and invoices, but these have to follow pretty complex business rules.

I also have to handle a few HR processes that include on-boarding and termination along with some kind of document and signature tracking

Nothing out of the ordinary, but I couldn't find a solution that could do that without heavy customization and license fees.

I am leaning toward erpnext/frappe, but the installation process is much more complex than what I envisioned. I am also thinking about building something myself with Django and bootstraps or react, but I do not have great coding skills so build on something that is pre-existing would be much more approachable for me.

Any suggestions? I am in dire need of help here.

/r/django
https://redd.it/1groo4a
how to solve this

https://preview.redd.it/psusx618hw0e1.png?width=805&format=png&auto=webp&s=478ec1a14ab79568de8846d85d01909e4943e430

also when i'm switching to new powershell i'm not entering into enviorment

/r/flask
https://redd.it/1gr9u6g
What's the most complex/Impressive thing you've built using Django?

By complex i mean code-wise. What's something that you built that really push the capabilities of Django and maybe Python? use this as a chance to show off.

/r/django
https://redd.it/1grri9o
I just learnt how to connect my Django app to mysql

I just connected my django application to mysql database. I feel so proud of me right now.

https://preview.redd.it/kzb1vv1ww11e1.png?width=500&format=png&auto=webp&s=53f2e376d59d5a7d7bbfca7accec6587505fa6fb



/r/django
https://redd.it/1grubxd
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/1grj5d8
Dispatchery: Type-aware, multi-arg function dispatch for complex and nested Python types

Links: [Github](https://github.com/bolaft/dispatchery/), [PyPI](https://pypi.org/project/dispatchery/)

**What it does:**

*dispatchery* is a lightweight Python package for function dispatching inspired by the standard *singledispatch* decorator, but with support for complex, nested, parameterized types, like for example *tuple[str, dict[str, int | float]]*.

**Comparison**:

Unlike *singledispatch*, *dispatchery* can dispatch based on:

- Generic parameterized types (e.g. *list[int]*)
- Nested types (e.g. *tuple[str, dict[str, int | float]]*)
- Union types (e.g. *int | str* or *Union[int, str]*)
- Multiple arg and kwarg values, not just the first one

**Target Audience:**

Python developers who don't like having a bunch of *if isinstance* checks everywhere in their code.

**Example :**

from dispatchery import dispatchery

@dispatchery
def my_func(value):
return "Standard stuff."

@my_func.register(list[str])
def _(value):
return "Strings!"

@my_func.register(list[int] | list[float])
def _(value):
return "Numbers!"

@my_func.register(str, int | float, option=str)
def _(value1, value2, option):
return "Two values and a kwarg!"



/r/Python
https://redd.it/1grszm2
PyPI now has attestation. Thanks I hate it.

Blog post: https://blog.pypi.org/posts/2024-11-14-pypi-now-supports-digital-attestations/

I'm angry that it got partially funded by the sovreign tech fund, when it's about "securing" uploads by giving the keys to huge USA companies. I think it's criminal they got public money for this.


I also don't think it adds any security whatsoever. It just moves the authentication from using credentials to PyPI to using credentials to github. They can be stolen in the exact same way.

/r/Python
https://redd.it/1gs05hm
D When you say "LLM," how many of you consider things like BERT as well?

I keep running into this argument, but for me when I hear "LLM" my assumption is decoder-only models that are in the billions of parameters. It seems like some people would include BERT-base in the LLM family, but I'm not sure if that's right? I suppose technically it is, but every time I hear someone say "how do I use a LLM for XYZ" they usually bring up LLaMA or Mistral or ChatGPT or the like.

/r/MachineLearning
https://redd.it/1grxbdp
D Neurips 2024 Hotel Roommate Search

The hotels around the venue for Neurips 2024 are pretty expensive, and I'm looking for a roommate to split the cost with (my university has a limit on the nightly hotel rate they are willing to reimburse). I currently have reserved a room for Tuesday-Sunday in the Century Plaza Hotel, which is 0.9 miles from the convention center. The nightly rate is $414. If anyone wants to split the cost of a room, please reach out! Also, it would be helpful if you could share this post with your research group or other attendees that you know.

If you are unsure about rooming with a complete stranger, you can get to know me a little bit through my personal website (https://mtcrawshaw.github.io/), which has links to my google scholar page, CV, etc. I do have a paper at the conference in the area of federated learning/distributed optimization. Just a grad student trying to make conferences affordable! Thanks.

/r/MachineLearning
https://redd.it/1gs0gj8
Game 987, Like 2048 but Fibonacci (Made in Python)


https://987.reflex.dev/


What My Project Does

From Adhami the author: I was wondering how 2048 would feel like if instead of powers of two, we can merge consequent fibonacci numbers. Turns out to be a rather interesting game that is fairly forgiving and grows very slowly. I found it difficult to come up with an overall strategy. I had a simple search algorithm that was able to achieve a score of exactly 66,666 (not joking). Getting a 987 block shouldn't be difficult.


You can take a look into the code here: https://github.com/adhami3310/987 (the simple search algorithm is inside the code as well)

Target Audience: Anyone

Comparison: Similar to 2048 but fib



/r/Python
https://redd.it/1gs56f7
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

# Weekly Thread: Resource Request and Sharing 📚

Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!

## How it Works:

1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.

## Guidelines:

Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.

## Example Shares:

1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.

## Example Requests:

1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.

Share the knowledge, enrich the community. Happy learning! 🌟

/r/Python
https://redd.it/1gsaiu7
I played a minute-long video in Windows Terminal

I recently worked on a project combining my love for terminal limits and video art. Here’s what I achieved: • Rendered a 1-minute-long (almost two) ASCII video in the terminal, without graphics libraries or external frameworks. • Used true 24-bit colors for each frame, offering deeper color representation in terminal-based projects. • Processed 432 million characters over 228 seconds, translating each frame’s pixels to colors. • Optimized performance with multi-processing, running on an integrated graphics card.

Specs:

• 30 FPS
• 160,000+ characters per frame
• 2,700 frames
• 3 pixels per character for better performance

For further optimization, I reduced the font size to 3 pixels and used background colors to handle brightness.

What my project does?
While not the most practical project, it’s an experiment I’m satisfied with it. No real use, but hey, it’s fun!

Target audience
This is more of a fun project so I can't say it has a specific target audience, but I could say that people that strangely feels good coding "useless" things might like it.

Comparison
Well it is not an ASCII player anymore to be precise, but what it does now is just display video in the terminal using basically pure ANSI, I

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