How To Install python-webflash on Ubuntu 18.04

In this tutorial we learn how to install python-webflash on Ubuntu 18.04. python-webflash is Portable flash messages for Python WSGI applications

Introduction

In this tutorial we learn how to install python-webflash on Ubuntu 18.04.

What is python-webflash

python-webflash is:

WebFlash is a library to display “flash” messages in Python web applications.

These messages are usually used to provide feedback to the user (e.g: you changes have been saved, your credit card number has been stolen, etc). One important characteristic they must provide is the ability to survive a redirect (i.e., display the message in a page after being redirected from a form submission).

  • WebFlash is implemented using cookies, no state must be kept
  • The messages can be rendered by the browser using Javascript
  • Alternatively messages can be rendered by the server
  • The JS code is small (~1Kb) and has no dependency
  • WebFlash is designed to be used in WSGI frameworks

There are three methods to install python-webflash on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-webflash Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-webflash using apt-get by running the following command:

sudo apt-get -y install python-webflash

Install python-webflash Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-webflash using apt by running the following command:

sudo apt -y install python-webflash

Install python-webflash Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-webflash using aptitude by running the following command:

sudo aptitude -y install python-webflash

How To Uninstall python-webflash on Ubuntu 18.04

To uninstall only the python-webflash package we can use the following command:

sudo apt-get remove python-webflash

Uninstall python-webflash And Its Dependencies

To uninstall python-webflash and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove python-webflash

Remove python-webflash Configurations and Data

To remove python-webflash configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge python-webflash

Remove python-webflash configuration, data, and all of its dependencies

We can use the following command to remove python-webflash configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-webflash

References

Summary

In this tutorial we learn how to install python-webflash package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.