You cannot create a MySQL database with peewee, but you can do it programmatically with other libraries, such as PyMySQL .
import pymysql conn = pymysql.connect(host='host', user='user', password='password') conn.cursor().execute('CREATE DATABASE mydb') conn.close()
source share