Issue #545

Django and WebSockets, QR Codes, Ninja, and More

Oct. 4, 2022

Django and WebSockets, QR Codes, Ninja, and More
#545 – OCTOBER 4, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Building Chat With Django Channels and WebSockets
Building stateful web applications can be tricky, unless you use a framework, of course. Django to the rescue! In this article, learn how to build a real-time chat app using Django Channels and WebSockets.
MUHAMMED ALI

Generate a QR Code With Python
QR codes are two dimensional bar codes that allow you to embed URLs in images. Learn how to make a QR code using the qrcode library.
JERRY ZHU

Built for Seamless, Continuous Deployment - Platform.sh Is Your Web Fleet Management Solution
Platform.sh is a secure cloud hosting platform that allows you to effortlessly manage, monitor and optimize all your websites. With our solution, your development team can avoid wasting precious time updating your websites individually or fixing deployment bugs and focus on what truly matters →
PLATFORM.SHsponsor

Sneaky REST APIs With Django Ninja
In this video course, you’ll learn how to use Django Ninja, a FastAPI inspired tool for turning Django views in REST API endpoints. With Ninja, you can quickly build API endpoints.
REAL PYTHON course


Discussions


How to Fix Python
Al appears to be bored and decided to start a flame war. As his suggestions include 1-based indexing and using “x” instead of “*” for multiplication, he’s likely being sarcastic. The joy of text is you’re never quite sure.
AL SWEIGART


Python Jobs


Content Operations Manager
REAL PYTHON 📍 ANYWHERE

Senior Software Engineer Backend
MUCK RACK 📍 USA

Senior Backend Engineer
DOIST 📍 ANYWHERE

Django Developer
ABNORMAL SECURITY 📍 USA

Python Developer
SIGMA ASSESSMENT SYSTEMS, INC. 📍 ANYWHERE

Senior Software Engineer, Python (Backend)
ASSEMBLYAI 📍 ANYWHERE

Enterprise GIS Data Engineer (Information Systems Analyst)
CITY OF SAN JOSE 📍 SAN JOSE, CA, USA

More Python Jobs >>>


Articles & Tutorials


PEP 698: Override Decorator for Static Typing
This Python Enhancement Proposal describes the use of a new decorator, @override, which would be used as a type-hint for methods in a sub-class that override a parent’s method. This type hint would introduce a level of safety if the parent method is refactored without corresponding changes to the child method.
PYTHON.ORG

5 Ways to Schedule Jupyter Notebooks
A Jupyter Notebook is an excellent tool for creating computational documents. There is often a requirement to update the notebook’s results at a selected time interval and publish it to the rest of the team. Piotr summarizes five different approaches for Jupyter Notebook scheduling.
PIOTR PŁOŃSKI • Shared by Piotr Płoński

Get Started Debugging Python Apps in PyCharm With This Tutorial
PyCharm is one of the most popular IDEs for Python development. This walkthrough for debugging will have you moving quickly →
ROOKOUTsponsor

Adventures With mypyc
The type annotation tool, mypy comes with a compiler called mypyc which uses Python type hints to generate C-extensions automatically. This blog posting describes how Steve used it to compile some of his code, the problems he ran into, and how he fixed them.
STEVE BRAZIER

Resiliency in Distributed Systems
This blog posting contains a brief summary and then two chapters from the book “Understanding Distributed Systems” by Roberto Vitillo. It describes how to make distributed systems more resilient from both the client’s and server’s perspectives.
GERGELY OROSZ

Custom Python Strings: Inheriting From str vs UserString
In this tutorial, you’ll learn how to create custom string-like classes in Python by inheriting from the built-in str class or by subclassing UserString from the collections module.
REAL PYTHON

Production Tips for Django Apps
This blog post describes seven concepts Django programmers should keep in mind when writing production ready code. Hints include information on custom user models, configuring Gunicorn, problems with serializers, and more.
RAUNAQ SINGH

Image Generation Using Stable Diffusion in KerasCV
Stable Diffusion is a powerful, open-source text-to-image generation model. This guide shows you how to generate novel images using the KerasCV Python interface.
CHOLLET, ET AL

Deploying Python Web Apps as AWS Lambda Functions
A step-by-step guide on how to deploy Python in the AWS Lambda environment. Details include managing dependencies and dealing with an ASGI application.
SIMON WILLISON’

Pytest for Beginners
This article introduces you to using pytest for testing Python code. Learn how to improve your development process and write better automated tests.
ŠPELA GIACOMELLI • Shared by Michael Herman

Hybiscus - Use a JSON API to Create Eye-Catching PDFs Without Any Design Skills
Use a simple API to build stunning PDFs from a set of pre-styled components. Choose from customisable components for layout, content or data visualisation. Get started with automating building PDFs in the cloud now, for any use case.
HYBISCUSsponsor

Want Cleaner Code? Use the Rule of Six
This article outlines six things every developer should keep in mind when coding, hopefully resulting in easy to read, more maintainable Python.
DAVIDAMOS.DEV

Developing RESTful APIs With Python and Flask
A step-by-step article that guides you through everything you need to know to write your first REST API using Flask. From installing the requirements, through mapping models, to implementing security.
KREBS & MARTINEZ • Shared by Juan Cruz Martinez


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

difftastic: A Structural Diff That Understands Syntax
GITHUB.COM/WILFRED

minestrone: Search, Modify, and Parse Messy HTML
GITHUB.COM/ADAMGHILL

refurb: Refurbish and Modernize Python Codebases
GITHUB.COM/DOSISOD

isort: Sort Your Imports
GITHUB.COM/PYCQA

📆🐍 Upcoming Python Events


STL Python
October 5, 2022

Crafting Software
October 5, 2022

Weekly Real Python Office Hours Q&A (Virtual)
October 5, 2022

Smart Iterator Challenge (Week 2)
October 8 to October 17, 2022

PyCon MEA @ Global DevSlam 2022
October 10 to October 14, 2022

PyCon Ghana 2022
October 13 to October 16, 2022

PyCon ZA 2022
October 13 to October 15, 2022
Happy Pythoning!
Copyright © 2022 PyCoder’s Weekly, All rights reserved.