import asyncpg
async def main():
conn = await asyncpg.connect('postgresql://postgres@localhost/test')
await conn.execute('''
INSERT INTO users(name, dob) VALUES($1, $2)
''', 'Bob', datetime.date(1984, 3, 1))
await conn.close()