Build a Social Network With Django, Make Your Own Linter, Log Injections Attacks, and More

#506 – JANUARY 4, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Gem: Exploding String Alternatives
Here’s a Python gem: a small bit of Python that uses the power of the language and standard library well. It’s a function to list strings generated by a pattern with embedded alternatives. It takes an input string with brace-wrapped possibilities, and generates all the strings made from making choices among them: explode("{Alice,Bob} ate a {banana,donut}.")
NED BATCHELDER

Build a Social Network With Django – Part 1
In this four-part tutorial series, you’ll build a social network with Django to showcase in your portfolio. You’ll learn about relationships between Django models and how to use forms so that users can interact with your app. You’ll also make your site look good by using the Bulma CSS framework.
REAL PYTHON

Provision Your Cloud Infrastructure Using Python and Pulumi
What if you could use your existing programming knowledge to build, deploy, and manage cloud infrastructure using your favorite languages and tools? Pulumi is a cloud engineering platform that lets you write infrastructure as code in any programming language, on any cloud platform. Get started today →
PULUMIsponsor

Learn Python ASTs, by Building Your Own Linter
A guide to Abstract Syntax Trees in Python. They form the basis of a lot of tools we take for granted, like linters, code formatters and syntax highlighting. With this article you’ll get to learn about ASTs by building your own linter from scratch.
TUSHAR SADHWANI • Shared by Tushar Sadhwani

urllib3 Raised $15,000 in 2021
SETH MICHAEL LARSON

Django Developers Survey 2021 Results
DJANGO SOFTWARE FOUNDATION


Discussions


Python vs C % (Modulo/Remainder) Operator Behavior
In Python the % operator returns a number with the same sign as the second argument. C doesn’t actually have a “modulo” operator but a “remainder” operator, according to the C spec. Read the Hacker News discussion after the tweet for a full explanation.
TWITTER.COM/ID_AA_CARMACK

Python Threads Scheduling Differences Between 3.10 and 3.9
“Unintended consequence of Mark Shannon’s change that refactors fast opcode dispatching […]”
STACK OVERFLOW


Python Jobs


Senior Software Engineer (Anywhere)
BREW

Senior DevOps Engineer (San Jose, CA, USA)
TARA TECHINCAL SOLUTIONS

Senior Python Developer (100% Remote) (Anywhere)
SIX FEET UP

Senior Software Engineer (Anywhere)
BRAVELY

More Python Jobs >>>


Articles & Tutorials


Is Your Python Code Vulnerable to Log Injection?
Following the news on log4j lately, you may wonder if Python’s logging library is safe. After all, there is a potential for injection attacks where string formatting meets user input. Thankfully, Python’s logging isn’t vulnerable to remote code execution. Nonetheless it is still important to be careful with untrusted data. This article describes some common pitfalls, and how logging f-strings could—in certain situations—leave you vulnerable to other types of attacks.
ARIE BOVENBERG • Shared by Arie Bovenberg

2021 Real Python Articles Wrap Up
It’s been a year of change at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also added many new members to the team, updated the site’s features, and created new styles of tutorials and projects.
REAL PYTHON podcast

Application Performance Monitoring, Built for Developers by Developers
Scout is an application performance monitoring tool designed to help Python developers find and fix performance issues quickly. With unlimited seats and applications, users of Scout’s APM tool find that anyone can be a performance expert. Click to sign up for your free 14-day trial today →
SCOUT APMsponsor

Python Type Hints: How to Handle Optional Imports
This post is not about importing typing.Optional, but instead imports that are themselves optional. Libraries often have optional dependencies, and the code should work whether or not the import is there.
ADAM JOHNSON

Reading Tracebacks in Python
When exceptions go unhandled, Python prints a traceback. Tracebacks are read from the bottom upward. The last line describes what happened and lines above describe where it happened.
TREY HUNNER

Three Problems With a Tool
A discussion of three problems with Python: “packaging, fractured tooling, crufty standard library”
MOSHE ZADKA

What’s Your Favorite Programming Language?
Take the Developer Nation survey, share your views and make an impact on the developer ecosystem. Plus, you get a chance to win cool prizes, licenses, gaming accessories, vouchers and many more.
SLASHDATA LTDsponsor

Pointers/References in Python
DENNIS YURICHEV

Unravelling elif/else From if Statements
BRETT CANNON

Unravelling finally and else From try Statements
BRETT CANNON

Using Borb to Create Ebooks From Project Gutenberg
JORIS SCHELLEKENS • Shared by Joris Schellekens


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 →

numbers-parser: Python Module for Parsing Apple Numbers Spreadsheets
GITHUB.COM/MASACCIO

NetworkX: Network Analysis in Python
NETWORKX.ORG

python-minifier: Transform Python Source Code Into It’s Most Compact Representation
GITHUB.COM/DFLOOK • Shared by Python Bytes FM

emacspy: Program Emacs in Python Instead of ELisp
GITHUB.COM/ZIELMICHA

fastwsgi: Ultra Fast WSGI Server for Python 3
GITHUB.COM/JAMESROBERTS

django-browser-reload: Automatically Reload Your Browser in Development
ADAM JOHNSON

📆🐍 Upcoming Python Events


⋅ Weekly Real Python Office Hours Q&A (Virtual) January 5, 2021

⋅ Canberra Python Meetup January 6, 2022

⋅ Sydney Python User Group (SyPy) January 6, 2022

⋅ Reunión Python Valencia January 6, 2022

⋅ Python Miami January 8 to January 9, 2022

⋅ DFW Pythoneers 2nd Saturday Teaching Meeting January 8, 2022

⋅ Edmonton Python User Group January 10, 2022
Happy Pythoning!
Copyright © 2022 PyCoder’s Weekly, All rights reserved.
You are receiving this email because you opted in on our website at pycoders.com
Our mailing address: DevCademy Media Inc. · #720-999 West Broadway, Vancouver BC V5Z 1K5, Canada

Unsubscribe | Update Email Address

Older messages

The "zipimport" Module, Fast Async HTTP Requests, Versioning, PEP 669, and More

Tuesday, December 28, 2021

Python Zip Imports: Distribute Modules and Packages Quickly #505 – DECEMBER 28, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Python Zip Imports: Distribute Modules and Packages Quickly In this

Python Exceptions, Poetry, Steering Council Elections, and More

Tuesday, December 21, 2021

Raising and Handling Python Exceptions #504 – DECEMBER 21, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Raising and Handling Python Exceptions In this course, you'll learn what an exception

Advent of Python, Error Message Styles, Django 4.0, and More

Tuesday, December 7, 2021

Advent of Code: Solving Your Puzzles With Python #502 – DECEMBER 7, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Advent of Code: Solving Your Puzzles With Python Advent of Code is an online

Python Argument Defaults, Data Viz With Dash, Rats in VR, and More

Tuesday, November 30, 2021

Late-Bound Argument Defaults for Python #501 – NOVEMBER 30, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Late-Bound Argument Defaults for Python Python supports default values for arguments to

Python News Roundup, Web Performance Benchmarking, Static Duck Typing, and More

Tuesday, November 23, 2021

Python News: What's New From October 2021? #500 – NOVEMBER 23, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Python News: What's New From October 2021? The Python community gave a warm

You Might Also Like

Distributed Locking: A Practical Guide

Monday, December 23, 2024

If you're wondering how and when distributed locking can be useful, here's the practical guide. I explained why distributed locking is needed in real-world scenarios. Explored how popular tools

⚡ THN Weekly Recap: Top Cybersecurity Threats, Tools and Tips

Monday, December 23, 2024

Your one-stop-source for last week's top cybersecurity headlines. The Hacker News THN Weekly Recap The online world never takes a break, and this week shows why. From ransomware creators being

⚙️ OpenA(G)I?

Monday, December 23, 2024

Plus: The Genesis Project ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Post from Syncfusion Blogs on 12/23/2024

Monday, December 23, 2024

New blogs from Syncfusion Introducing the New WinUI Kanban Board By Karthick Mani This blog explains the features of the new Syncfusion WinUI Kanban Board control introduced in the 2024 Volume 4

Import AI 395: AI and energy demand; distributed training via DeMo; and Phi-4

Monday, December 23, 2024

What might fighting for freedom in an AI age look like? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

LockBit Ransomware Developer Charged for Billions in Global Damages

Monday, December 23, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Re: How to know if your data has been exposed

Monday, December 23, 2024

Imagine getting an instant notification if your SSN, credit card, or password has been exposed on the dark web — so you can take action immediately. Surfshark Alert does just that. It helps you stay

Christmas On Repeat 🎅

Monday, December 23, 2024

Christmas nostalgia is a hell of a drug. Here's a version for your browser. Hunting for the end of the long tail • December 22, 2024 Hey all, Ernie here with a refresh of a piece from our very

SRE Weekly Issue #456

Monday, December 23, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: On-call during the holidays? Spend more time taking in some R&R and less getting paged. Let alerts make their rounds fairly with our

The Power of an Annual Review & Grammarly acquires Coda

Sunday, December 22, 2024

I am looking for my next role, Zen Browser got a fresh new look, Flipboard introduces Surf, Campsite shuts down, and a lot more in this week's issue of Creativerly. Creativerly The Power of an