Skip to content

Commit 1e77777

Browse files
committed
Updated documentation
1 parent d69c4a8 commit 1e77777

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

aiomysql/connection.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def connect(host="localhost", user=None, password="",
5454
client_flag=0, cursorclass=Cursor, init_command=None,
5555
connect_timeout=None, read_default_group=None,
5656
no_delay=None, autocommit=False, echo=False,
57-
local_infile=False, loop=None, ssl=None, auth_plugin=''):
57+
local_infile=False, loop=None, ssl=None, auth_plugin='',
58+
program_name=''):
5859
"""See connections.Connection.__init__() for information about
5960
defaults."""
6061
coro = _connect(host=host, user=user, password=password, db=db,
@@ -67,7 +68,7 @@ def connect(host="localhost", user=None, password="",
6768
read_default_group=read_default_group,
6869
no_delay=no_delay, autocommit=autocommit, echo=echo,
6970
local_infile=local_infile, loop=loop, ssl=ssl,
70-
auth_plugin=auth_plugin)
71+
auth_plugin=auth_plugin, program_name=program_name)
7172
return _ConnectionContextManager(coro)
7273

7374

@@ -126,6 +127,13 @@ def __init__(self, host="localhost", user=None, password="",
126127
(default: False)
127128
:param local_infile: boolean to enable the use of LOAD DATA LOCAL
128129
command. (default: False)
130+
:param ssl: Optional SSL Context to force SSL
131+
:param auth_plugin: String to manually specify the authentication
132+
plugin to use, i.e you will want to use mysql_clear_password
133+
when using IAM authentication with Amazon RDS.
134+
(default: Server Default)
135+
:param program_name: Program name string to provide when
136+
handshaking with MySQL. (default: sys.argv[0])
129137
:param loop: asyncio loop
130138
"""
131139
self._loop = loop or asyncio.get_event_loop()

docs/connection.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Example::
4646
read_default_file=None, conv=decoders, use_unicode=None,
4747
client_flag=0, cursorclass=Cursor, init_command=None,
4848
connect_timeout=None, read_default_group=None,
49-
no_delay=False, autocommit=False, echo=False, loop=None)
49+
no_delay=False, autocommit=False, echo=False,
50+
ssl=None, auth_plugin='', program_name='', loop=None)
5051

5152
A :ref:`coroutine <coroutine>` that connects to MySQL.
5253

@@ -81,6 +82,13 @@ Example::
8182
:param bool no_delay: disable Nagle's algorithm on the socket
8283
:param autocommit: Autocommit mode. None means use server default.
8384
(default: ``False``)
85+
:param ssl: Optional SSL Context to force SSL
86+
:param auth_plugin: String to manually specify the authentication
87+
plugin to use, i.e you will want to use mysql_clear_password
88+
when using IAM authentication with Amazon RDS.
89+
(default: Server Default)
90+
:param program_name: Program name string to provide when
91+
handshaking with MySQL. (default: sys.argv[0])
8492
:param loop: asyncio event loop instance or ``None`` for default one.
8593
:returns: :class:`Connection` instance.
8694

0 commit comments

Comments
 (0)