January 2019
Beginner
556 pages
14h 19m
English
To install the pg8000 library, you should use pip in the same way as with Psycopg 2. Here is an example of how it looks in Windows:
c:Usersuser>python -m pip install pg8000Collecting pg8000 Downloading pg8000-1.11.0-py2.py3-none-any.whlCollecting six>=1.10.0 (from pg8000) Downloading six-1.11.0-py2.py3-none-any.whlInstalling collected packages: six, pg8000Successfully installed pg8000-1.11.0 six-1.11.0
In Linux, execute the pip3 install pg8000 command. The output will be very similar.
As the library also implements the DB-API 2.0, it is used almost in the same way as Psycopg 2.
Here is a small program that connects to the database, and queries and prints to the console the list of car makes entered into the system:
#!/usr/bin/python3 ...
Read now
Unlock full access