home
search
help
profile
liking the experience? our app is even better
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now  
showing results for how to connect fastapi with postgresql
1{
2    'connections': {
3        # Dict format for connection
4        'default': {
5            'engine': 'tortoise.backends.asyncpg',
6            'credentials': {
7                'host': 'localhost',
8                'port': '5432',
9                'user': 'tortoise',
10                'password': 'qwerty123',
11                'database': 'test',
12            }
13        },
14        # Using a DB_URL string
15        'default': 'postgres://postgres:qwerty123@localhost:5432/events'
16    },
17    'apps': {
18        'models': {
19            'models': ['__main__'],
20            # If no default_connection specified, defaults to 'default'
21            'default_connection': 'default',
22        }
23    }
24}
25
upvote
downvote
source