🐶 Python Weekly #376: Faster CPython at PyCon

PyDo Python Weekly Newsletter is part of FAUN Developer Community. We help developers learn and grow by keeping them up with what matters.

--

⭐ Sponsors

The all-in-one monitoring solution for IT admins, DevOps and SREs

Get deep visibility into the performance of your complex enterprise applications and cloud native workloads. Identify potential issues, improve productivity, and ensure that your business and end users are unaffected by downtime and substandard performance.

Download a 30-day free trial .

👉 Spread the word and help developers find you by promoting your projects on FAUN. Get in touch for more information.

🔗 From the web

How to Containerize a Python Application with Paketo Buildpacks

Building even simple Dockerfiles can be a challenge. This article will demonstrate an alternative method of containerizing an application, using Paketo Buildpacks.

Writing Python like it’s Rust

The author started programming in Rust and it influenced their approach to designing programs in Python. They emphasize the use of type hints, data classes for structured data, algebraic data types for explicit data shapes, and new types for specifying domain-specific usage of existing types. These practices lead to more robust and maintainable Python programs.

Language Identification: Building an End-to-End AI Solution using PyTorch

This article explains how to perform language identification using Intel’s PyTorch AI framework and Neural Compressor. It provides a code sample that uses the Hugging Face SpeechBrain toolkit and Common Voice dataset to train a model capable of identifying up to 93 languages. The article discusses optimizations with Intel Extension for PyTorch and Intel Neural Compressor to improve inference performance.

How to Build the Memory Tile Game Using Python

Keep a check of your cognitive abilities by building this memory tile game.

✅ PGP signatures on PyPI: worse than useless

A large number of PGP signatures on PyPI can’t be correlated to any well-known PGP key and, of the signatures that can be correlated, many are generated from weak keys or malformed certificates. The results suggest widespread misuse of GPG and other PGP implementations by Python packagers, with said misuse being encouraged by the PGP ecosystem’s poor defaults, opaque and user-hostile interfaces, and outright dangerous recommendations.

✅ My Favorite Python Packages for Building Flask Applications

When building Flask applications, use Python packages like APIFairy for APIs, Frozen-Flask for static websites, Flask-SQLAlchemy for databases, Gunicorn for production servers, pytest for testing, Flask-Login for user management, Flask-Sessions for sessions, pydantic for data validation, Flask-WTF for forms, and Flask-Mail for sending emails. These packages save time and provide expertise from other developers.

Makefile tricks for Python projects

This is a Makefile template for Python projects that includes basic configuration, setting up a virtual environment, overriding paths, a default goal for help, injecting paths into PYTHONPATH, creating a virtual environment, and additional tooling can be added based on project needs.

Securing PyPI accounts via Two-Factor Authentication

PyPI (Python Package Index) is requiring its users to enable two-factor authentication (2FA) to access certain functionalities such as uploading and deleting packages, starting from this week. PyPI admins have also announced that they will mandate 2FA for every maintainer of every package or project on PyPI by the end of 2021. The decision is aimed at improving the supply chain security of the Python ecosystem.

Faster CPython at PyCon

In part one of the tale, Brandt Bucher looked specifically at the CPython optimizations that went into Python 3.11 as part of the Faster CPython project. More of that work will be appearing in future Python versions, but on day two of PyCon 2023 in Salt Lake City, Utah, Mark Shannon provided an overall picture of CPython optimizations, including efforts made over the last decade or more, with an eye toward the other areas that have been optimized, such as the memory layout for the internal C data structures of the interpreter. He also described some additional optimization techniques that will be used in Python 3.12 and beyond.

Using NumPy to replace Pandas GroupBy-Apply pattern for performance

Pandas UDF can be limited, so we can speed up the Pandas GroupBy-Apply pattern by using NumPy instead, resulting in a significant performance improvement. However, it’s important to benchmark and consider costs before deciding between Pandas and NumPy for your specific use case.

✅ Your First Steps With the Kivy Library for GUI Development

Your First Steps With the Kivy Library for GUI Development. Kivy is an open-source Python software library for developing graphical user interfaces.

⭐ Supporters

Cloud Native Microservices With Kubernetes

“Cloud Native Microservices With Kubernetes” is a hands-on, example-rich guide focused on real-world examples and practical learning that covers everything needed from the basics to the most advanced concepts.

OpenAI GPT For Python Developers

Explore the fascinating world of Artificial Intelligence and solve real-world problems!

In this practical guide, you will build intelligent real-world applications using GPT-3, DALL-E, Whisper, CLIP, and more tools from the OpenAI and ML ecosystem.

Rest assured, you don’t need to be a data scientist or machine learning engineer to follow this guide

👉 Spread the word and help developers find you by promoting your projects on FAUN. Get in touch for more information.

ℹ️ News

Thinking about running for the Python Software Foundation Board of Directors? Let’s talk!

The PSF Board Election is happening soon. Current board members will be available on Slack in June to answer questions about board responsibilities. Nomination period: June 1st — 15th. Voting: June 20th — 30th. Join Slack or email psf-elections@python.org for more info. Check psfmember.org for membership status.

🎦 Videos

The End of Moore’s Law?

What if it is the end of Moore’s Law? What is Moore’s Law? What are the alternatives in the tech industry and how will it be impacted? This is what you’re going to discover in this video.

⚙️ Tools

Sxvxgee/UnlimitedGPT

An unofficial Python wrapper for OpenAI’s ChatGPT API

z0m31en7/WhatMail

WhatMail is a command-line tool that analyzes the header of an email and provides detailed information about various fields.

DJRHails/PyMender

Perform entire codebase refactors in a way that is reproducible, testable and reviewable. Convert to FastAPI Annotated in one step.

👉 Spread the word and help developers find and follow your Open Source project by promoting it on FAUN. Get in touch for more information.

🛍️ Swag Store

The Orchestrate T-shirt

❤️ 20% exclusive discount for FAUNers on all products (+free shipping included) when you use the code “THANKSFAUN”.

😂 Meme of the week

❤️ Thanks for reading

👉 Never miss an issue
Join FAUN Developer Community and subscribe to our newsletter here.

👋 Keep in touch and follow us on social media:
- 💼LinkedIn
- 📝Medium
- 🐦Twitter
- 👥Facebook
- 📸Instagram

👌 Was this newsletter helpful?
We’d really appreciate it if you could share it with your friends! You can also donate to help us keep this newsletter going.

ℹ️ Have a question or feedback?
Feel free to reach out to us at community@faun.dev. We’d love to hear from you!

🤩 Want to sponsor our newsletter?
Reach out to us at sponsors@faun.dev and we’ll get back to you as soon as possible.

--

--