octicon-rss(16/)
You've already forked fastapi-users
mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-10 02:05:41 +08:00
docs: added example of db_urls (#1033)
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
GitHub
gitea-unlock(16/)
parent
02ca70ac75
commit
4ab3bef0a6
octicon-diff(16/tw-mr-1) 1 changed files with 6 additions and 1 deletions
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user