Understanding if __name__ == ‘__main__’ in Python Programs | Sachin Pal
Understanding functools, Libraries for Enhanced Parallel Processing, Type Checking along with some more interesting articles and packages
Python Gets Its First Community Communications Manager
Last month, Fedora community architect Marie Nordin became the first community communications manager for the Python Software Foundation.
# David Cassel
Understanding if __name__ == ‘__main__’ in Python Programs
We all use this “if __name__ == '__main__':” in our Python script a lot but many of us don’t know why it needs to be used. This is explained well in this article.
In a nutshell, if __name__ == "__main__": is like a gatekeeper that ensures that a specific portion of your Python script runs only when you directly execute that script.
# Sachin Pal
Understanding functools in Python
One of the many useful features Python offers is the functools module. In this article, the Author covered what functools is, its benefits, important functions it provides, how to use them, their pros and cons, best practices, advanced usages, and real-life examples.
# Anand Rathore
Python Libraries for Enhanced Parallel Processing
Python is famous for its simplicity and readability. However many complain when it comes to parallel processing. This is where Python packages for parallel processing come into play. In this article, the Author covered five notable frameworks (Ray, Dask, Pandaral·lel, Dispy & Ipyparallel) that can help you achieve efficient parallel processing in Python.
# Sivakumar Mahalingam
Python Type Checking
This article is pretty extensive and well-written. A lot of ground was covered related to Python Type checking. Mainly in this article, the Author covered: What is type checking? Why do we need it? What's the difference between static and runtime type checking?
# Jan Giacomelli
Running Python Parallel Applications with Sub Interpreters
Python 3.12 introduced a new API for “sub interpreters”, which is a different parallel execution model for Python that provides a nice compromise between the true parallelism of multiprocessing, but with a much faster startup time. In this post, the Author explained what a sub interpreter is, why it’s important for parallel code execution in Python and how it compares with other approaches. It's a bit deep but very good.
# Anthony Shaw
Python — Managing Virtual Environments with pipenv
Managing virtual environments is important or else we will get into all kinds of crazy problems when we work on multiple projects. There are several options like venv which is a built-in library. In this article, the Author covered the pipenv library which is a good alternative to venv and gave good examples.
# Ihor Lukianov
Interesting Packages to explore
PyMuPDF - PyMuPDF is a high-performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
EasyOCR - Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
Networkx - It is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.