Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Import (0.14 sec)

  1. docs/en/docs/deployment/docker.md

    ### Create the **FastAPI** Code
    
    * Create an `app` directory and enter it.
    * Create an empty file `__init__.py`.
    * Create a `main.py` file with:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top