From 4ab3bef0a66983fd31b7d4b88af99a3394c00eca Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 18 Jul 2022 17:43:54 +0400 Subject: [PATCH] docs: added example of db_urls (#1033) --- docs/configuration/databases/sqlalchemy.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/configuration/databases/sqlalchemy.md b/docs/configuration/databases/sqlalchemy.md index bdf18728..d7c8bd63 100644 --- a/docs/configuration/databases/sqlalchemy.md +++ b/docs/configuration/databases/sqlalchemy.md @@ -9,7 +9,12 @@ To work with your DBMS, you'll need to install the corresponding asyncio driver. * For PostgreSQL: `pip install asyncpg` * For SQLite: `pip install aiosqlite` -For the sake of this tutorial from now on, we'll use a simple SQLite databse. +Examples of `DB_URL`s are: + +* PostgreSQL: `engine = create_engine('postgresql+asyncpg://user:password@host:port/name')` +* SQLite: `engine = create_engine('sqlite+aiosqlite:///name.db')` + +For the sake of this tutorial from now on, we'll use a simple SQLite database. ## Create the User model