To connect and manipulate your PostgreSQL database in Python, you will need a library to assist you. psyscopg2 is that library. It provides a wrapper around the official libpq client library. In this section, we will cover how to install the library, how to connect to the database, and how to add a table and perform basic geospatial queries.