diff --git a/docs/peewee/playhouse.rst b/docs/peewee/playhouse.rst index ebc159868..e8c7f2ca8 100644 --- a/docs/peewee/playhouse.rst +++ b/docs/peewee/playhouse.rst @@ -3482,12 +3482,16 @@ URL connection string. Supported schemes: * ``apsw``: :py:class:`APSWDatabase` + * ``cockroachdb``: :py:class:`CockroachDatabase` + * ``cockroachdb+pool``: :py:class:`PooledCockroachDatabase` * ``mysql``: :py:class:`MySQLDatabase` * ``mysql+pool``: :py:class:`PooledMySQLDatabase` * ``postgres``: :py:class:`PostgresqlDatabase` * ``postgres+pool``: :py:class:`PooledPostgresqlDatabase` * ``postgresext``: :py:class:`PostgresqlExtDatabase` * ``postgresext+pool``: :py:class:`PooledPostgresqlExtDatabase` + * ``psycopg3``: :py:class:`Psycopg3Database` + * ``psycopg3+pool``: :py:class:`PooledPsycopg3Database` * ``sqlite``: :py:class:`SqliteDatabase` * ``sqliteext``: :py:class:`SqliteExtDatabase` * ``sqlite+pool``: :py:class:`PooledSqliteDatabase` diff --git a/playhouse/db_url.py b/playhouse/db_url.py index 8d57990d7..dba02ccb1 100644 --- a/playhouse/db_url.py +++ b/playhouse/db_url.py @@ -8,8 +8,10 @@ from playhouse.cockroachdb import PooledCockroachDatabase from playhouse.pool import PooledMySQLDatabase from playhouse.pool import PooledPostgresqlDatabase +from playhouse.pool import PooledPsycopg3Database from playhouse.pool import PooledSqliteDatabase from playhouse.pool import PooledSqliteExtDatabase +from playhouse.psycopg3_ext import Psycopg3Database from playhouse.sqlite_ext import SqliteExtDatabase @@ -24,6 +26,8 @@ 'postgresql': PostgresqlDatabase, 'postgres+pool': PooledPostgresqlDatabase, 'postgresql+pool': PooledPostgresqlDatabase, + 'psycopg3': Psycopg3Database, + 'psycopg3+pool': PooledPsycopg3Database, 'sqlite': SqliteDatabase, 'sqliteext': SqliteExtDatabase, 'sqlite+pool': PooledSqliteDatabase,