# Gres > The typed PostgreSQL and PostGIS driver for Python, built in Rust. ## Overview - [Home](https://gres.monicz.dev/index.md): Gres is a typed PostgreSQL and PostGIS driver for Python, with a Rust core, Arrow streaming and binary COPY. - [Benchmarks](https://gres.monicz.dev/benchmarks.md): Compare Gres, asyncpg and Psycopg on pooled queries, sequential reads, bulk writes, memory use and PostGIS exports. ## Get started - [Installation](https://gres.monicz.dev/installation.md): Install Gres from PyPI with uv or pip, add optional extras, and check the supported Python, PostgreSQL and platform versions. - [Quickstart](https://gres.monicz.dev/quickstart.md): Pool PostgreSQL sessions, run transactions with typed dataclass rows and error handling, and bulk-load with binary COPY. - [Migrating](https://gres.monicz.dev/migrating.md): Map asyncpg and Psycopg 3 calls and value conventions to their Gres equivalents. ## Guide - [Guide](https://gres.monicz.dev/guide.md): Overview of the Gres guides — connections, queries, SQL composition, errors, types, pools and PgBouncer, Arrow and COPY, LISTEN/NOTIFY, PostGIS, web apps, observability, and SQLAlchemy. - [Connections](https://gres.monicz.dev/guide/connections.md): Configure Gres connections with libpq precedence, TLS and authentication, multi-host routing, standbys, and session limits. - [Queries and transactions](https://gres.monicz.dev/guide/queries.md): Run PostgreSQL queries with Gres — fetch methods, row shapes, parameter binding, prepared statements, transactions, savepoints, retries, and batched writes. - [SQL composition](https://gres.monicz.dev/guide/composition.md): Build dynamic SQL safely with Gres — Query fragments, Identifier, optional predicates with and_() and or_(), insert(), values(), assignments(), cast(), Literal, and template strings. - [Errors and retries](https://gres.monicz.dev/guide/errors.md): Catch Gres and PostgreSQL errors, inspect server and local diagnostics, and determine when retrying is safe. - [Types and adapters](https://gres.monicz.dev/guide/types.md): How Gres maps PostgreSQL types to Python and Arrow, exact Decoding options, custom adapters and codecs, and refreshing type metadata after migrations. - [Pools and PgBouncer](https://gres.monicz.dev/guide/pools.md): Share PostgreSQL sessions across asyncio tasks with gres.Pool, size and monitor the pool, and run behind PgBouncer transaction pooling. - [Streaming, Arrow and COPY](https://gres.monicz.dev/guide/bulk.md): Stream PostgreSQL query results, read Apache Arrow record batches for PyArrow, Polars, pandas, and DuckDB, and load tables with binary COPY. - [LISTEN and NOTIFY](https://gres.monicz.dev/guide/notifications.md): Receive PostgreSQL LISTEN/NOTIFY messages with Gres, pattern-match Notification values, and keep workers consistent across reconnects and overflow. - [PostGIS](https://gres.monicz.dev/guide/spatial.md): Use PostGIS from Python with Gres and gometry — geometry and geography columns, SRIDs and CRSs, spatial indexes, ST_Extent bounding boxes, GeoArrow and COPY, and exact EWKB transport. - [Web apps and testing](https://gres.monicz.dev/guide/applications.md): Manage a gres.Pool in ASGI lifespans (FastAPI, Starlette, Litestar) and test with rolled-back transactions in pytest-asyncio. - [Observability](https://gres.monicz.dev/guide/observability.md): OpenTelemetry tracing and metrics for Gres connections and pools, metric names and attributes, and logging PostgreSQL server notices. - [SQLAlchemy and Alembic](https://gres.monicz.dev/guide/sqlalchemy.md): Use Gres's async SQLAlchemy 2.1 dialect (postgresql+gres) and run migrations with Alembic. ## Reference - [API reference](https://gres.monicz.dev/api.md): Public Python API reference for Gres. - [Connections and pools](https://gres.monicz.dev/api/connections.md): Reference for Connection, Pool, PoolStats, ConnectionTarget and credential provider types. - [Queries and results](https://gres.monicz.dev/api/queries.md): Reference for Executor, Transaction, PreparedStatement, row selection, result objects and notifications. - [SQL composition](https://gres.monicz.dev/api/composition.md): Reference for Query, Identifier, Literal and the SQL composition helpers. - [Types and adapters](https://gres.monicz.dev/api/types.md): Reference for PostgreSQL value types, ranges, arrays, vectors, and decoding and adapter controls. - [PostGIS](https://gres.monicz.dev/api/spatial.md): Reference for EwkbGeometry, EwkbGeography and SpatialParameter. - [Errors](https://gres.monicz.dev/api/errors.md): Reference for the gres.errors exception hierarchy. ## About - [Compatibility](https://gres.monicz.dev/about/compatibility.md): Python, PostgreSQL, platform and connection-pooler compatibility for Gres, and its versioning policy. - [Support](https://gres.monicz.dev/about/support.md): Where to file Gres bugs and security reports, and what to include. - [License & notices](https://gres.monicz.dev/about/license.md): Gres's license and the third-party notices included in release packages.