# Module Imports
import mariadb
import sys

try:
   # Create Connection Pool
   pool = mariadb.ConnectionPool(
      pool_name="web-app",
      pool_size=20
   )

   # Configure Connection Pool
   pool.set_config(
      user="admin",
      password="admin_passwd",
      host="127.0.0.1",
      port=3306
   )

   pconn = pool.get_connection()

   cur = pconn.cursor()

   pconn.close()
except Exception as e:
   print(f"Error: {e}")


