---
title: "Discussion on \"FastApi sync def vs async def  ?\" | Hashnode"
description: "Discussion on \"FastApi sync def vs async def  ?\". In case you are using Fastapi, when does one use def and async def and how does using one make a difference over the other?\nAssuming that you scanned this and know a bit of the async stuff.\nasync\n@route(“/users/info”)\nasync def userInfo():\n    user =..."
url: "https://hashnode.com/posts/fastapi-sync-def-vs-async-def/64cffe976c293a8085a14545"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [FastApi sync def vs async def ?](https://engineering.oohalo.com/fastapi-sync-def-vs-async-def?utm_source=hashnode&utm_medium=feed)

In case you are using Fastapi, when does one use def and async def and how does using one make a difference over the other? Assuming that you scanned this and know a bit of the async stuff. async @route(“/users/info”) async def userInfo(): user =...

May 30, 2023 · 5 min read · engineering.oohalo.com  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#fastapi](https://hashnode.com/tag/fastapi)
-   [#synchronous](https://hashnode.com/tag/synchronous)
-   [#asynchronous](https://hashnode.com/tag/asynchronous)

## Written by

[K](https://hashnode.com/@kiranhere)

@kiranhere

  
[View profile](https://hashnode.com/@kiranhere)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
