brk-code

psycopg2 の API リファレンス

psycopg2 (psycopg/psycopg2) の公開 API 50 件 —— クラス 34、関数 1、メソッド 15。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: psycopg/psycopg2

種別件数
クラス34
関数1
メソッド15

API 一覧

methodlib._json.Json.dumps(obj)
Serialize *obj* in JSON format.
classlib._range.DateRange
Represents :sql:`daterange` values.
classlib._range.DateTimeRange
Represents :sql:`tsrange` values.
classlib._range.DateTimeTZRange
Represents :sql:`tstzrange` values.
classlib._range.NumberRangeAdapter
Adapt a range if the subtype doesn't need quotes.
classlib._range.Range
Python representation for a PostgreSQL |range|_ type.
methodlib._range.Range.isempty()
`!True` if the range is empty.
methodlib._range.Range.lower()
The lower bound of the range.
methodlib._range.Range.upper()
The upper bound of the range.
classlib._range.RangeAdapter
`ISQLQuote` adapter for `Range` subclasses.
funclib.connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs)
Create a new database connection.
classlib.extensions.NoneAdapter
Adapt None to NULL.
classlib.extensions.SQL_IN
Adapt any iterable to an SQL quotable object.
classlib.extras.DictConnection
A connection that uses `DictCursor` automatically.
classlib.extras.DictCursor
A cursor that keeps a list of column name -> index mappings__.
classlib.extras.DictCursorBase
Base class for all dict-like cursors.
classlib.extras.DictRow
A row object that allow by-column-name access to data.
classlib.extras.HstoreAdapter
Adapt a Python dict to the hstore syntax.
classlib.extras.Inet
Wrap a string to allow for correct SQL-quoting of inet values.
classlib.extras.LoggingConnection
A connection that logs all queries to a file or logger__ object.
methodlib.extras.LoggingConnection.filter(msg, curs)
Filter the query before logging it.
classlib.extras.LoggingCursor
A cursor that logs queries using its connection logging facilities.
classlib.extras.MinTimeLoggingConnection
A connection that logs queries based on execution time.
classlib.extras.MinTimeLoggingCursor
The cursor sub-class companion to `MinTimeLoggingConnection`.
classlib.extras.NamedTupleConnection
A connection that uses `NamedTupleCursor` automatically.
classlib.extras.NamedTupleCursor
A cursor that generates results as `~collections.namedtuple`.
classlib.extras.RealDictConnection
A connection that uses `RealDictCursor` automatically.
classlib.extras.RealDictCursor
A cursor that uses a real dict as the base type for rows.
classlib.extras.RealDictRow
A `!dict` subclass representing a data record.
classlib.extras.ReplicationCursor
A cursor used for communication on replication connections.
methodlib.extras.ReplicationCursor.drop_replication_slot(slot_name)
Drop streaming replication slot.
classlib.extras.UUID_adapter
Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__.
classlib.pool.AbstractConnectionPool
Generic key-based pooling code.
classlib.pool.ThreadedConnectionPool
A connection pool that works with the threading module.
methodlib.pool.ThreadedConnectionPool.putconn(conn=None, key=None, close=False)
Put away an unused connection.
classlib.sql.Composable
Abstract base class for objects that can be used to compose an SQL string.
methodlib.sql.Composable.as_string(context)
Return the string value of the object.
classlib.sql.Composed
A `Composable` object made of a sequence of `!Composable`.
methodlib.sql.Composed.seq()
The list of the content of the `!Composed`.
methodlib.sql.Identifier.string()
The string wrapped by the `Identifier`.
classlib.sql.Literal
A `Composable` representing an SQL value to include in a query.
methodlib.sql.Literal.wrapped()
The object wrapped by the `!Literal`.
classlib.sql.Placeholder
A `Composable` representing a placeholder for query parameters.
methodlib.sql.Placeholder.name()
The name of the `!Placeholder`.
classlib.sql.SQL
A `Composable` representing a snippet of SQL statement.
methodlib.sql.SQL.format(*args, **kwargs)
Merge `Composable` objects into a template.
methodlib.sql.SQL.join(seq)
Join a sequence of `Composable`.
methodlib.sql.SQL.string()
The string wrapped by the `!SQL` object.
classlib.tz.FixedOffsetTimezone
Fixed offset in minutes east from UTC.
classlib.tz.LocalTimezone
Platform idea of local timezone.

この情報について

掲載しているシグネチャは psycopg/psycopg2 の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る