Python and Open-Source

Python and Open-Source

Python and open-source software share an intertwined past and present. Let's explore just a few of the strands linking the two.

Python: Open Source and Open Governance

First, there's the obvious: the Python interpreter, standard library and built-in modules are completely open-source. Anyone can view the source code in order to better understand how the language works. With continuous public exposure of all the source code, anyone can spot potential problems and suggest fixes or even new features. Actually reviewing and implementing those fixes for the benefit of the whole community of users, however requires much more than allowing the whole world to view the source code. This requires an open approach to the stewardship of the language, and Python has a very open governing structure.

Python’s continual development is open and transparent, stewarded by the Python Software Foundation. Improvement of the language is achieved by Python Enhancement Proposals (PEPs) which are submitted, debated and implemented by developers worldwide. This approach--combining non-profit foundation ownership with volunteer leadership--is common for large open-source projects like the Linux kernel or LibreOffice. One of the biggest advantages of this open model of project governance is that a single software or hardware vendor is unable to control the direction of the project in order to server its own narrow commercial interests.

Open-Source Software Built with Python

Not only is the Python language itself open-source software, but Python is a often the language of choice for writing other open-source software. For instance, the main command-line and graphical configuration programs for the Fedora Linux distribution are written in Python. An important example includes the software package management program DNF (as well as its predecessor YUM, which is still used in Red Hat Enterprise Linux, CentOS and Scientific Linux).

It's not just small utilities that are written in Python. Consider Ansible, which is a powerful IT automation engine combined with modules to handle almost any IT task, and is powered by Python 2. Another example is the OpenStack cloud operating system, whose many modules are written in Python.

A LAMP to Light the Way . . .

Part of the reason why Python has become so common in the open-source world is because it was one of the few server-side programming languages used in the popular open-source web application software stack known as “LAMP”, an acronym derived from the names of its main components:

Linux: The operating system kernel, which is the foundation because the kernel interacts directly with the CPU, network and storage drives and provides them as resources to user applications.

Apache: The webserver application. Apache transfers web pages to clients. Apache works with the next two components in this stack to make dynamic web content possible, like message forums.

MySQL: This a database server which can add, delete, modify and retrieve information stored in a database using Structured Query Language (SQL). One of MySQL's greatest strengths is the ability to handle thousands of database users changing and retrieving data at the same time, a requirement for websites with a lot of traffic.

Perl, Python and PHP: these three programming languages allow web developers to write programs that can generate web pages which change in response to data entered by a user. A big part of their job is to interface with MySQL which stores and updates the data from which new webpages can generated, which are then served to web clients via Apache. Recently, these three P's have been joined by Ruby.

LAMP was the first completely open-source web application stack which could run on the low-cost CPU's made by Intel and AMD, as opposed to the expensive proprietary RISC CPU's from HP, IBM and Sun Microsystems. LAMP was a low-cost solution to real-world problem, and not surprisingly, LAMP rocketed in popularity among web masters and web developers around the world.

As LAMP powered more and more websites, the popularity of each of its software components grew along with it. This was especially true for Linux, because without useful applications an operating system kernel is a lot like having railroad tracks without trains: the infrastructure is there, but no one is able to use it. As the number of these LAMP-based webservers grew, so did the demand for web developers and server administrators with Python skills. This demand drove people to learn Python and to contribute to it. Just as the rising tide of LAMP lifted the Linux's boat, Python's vessel also rose.

Python both strengthens and benefits from the wider open-source software ecosystem. Having attracted thousands of developers due it's versatility and transparent governance, Python will continue to be used for code that runs behind the scenes and for code that runs the Web.

Copyright © Python People