nimblebox logo

Deploy a FastAPI app

Here's the code for this specimen on Github

FastAPI is a modern, fast (high-performance), web framework for building APIs. It uses the popular Python web framework Starlette for handling requests, and the high-performance asynchronous web server ASGI (Asynchronous Server Gateway Interface) to handle the concurrency. This makes FastAPI ideal for building high-performance and high-concurrency APIs.

FastAPI is built on top of Pydantic, a library for data validation and settings management using Python type hints. this means that you as a developer do need to worry about the data validation and rather focus on the code and the logic that you are going to implement.

Let's create a simple FastAPI app like in the file


Now to deploy this we can run this command on the Shell terminal:


Once your model is deployed you can access your API endpoint using cURL like curl

nbox SDKnbox provides built in access to all the APIs and packages them in the most user friendly manner.Star 0