> For the complete documentation index, see [llms.txt](https://docs.healthuniverse.com/overview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.healthuniverse.com/overview/building-apps-in-health-universe/developing-your-health-universe-app/working-in-fastapi.md).

# Working in FastAPI

FastAPI is a modern, high-performance Python web framework for building APIs quickly and efficiently. It supports automatic validation, async programming, and OpenAPI documentation out of the box—making it ideal for scalable healthcare services and backend workflows.

Key features:

* **Type hints for validation** using Pydantic
* **Asynchronous support** with `async def`
* **Auto-generated docs** via Swagger and ReDoc
* **Fast**—built on Starlette and Uvicorn

🔗 **Official Resources**

* FastAPI Documentation: <https://fastapi.tiangolo.com>
* Pydantic (data validation): <https://docs.pydantic.dev>
* Starlette (underlying toolkit): <https://www.starlette.io>

For healthcare developers, FastAPI pairs well with orchestrators like **Navigator** in Health Universe for managing clinical workflows and microservices at scale. This allows developers to leverage the power of Navigator to use clinical and workflow context to power their FastAPI apps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.healthuniverse.com/overview/building-apps-in-health-universe/developing-your-health-universe-app/working-in-fastapi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
