• Skip to primary navigation
  • Skip to main content
pythonGrid

pythonGrid

Datagrid for Python Web Frameworks

  • Home
  • Docs
  • Demo
  • Download
  • Contact

database

Database Connection Settings

pythongridstg · April 27, 2020 ·

Find file config.py, and set the database connection properties according to your environment. The demo uses MySQL database.

You can also use a socket to connect to your database without specifying a database hostname.

PYTHONGRID_DB_HOSTNAME = 'mysqldatabase.example.com'
PYTHONGRID_DB_NAME = 'sampledb'
PYTHONGRID_DB_USERNAME = 'root'
PYTHONGRID_DB_PASSWORD = 'root'
PYTHONGRID_DB_TYPE = 'mysql+pymysql'

For Postgres set database type to postgres+psycopg2

PYTHONGRID_DB_TYPE = 'postgres+psycopg2'

Creating the Sample Database

pythongridstg · April 27, 2020 ·

Find the sample database in folder sampledb. Run the sample SQL script Using your favorite Postgres or MySQL client (more database supports are coming).

For Postgres, PgAdmin is an excellent GUI client. For MySQL, you cannot go wrong with the hand dandy MySQL Workbench.

Steps to create the sample database:

  1. Create a new database named sampledb
  2. Run the sample SQL script for the database of your choice.

pythonGrid

pythonGrid is a free and open-source datagrid library made for Python web framework

Copyright © 2025 · pythonGrid | privacy policy

  • Demo
  • Documentation
  • Download
  • T&C
  • EULA
  • Contact Us