wsql.cluster package

Submodules

wsql.cluster.cluster module

WSQL

An asynchronous DB API v2.0 compatible interface to MySQL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class wsql.cluster.cluster.Cluster(master, slave)

Bases: object

asynchronous commutator

execute(query)

execute handler

wsql.cluster.functional module

WSQL

An asynchronous DB API v2.0 compatible interface to MySQL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

wsql.cluster.functional.transaction(query)

make query transactional :param query: the query

wsql.cluster.functional.retryable(connection, count=5, delay=1)

Make connection execute retryable :param connection: the connection object :param count: the maximum number of retries :param delay: the delay between retries :param loop: optional parameter, event loop of asynchronous method :return: the Connection, that has retryable method execute

wsql.cluster.pool module

WSQL

An asynchronous DB API v2.0 compatible interface to MySQL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

wsql.cluster.pool.ConnectionPool(*args, loop=<object object>, **kwargs)

create a new connection pool :param args: connection pool positional arguments :param loop: the event loop, if specified, the asynchronous connection pool will be created :param kwargs: connection pool keyword arguments :return: the new ConnectionPool

wsql.cluster.upstream module

WSQL

An asynchronous DB API v2.0 compatible interface to MySQL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

wsql.cluster.upstream.Upstream(*args, loop=<object object>, **kwargs)

create a new connection provider :param args: connection provider positional arguments :param nonblocking: if True, the non-blocking version will be created :param kwargs: connection provider keyword arguments :return: the new ConnectionProvider

Module contents

WSQL

An asynchronous DB API v2.0 compatible interface to MySQL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

wsql.cluster.connect(connection_args, loop=<object object>, logger=None, **kwargs)

connection_args format: uri=[dbcs?:://]hostname[:port]#count” master=uri[,uri...];[slave=uri[,uri...];]database=database;[username=username];[password=password]; :param connection_args: the connection args :param loop: if specified the asynchronous version will be returned :param logger: the application logger :param kwargs: the additional connection args