8 Python Frameworks & Libraries to Check Out in 2019

Habeeb Shopeju
11 min readFeb 24, 2019

--

Python continues to remain a popular programming language in 2019, getting better in leaps and bounds. The language is definitely benefiting from its simplicity, and the attention of the open source community.

Table of Contents

The powerful frameworks and libraries available in the language ensure it remains a powerful tool. Data Science, Machine Learning, Web Development, Penetration Testing, Cloud Computing, these are areas where Python is making an impact and things can only get better.

This article would be a discussion of powerful frameworks and libraries you should check out this year. While you may not immediately need them in a project, it’s awesome to be aware of these tools, so you can pick them up when you need to.

Before going deep into this write up, here is a list of the libraries you’ll be learning about:

  • Boto (Cloud)
  • Pattern (Machine Learning)
  • Eli5 (Data Science, Machine Learning)
  • Dash (Data Science, Web Development)
  • Chatterbot (Machine Learning)
  • Zappa (Cloud, Web Development)
  • spaCy (Data Science, Machine Learning)
  • Graphene (Web Development)

Without wasting much time, let’s get into the thick of things. You’d see the world of possibilities opened by these tools, and reasons why you should at least check them out or give them a try in your next project.

Boto (Cloud)

GitHub: 4,078 Stars

Amazon Web Services remains the most used cloud service platform — which is quite debatable. With a lot of applications and services running on AWS, the need to administer your cloud resources through scripts would arise i.e. using the terminal or web user interface may not be effective enough.

Boto is an Amazon Web Service SDK for Python which allows developers write scripts to manage the platform’s services. With Boto, you can manage cloud services from inside your Python scripts.

You can do almost anything you’d do from your console as regards AWS, such as working with the Amazon Simple Storage Service (S3), Amazon Elastic Compute Cloud (EC2) or DynamoDB.

Imagine the ease that comes with backing up the images of your EC2 instance or versioning your S3 bucket from a Python script.

That’s huge!

Boto isn’t supposed to replace the web interface or console for managing your AWS resources, but it remains a powerful tool for automation.

Installing Boto

Boto3 is the latest version of Boto, somewhat different from an older version which has the original name “Boto.”

You’ll have access to the latest features by installing the latest version. Boto can be installed using pip:

pip install boto3

Before Boto can work, you’ll need to set up the access keys and secret keys — more on that in the documentation.

Note: Do not make the mistake of sharing the file that has your access keys and secret keys in a public repository.

Pattern (Machine Learning)

GitHub: 6,739 Stars

Machine learning relies on huge datasets to thrive. It is no news that the quantity of the dataset is not all that matters, the quality is important too.

After doing a bit of data science, you’ll agree that web scraping is one way to extract data from the web. Indeed, there are libraries that can be used for web scraping. The combination of some Python libraries such as Requests and Beautiful Soup can make a powerful web scraping tool.

Pattern is quite different though. Instead of being a cog in the web scraping machine, it is the machine itself. Pattern is a web mining library you can use to mine data, be it from Twitter or Google.

You’ll be surprised to know — just as I was surprised too — that Pattern also has tools for Natural Language Processing (NLP), Network Analysis and Visualization.

With Pattern, you can also perform the N-gram search, make use of part of speech taggers and the WordNet feature (WordNet is a large lexical database of English language).

Looking at how strong Pattern is at sentiment analysis: it works great with a lot of languages, but isn’t available in Spanish and German. If you know Mandarin Chinese and you’re interested in helping out with Pattern’s sentiment analysis for the language, you can help contribute to the project.

Working with the Python Requests library makes the job of visiting URLs easy, but it can be slow. Pattern has the ability to do this faster, by using asynchronous requests, doing more in little time.

Installing Pattern

Pattern doesn’t require any setup. All you have to do is to install it, and that can be done using pip:

pip install pattern

Pattern is extremely easy to use. You can check out how much cool stuff you can do with it through its documentation.

Eli5 (Data Science, Machine Learning)

GitHub: 1,161 Stars

Machine learning classifiers are key to supervised learning. If you’re into machine learning, you’ll understand the concept of classification of data points and how it can be applied to real life problems such as spam detection.

A lot of times, checking the validity or accuracy of machine learning classifiers is done at the surface level. If you want to go deeper, Eli5 is the library you need to check out as soon as possible.

Eli5 is a Python library for debugging and inspecting machine learning classifiers. With this amazing library, you can work on your classifiers and understand what is being done instead of guessing your way through.

To make it better, Eli5 has a seamless integration with some of the popular frameworks you use for your classifiers such as Scikit-learn, Xgboost and LightGBM.

One thing that makes Eli5 stand out, is its ability to inspect black-box models. It does this using Permutation Importance (PI) and TextExplainer.

Eli5 can be an extremely effective tool for you, if you are into machine learning.

When you check out Eli5, you’ll be pleased with its formatting. It doesn’t just provide the results of debugging in text, it has also formats it using cool color combinations.

Eli5 provides visualizations for your machine learning models which are available via the console or HTML; the HTML can be embedded in a Jupyter Notebook.

Installing Eli5

Like a lot of Python packages, Eli5 can be installed using the pip tool. However, it requires Scikit-learn to be installed on your machine.

You can install Eli5 with the command below:

pip install eli5

Eli5 has great documentation, you can check out the tutorials that come with it.

Dash (Data Science, Web Development)

GitHub: 7,671 Stars

You’ll agree without any doubt that JavaScript is King when it comes to front-end web development. Barely will you be able to pull off any front-end project without using JavaScript.

This can be stressful for you as a Python developer. Switching syntax from Python to JavaScript can be quite discomforting.

Dash comes to the rescue, well, only for creating dashboards. Dash is a Python framework that allows you build web applications for data analysis without having to write JavaScript.

Dash is written in Flask, ReactJS and Plotly.js and abstracts all of the front-end code including HTML and CSS so you don’t have to write them.

Now you can create beautiful tables on your web pages, build interactive graphs, showcase data visualization, writing Python code only.

While, you may have to write some front-end code if you want to customize your dashboard beyond the Dash defaults, it’s still powerful enough for simple and beautiful visualizations.

Installing Dash

Dash is made up of different libraries, which you have to install separately. You’ll have to install the following:

  • The dash library itself for the dash backend.
  • The dash-html-components for creating the HTML components.
  • The data-core-components which supports the core dash backend.
  • The dash-table for creating interactive and beautiful tables.

You can install all of them using the pip commands below:

pip install dashpip install dash-html-componentspip install dash-core-componentspip install dash-table

Dash also allows you load data from Pandas dataframes and create charts with them. You can check out more on that from its documentation.

Chatterbot (Machine Learning)

GitHub: 7,523 Stars

Automated static responses from chatbots put people off. Hence the need for dynamic responses. If you’ve worked with chatbots before, you’d know that building amazing conversational interfaces is not the easiest of tasks.

Chatterbot is a Python library that can ease you through the task of building chatbots, by allowing you rely on an existing conversational dialog engine for creating chatbots.

It is amazing to know that chatbots built with Chatterbot improve with every conversation, therefore they provide more suitable responses to incoming messages over time. All this without you having to write any extra code.

Chatterbot is also proficient with mathematics or time-based messages. So when you get to ask the chatbot questions like “What is 2 plus 3”, you can get an answer with the mathematics done.

How does Chatterbot do this all this? It makes use of an existing data utility to train the chatbot during conversations. Through this existing data utility, Chatterbot is able to build chatbots that can be trained to converse in any language.

Doing NLP through the full Natural Language Toolkit (NLTK) package is some trouble, considering its size. With Chatterbot, you do not have to download the full NLTK package to perform Natural Language Processing.

If you are a web developer, you’d be interested in the library as it can be integrated easily with Django. Therefore, you can build chatbots and integrate them into in your applications, without having to do a ton of machine learning work.

Installing Chatterbot

Chatterbot is easy to install. As simple as using the pip install command:

pip install chatterbot

Start creating amazing stuff with Chatterbot right away, its documentation is quite comprehensive.

Zappa (Cloud, Web Development)

GitHub: 8,537 Stars

Cloud computing keeps getting bigger with more services coming to limelight. The concept of serverless applications has been gaining a lot of attention in recent times.

If you do not already know what serverless is, serverless is basically a computing service that ensures you only pay for your application’s uptime and do not have to worry about its scalability. So you only pay when the application is invoked and tasks such as load balancing are automated.

Serverless tries to abstract the whole concept of the cloud from you the developer, so you can focus on building alone. Thus, Zappa is a library that aims to help you focus better.

Zappa is a Python library for deploying serverless Python applications to AWS Lambda. This amazing library ensures you don’t have to touch anything relating to AWS before you deploy. Just leave the deployment task to it, and it would do it gracefully.

Zappa is powered by AWS Lambda (which is a compute service from Amazon to run serverless code). Zappa should be your go-to library for deploying serverless Python web applications.

You should check out Zappa anytime you need to deploy your microservices or large applications using Flask, Pyramid or Django.

As an extra service, Zappa can also be used to schedule functions to occur at intervals which can be an alternative to the powerful Celery, especially if you do not want to get involved in the hassle that comes with setting up Celery.

Installing Zappa

You can install Zappa using the pip command, as seen below:

pip install zappa

After install, you need to have a valid AWS account and properly setup your AWS credentials. This is because Zappa detects the application you are trying to deploy and creates the deployment configuration settings automatically.

To deploy your application, all you do is:

zappa initzappa deploy

Your application will be deployed with the command above. It can be as easy as that. To learn more about Zappa, checkout its documentation.

spaCy (Data Science, Machine Learning)

GitHub: 12,114 Stars

If Natural Language Processing (NLP) is something you are interested in, then spaCy is the library for you. spaCy is an open source library for performing advanced Natural Language Processing using Python.

While NLP is quite easily done in English, spaCy has extended support for up to 34 languages including but not limited to Greek, Arabic, Spanish and German. You can also make use of 13 statistical models available in 8 languages.

You’ll be amazed at the speed at which spaCy works. It is about the fastest NLP library you would find. As an NLP library, spaCy is able to help in building chatbots, but the documentation states that it is mainly for text processing.

As someone interested in machine learning, you probably would have an eye for deep learning too. spaCy allows you bring your deep learning adventures on board. Good news is that spaCy integrates well with frameworks for deep learning such as Tensorflow, PyTorch, Scikit-learn.

You can easily use spaCy for text processing in production as it is fast and secure. While spaCy works fine with CPU, it also works wonders with GPU.

Installing spaCy

To make use of spaCy, you can install using the pip tool as seen below:

pip install spacy

After download, here is the documentation for spaCy to get your hands dirty right away.

Remember spaCy supports different languages for the models, you can actually download the model for the language you prefer. This can be done with the command below:

python -m spacy download language-code

The “language-code” argument in this can be en for English, de for German, pt for Portugese, etc. You can find out more about the models and available languages.

Graphene (Web Development)

Github: 4,124 Stars

It is normal to have web applications fetch data from different sources. While REST APIs can be great, you’d face certain roadblocks when using them — such as over-fetching and under-fetching. GraphQL ensures those roadblocks are overcomed.

GraphQL has become a popular data query language ever since it was released by Facebook. It has also become very important in building and querying APIs. While GraphQL and JavaScript looks like a match made in heaven, it is also possible to use GraphQL in other languages.

Graphene is an open source Python library that allows you use GraphQL in your Python projects. It provides you with a complete API for doing this, making the whole process a piece of cake.

This library should be of interest to every backend Python developer, you can build your own GraphQL APIs with it. Graphene also has integrations for Django, SQLAlchemy, the Google App Engine and Mongo.

If you are a developer who is interested in GraphQL, Graphene should make your life much easier.

Installing Graphene

Like the other tools in this article, Graphene can be installed using the pip tool with the command below:

pip install graphene

To learn more about Graphene, check its documentation.

Conclusion

In this article, you’ve seen 8 Python libraries you really need to check out in 2019. You can choose to make use of them in a side project, and they are also suitable to be used in production.

These libraries cover fields such as Cloud, Data Science, Machine Learning, Web Development which are hot fields in IT today.

Considering the size of the Python open source community, there are a lot of amazing libraries being released every now and then. Therefore, you can’t find all of those amazing frameworks and libraries in one article.

Is there any framework or library you’d have expected to find in this article? Share it in the comments.

Thanks for reading and Happy Pythoning!

📝 Read this story later in Journal.

🗞 Wake up every Sunday morning to the week’s most noteworthy Tech stories, opinions, and news waiting in your inbox: Get the noteworthy newsletter >

--

--