1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
====================================================
MariaDB Connector/Python
====================================================
.. sectionauthor:: Georg Richter <georg@mariadb.com>
.. testsetup::
import mariadb
conn_params= {
"host" : "localhost",
"database" : "test"
}
with mariadb.connect(**conn_params) as conn:
with conn.cursor() as cursor:
cursor.execute("CREATE USER IF NOT EXISTS example_user@localhost identified by 'GHbe_Su3B8'")
cursor.execute("grant all on test.* to example_user@localhost")
cursor.execute("DROP TABLE IF EXISTS book")
|MCP| enables python programs to access MariaDB and MySQL databases, using an API
which is compliant with the Python |DBAPI|. It is written in C and Python and uses
MariaDB Connector/C client library for client server communication.
.. rubric:: Contents
.. toctree::
:maxdepth: 2
:caption: Contents:
install
usage
pooling
api
license
bugs
faq
{% @marketo/form formId=\"4316\" %}
|