Python uses the psycopg2 module to operate PostgreSQL, psycopg2postgresql
In fact, there are many modules in Python that can be used to connect to PostgreSQL. Here we recommend psycopg2. Psycopg2 is very easy to install (pip install psycopg2). Here
I. Overview of DB-APIPython supports a number of different databases. Because the different seller server causes the network protocol which communicates with the database to be different. In earlier versions of Python, each database had its own
This article is about how to use Python to manipulate PostgreSQL, now here to share, a friend in need can refer to
Python Operation PostgreSQL
Prerequisites: The PostgreSQL database is installed on the user's computer
Install psycopg2–> pip Install
Pip Install PSYCOPGPython PSYCOPG2 Module APIsThe following is an important module routine for PSYCOPG2 to meet the Python program's work with the PostgreSQL database.
S.N.
API & Description
1
psycopg2.connect
ArticleDirectory
1. DB-API Overview
2. Database Connection
Iii. Simple operations (taking PostgreSQL as an example)
Iv. Parameter Style
5. Duplicate commands
6. fetchall, fetchtasks, and fetchone to obtain data
VII. Obtain
This article mainly introduces the python database client DB-API related information, need a friend can refer to the next
1. DB-API Overview
Python supports many different databases. The network protocol for communication with databases varies
1. DB-API OverviewPython supports many different databases. The network protocol for communication with databases varies depending on the seller's server. In earlier versions of python, each database has its own python module. All these modules work
I. Overview of DB-API
Python supports a number of different databases. Because different seller servers result in different network protocols for database communication. In earlier versions of Python, each database had its own Python module, all of
The system and software used Ubuntu 12.10Python 2.7.3Django 1.4.2Pycharm 2.6.3Postgresql 9.1VirtualenvVirtualenvwrapperOpenjdk Before you start, be sure to make a backup of your system. Because if the operation is wrong, there will be unnecessary
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.