How To Install python-beaker on Ubuntu 18.04

In this tutorial we learn how to install python-beaker on Ubuntu 18.04. python-beaker is cache and session library

Introduction

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

What is python-beaker

python-beaker is:

Beaker is a web session and general caching library that includes WSGI middleware for use in web applications.

As a general caching library, Beaker can handle storing for various times any Python object that can be pickled with optional back-ends on a fine-grained basis.

Features:

  • Fast, robust performance
  • Multiple reader/single writer lock system to avoid duplicate simultaneous cache creation
  • Cache back-ends include dbm, file, memory, memcached, and database (using SQLAlchemy for multiple-db vendor support)
  • Signed cookies to prevent session hijacking/spoofing
  • Cookie-only sessions to remove the need for a database or file backend (ideal for clustered systems)
  • Extensible Container object to support new back-ends
  • Caches can be divided into namespaces (to represent templates, objects, etc.) then keyed for different copies
  • Create functions for automatic call-backs to create new cache copies after expiration
  • Fine-grained toggling of back-ends, keys, and expiration per Cache object

There are three methods to install python-beaker 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-beaker 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-beaker using apt-get by running the following command:

sudo apt-get -y install python-beaker

Install python-beaker Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-beaker

Install python-beaker 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-beaker using aptitude by running the following command:

sudo aptitude -y install python-beaker

How To Uninstall python-beaker on Ubuntu 18.04

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

sudo apt-get remove python-beaker

Uninstall python-beaker And Its Dependencies

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

sudo apt-get -y autoremove python-beaker

Remove python-beaker Configurations and Data

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

sudo apt-get -y purge python-beaker

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

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

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

References

Summary

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