PythonHub
2.43K subscribers
2.35K photos
49.2K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
How I made a dataclass remover

My journey creating a dataclass converter by using abstract syntax trees, match-case, the dedent utility and more. You may learn something new along the way.

https://www.pythonmorsels.com/making-a-dataclass-remover/
Forms in Django 4.0+

Prior to Django 4.0 forms were rendered by string concatenation. A number of 3rd party packages allowed for forms to be rendered as templates e.g. floppy forms, crispy-forms. Django 4.0 introduced the capability to render forms using the template engine. This allowed the form template to be set per form class or per instance if a template name is provided when calling render().

https://smithdc1.github.io/my-blog/2022/forms/forms.html
How To Use Docker To Make Local Development A Breeze

Docker is a very powerful tool for developing applications that run in the cloud. If you want to get the most out of it, you need to make sure that the way you're running your code locally matches as closely as possible with how it runs in the cloud. This video shows you how to do this, using a simple API server in Python as an example.

https://www.youtube.com/watch?v=zkMRWDQV4Tg
Evaluating Mechanical Keyboard Delivery Estimates with Python Web Scraping

Evaluating the accuracy of Novelkeys.com's delivery estimates using beautifulsoup and matplotlib.

https://wcedmisten.fyi/post/analyzing-keycap-estimates/
Using GPT-3 to explain how code works

One of my favourite uses for the GPT-3 AI language model is generating explanations of how code works. It’s shockingly effective at this: its training set clearly include a vast amount of source code.

https://simonwillison.net/2022/Jul/9/gpt-3-explain-code/
Logging in Python: A Developer’s Guide

In this tutorial, you’ll learn how to set up logging in Python using the built-in logging module. You’ll learn the basics of logging, logging variable values and exceptions, configuring custom loggers and formatters, and more.

https://blog.sentry.io/2022/07/19/logging-in-python-a-developers-guide/
Code From Anywhere: Dev Containers and Github Codespaces

Because VS Code can run in the browser, Dev Containers, along with Github Codespaces, also allow you to develop from almost anywhere. They’re great for standardizing development across a team. They can also make working on several repos at once much easier because each repo can have its own specific environment for development.

https://earthly.dev/blog/devcontianers/