Skip to content

How to ensure that a block of code can be executed only by one request at a time in FastAPI #4458

@mailtodanish

Description

@mailtodanish

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to FastAPI but to Pydantic.
  • I already checked if it is not related to FastAPI but to Swagger UI.
  • I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

no code

Description

How to ensure that a block of code can be executed only by one request at a time in FAST API

I am implementing post and calling some external tool but it takes one request at a time.

Operating System

Linux

Operating System Details

No response

FastAPI Version

0.70.0

Python Version

Python 3.8.5

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions