How To Install python-bitlyapi on CentOS 7

In this tutorial we learn how to install python-bitlyapi on CentOS 7. python-bitlyapi is A thin python wrapper for the bit.ly REST API

Introduction

In this tutorial we learn how to install python-bitlyapi on CentOS 7.

What is python-bitlyapi

This is a thin Python wrapper for the bit.ly API. Basic usage looks like this »> import bitlyapi »> b = bitlyapi.BitLy(api_user, api_key) »> res = b.shorten(longUrl=‘http »> print res[‘url’] ‘http »> print res[’long_url’] ‘http

We can use yum or dnf to install python-bitlyapi on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install python-bitlyapi.

Install python-bitlyapi on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python-bitlyapi

Install python-bitlyapi on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install python-bitlyapi using dnf by running the following command:

sudo dnf -y install python-bitlyapi

How To Uninstall python-bitlyapi on CentOS 7

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

sudo dnf remove python-bitlyapi

References

Summary

In this tutorial we learn how to install python-bitlyapi on CentOS 7 using yum and dnf.