Introduction — PyGreSQL 5.1

# Introduction

You may either choose to use the “classic” PyGreSQL interface provided by the `pg` module or else the newer DB-API 2.0 compliant interface provided by the `pgdb` module.

The following part of the documentation covers only the older `pg` API.

The `pg` module handles three types of objects,

- the `Connection` instances, which handle the connection and all the requests to the database,
- the `LargeObject` instances, which handle all the accesses to PostgreSQL large objects,
- the `Query` instances that handle query results

and it provides a convenient wrapper class `DB` for the basic `Connection` class.

See also

If you want to see a simple example of the use of some of these functions, see the Examples page.