Tuesday, January 4, 2022

PyCoder’s Weekly: Issue #506 (Jan. 4, 2022)

#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

alt

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 →
PULUMI sponsor

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

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

alt

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 APM sponsor

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 LTD sponsor

Projects & Code

Events

Python Miami

January 8 to January 9, 2022
PYTHONDEVELOPERSMIAMI.COM


Happy Pythoning!
This was PyCoder’s Weekly Issue #506.
View in Browser »

alt

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]



from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...