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

📧 Introduction to Distributed Tracing With OpenTelemetry in .NET

Saturday, April 20, 2024

​ Introduction to Distributed Tracing With OpenTelemetry in .NET Read on: m​y website / Read time: 5 minutes BROUGHT TO YOU BY ​ Shesha: The .NET Open-Source Low-Code Framework ​ Introducing Shesha, a

a16z’s Infrastructure team gets a new general partner

Friday, April 19, 2024

Post News is shutting down and Wall Street isn't feeling a Salesforce-Informatica pairing View this email online in your browser By Christine Hall Friday, April 19, 2024 Image Credits: Andreessen

New Roundtable! Additive for Mass Production Applications

Friday, April 19, 2024

The Outlook for the Future View this email in your browser engineering.com Roundtable - Additive for Mass Production Applications: The Outlook for the Future 6 Considerations for Choosing the Right

📷 What to Know About Macro Photography — Why You Should Buy a Budget Motherboard

Friday, April 19, 2024

Also: How to Automatically Highlight Values in Excel, and More! How-To Geek Logo April 19, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Is the wind going out of the AI sails?

Friday, April 19, 2024

Rippling vacuums up venture capital and Ramp bags more millions View this email online in your browser By Haje Jan Kamps Friday, April 19, 2024 Image Credits: Getty Images / Carol Yepes Welcome to

Llama 3 is out - Weekly News Roundup - Issue #463

Friday, April 19, 2024

Plus: brand-new, all-electric Atlas; AI Index Report 2024; Microsoft pitched GenAI tools to US military; Humane AI Pin reviews are in; debunking Devin; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Daily Coding Problem: Problem #1417 [Easy]

Friday, April 19, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Wayfair. You are given a 2 x N board, and instructed to completely cover the board with

Charted | How Hard Is It to Get Into an Ivy League School? 🎓

Friday, April 19, 2024

We detail the admission rates and average annual cost for Ivy League schools, as well as the median SAT scores required to be accepted. View Online | Subscribe Presented by: Discover the motivations

Dark Matter & Tortured Poets

Friday, April 19, 2024

New music releases aren't what they used to be -- for good and bad. Dark Matter & Tortured Poets By MG Siegler • 19 Apr 2024 View in browser View in browser New music releases in 2024 are a

Impact of AI on Product Management

Friday, April 19, 2024

​ Impact of AI on Product Management The rise of the AI Product Manager. Product managers have always championed customer's needs. However, with AI, the job requires new technical and ethical