Database¶
Installing the database libraries¶
You can install your database libraries along with Atsume using one of the following commands
SQLite¶
pip install hikari-atsume[sqlite]
MySQL/MariaDB¶
pip install hikari-atsume[mysql]
PostgreSQL¶
pip install hikari-atsume[postgresql]
Connecting to the database¶
You can set the database connection URL in your local.py
file. Here are some examples depending
on your database of choice. For more information, check the
SQLAlchemy docs.
SQLite¶
DATABASE_URL = "sqlite://db.sqlite"
MySQL/MariaDB¶
DATABASE_URL = "mysql+pymysql://username:password@hostname/database"
PostgreSQL¶
DATABASE_URL = "postgresql+psycopg2://username:password@hostname/database"