Python is arguably the programming language nowadays. We’ll explore why that might be the case, what the current trends within the Python community are, and what packages and tools you might want to get acquainted with if you don’t want to be left behind.
If you were pondering what programming language you should be investing time and effort in, you can stop searching now. It’s Python.
Alright, that was an oversimplification. Admittedly, you aren’t going to jump into a Java project that’s been in development for years just to port all that code into Python just because it’s “hot”. Programming languages are a means to an end, and you have to carefully consider the cost/benefit of adopting a given technology.
That said, when things are massively moving in a certain direction, that has to mean something. And for some time already, things have been moving towards Python.
Want to level up your Python skills and stand out in a rapidly growing market? Check out SitePoint Premium! You’ll find books to get you started (like The Python Apprentice) and develop job-ready skills (like Front-end Testing in Python). Enhance your skills with The Python Master, and access a growing library of over 400 books and courses on web design and development.
Hail the King
Practically every undergraduate IT class today is taught with Python — and not just computer science introduction courses offered by companies or by unversities. Even highly specialized courses on data science, AI, or quantitative finance — that not long ago would have used languages such as R, MATLAB, or C++ — are now also more often than not entirely taught in Python.
Check out the trends as of 2019 for the past five years comparing Python, Java, C++ and PHP:
Quite eloquent, isn’t it?
What about a more comprehensive list of languages over a larger span of time? Sure:
How Did that Happen?
- Easy to learn. Unlike C++ or Java, Python is comparatively easier to approach, even for total noobs — which is among the reasons to why it’s the language of choice for introductory to programming courses.
- General purpose. Unlike PHP (which is intended for web programming) or R (which is intended for statistical analysis), Python is suitable for a number of tasks.
- Old and new. Unlike Visual Basic (which didn’t seem to stand the test of time) or Go (which is a fairly new, Nov 2009), Python is a relatively old language (1990), in active development, that has proved to be aging very well.
- Batteries included. Unlike all of the languages mentioned, Python has a huge so-called Standard Library that covers all sorts of tasks, from specific fields to general tasks.
What’s more — and yes, this is very biased, but … — Python is fun!
But enough praising; let’s dig in a bit. I’ll highlight just a handful of tools that demonstrate the power of Python. There are, of course, many more to discover.
Artificial intelligence is ubiquitous these days (I double dare you to find a process that couldn’t be improved with the inception of AI), and it’s a vast field of study in which Python most certainly shines.
You’ll find, not surprisingly, some common ground with the data science section, so let’s also catch up later for more packages too!
- PyTorch. A new machine learning framework based on Torch. It’s quickly gaining momentum by enabling strong accelerations via the GPU to make use of deep neural networks (DNN).
- scikit-learn. A machine learning library that’s very easy to use (for example, train a supervised learning algorithm in six lines of code), with simple and efficient tools for data mining and data analysis.
- TensorFlow. Yet more machine learning but with dataflow and differentiable programming. Also very powerful for developing deep learning models using neural networks.
- Django REST framework. A powerful and flexible toolkit for building browsable web APIs. It supports serialization, authentication policies, and customization of views, among other features. Running on of Django, it’s also very well documented.
- Pika. The pure-Python implementation of RabbitMQ, a high-scale, high-availability message-broker that allows for asynchronous messaging across different platforms and systems.
- Serverless Framework. While being developed in Node.js, if offers tons of examples about how to build and deploy Python applications to Amazon Web Services (AWS), the Google Cloud Platform (GCP) and Microsoft Azure.
Additionally, it’s good to get familiar with AWS Lambda, Amazon API Gateway, Cloud Functions and Azure Functions. These are Amazon, Google and Microsoft services that you will use to actually deploy your Python code to the cloud.
Cryptocurrencies and Finance
I won’t get into a discussion here about whether or not Bitcoin and other cryptocurrencies are an economic bubble (they are!), as that would initiate endless heated debate.
But one thing is for certain: *the uses of the blockchain technology go further than cryptocurrencies and ICO.)
And if you’d like to delve into the finance side of things, you can apply that knowledge to all financial markets — cryptocurrencies included.
Python is mostly used as a server-side language and not so much client-side (for things like wallets). With that in mind, to develop blockchain, you can in fact use frameworks such as TensorFlow and Django (see the AI and web development sections, respectively, for more details).
That said, there are a handful of blockchain- and finance-related packages that might come in handy, such as api-v1-client-python (Blockchain Bitcoin developer APIs), and SmartPy (smart contract language for Tezos).
For quantitative analysis, check pandas (see the data science section) and Zipline (a pythonic algorithmic trading library).
Just like with AI, Python has solemnly proven its place within the data science field among players like R and MATLAB.
Truth be told, while not being meant as general-purpose tools, these other languages did have an edge when compared to Python, both in terms of performance and capabilities. That isn’t the case anymore, though, as Python has come a long way since then, and there’s hardly any given task you can’t perform in Python as effectively — if not more so — as you would on these other platforms. And Python is still a general-purpose language, meaning that it can do much more for you.
- NumPy. Python meets MATLAB: linear algebra with support for large, multi-dimensional arrays and matrices, and a large collection of high-level mathematical functions to manipulate them.
- pandas. High-performance, easy-to-use data structures for data analysis, in particular data manipulation of numerical tables and time series. Check out this video series of the Data School!
- SciPy. Routines for scientific and technical computing, including statistics, optimization, numerical integration, interpolation, special functions, FFT, signal and image processing, and ODE solvers.
Web Development and Mobile Apps
Yes, web development is still a thing in 2020! Who knew? If you ask me, not only are there many more years ahead for web development, but the line between web and mobile apps is only going to become more blurry.
Admittedly, Python might not play a leading role here, but there’s an edge: you can project manage things easier, moving team members around, because chances are that other ends of the ecosystem you’re working with are also going to be developed in Python.
In other words, as a Python player, you can play many games.
- Flask. A lightweight web application framework. As a microframework, it doesn’t require particular tools or libraries, which also means no database abstraction layers. But sometimes minimalism and performance is the name of the game.
- Django. “The web framework for perfectionists with deadlines” (I do love that tagline!) Quick, secure and scalable, its object-relation mapping (ORM) and its model-template-view (MTV) systems are so good that many use the framework even for non web-related work. Instagram, Spotify, Pinterest, Dropbox, and even YouTube are examples of sites built with Django.
- Kivy and BeeWare. In a nutshell, Kivy is for developing cross-platform GUI’s, and BeeWare is for developing native, multi-platform apps, including desktop and mobiles. They’re still modest players compared to Ionic, but things might change in the near future.
Extra: Tools You Ought to Own
iPython was originally presented as a tool for “interactive computing” (live typing and execution of code), but soon a group of developers realized that the idea behind it had so much potential that they created Project Jupyter as a spin-off.
Later, JupyterLab would come in, which took the concept of “notebook interfaces” (executable code, output and annotations that you can share) to the next level, supporting an array of languages, not just Python. Try it!
Finally, in a a fashion similar to Shiny from the R Studio, the Jupyter ecosystem introduced Voilà, which “turns Jupyter notebooks into standalone web applications“. Check the gallery of Voilà dashboards. It’s quite impressive.
So if you haven’t already, you really should get familiar with these tools. They will simplify your workflow tremendously, allowing for faster testing and sharing of code.
Nothing lasts forever, perhaps most notably in IT. If we can conclude something from the Most Popular Programming Languages 1965–2019 clip at the intro, is that programming languages reign come and go. Yes, now the king is a nonvenomous snake, but you won’t be surprised if one day you hear the uproar from the masses: the king is dead, long live the king!
Although it doesn’t seem this is going to happen that soon, surely many of the tools and packages we reviewed here will go unmaintained, discontinued, forked, or taken over by competitors. And we know that as much as it’s fun to learn to do things in a new way or with a new tool, it can also be a pain if you already have a workflow going. But hey, we wouldn’t be talking technology if we wanted things to remain the same, right?
So stay alert, always with your radar on, keep an eye on the PyCons — both the conferences in your city and the clips on YouTube — to see what’s new on the horizon. And don’t shy away from trying new things every once in a while. That way, you’ll stay in good shape.
Find your next remote Python job with SitePoint Remote, where we handpick the best remote jobs for developers, designers and digital professionals.