Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 102 for 9000 (0.12 sec)

  1. docs/en/docs/tutorial/path-params.md

    ```
    
    The value of the path parameter `item_id` will be passed to your function as the argument `item_id`.
    
    So, if you run this example and go to <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, you will see a response of:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Path parameters with types
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/path-params.md

    运行示例并访问 <a href="http://127.0.0.1:8000/items/3" class="external-link" target="_blank">http://127.0.0.1:8000/items/3</a>,返回的响应如下:
    
    ```JSON
    {"item_id":3}
    ```
    
    !!! check "检查"
    
        注意,函数接收并返回的值是 `3`( `int`),不是 `"3"`(`str`)。
    
        **FastAPI** 通过类型声明自动<abbr title="将来自 HTTP 请求中的字符串转换为 Python 数据类型">**解析**请求中的数据</abbr>。
    
    ## 数据校验
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/wsgi.md

    其余的请求则会被 **FastAPI** 处理。
    
    如果您使用 Uvicorn 运行应用实例并且访问 <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a>,您将会看到由 Flask 返回的响应:
    
    ```txt
    Hello, World from Flask!
    ```
    
    并且如果您访问 <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a>,您将会看到由 FastAPI 返回的响应:
    
    ```JSON
    {
        "message": "Hello World"
    }
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/first-steps.md

    ```hl_lines="4"
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    👈 ⏸ 🎦 📛 🌐❔ 👆 📱 ➖ 🍦, 👆 🇧🇿 🎰.
    
    ### ✅ ⚫️
    
    📂 👆 🖥 <a href="http://127.0.0.1:8000" class="external-link" target="_blank">http://127.0.0.1:8000</a>.
    
    👆 🔜 👀 🎻 📨:
    
    ```JSON
    {"message": "Hello World"}
    ```
    
    ### 🎓 🛠️ 🩺
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/debugging.md

    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    이 실행됩니다.
    
    ---
    
    해당 모듈(파일)을 가져오면 이런 일이 발생하지 않습니다
    
    그래서 다음과 같은 다른 파일 `importer.py`가 있는 경우:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    이 경우 `myapp.py` 내부의 자동 변수에는 값이 `"__main__"`인 변수 `__name__`이 없습니다.
    
    따라서 다음 행
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    은 실행되지 않습니다.
    
    !!! info "정보"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:18:08 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  6. docs_src/debugging/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 223 bytes
    - Viewed (0)
  7. docs_src/path_params_numeric_validations/tutorial006_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        *,
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str,
        size: Annotated[float, Query(gt=0, lt=10.5)],
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 405 bytes
    - Viewed (0)
  8. docs_src/body_multiple_params/tutorial001.py

        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
        q: Union[str, None] = None,
        item: Union[Item, None] = None,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
        if item:
            results.update({"item": item})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 596 bytes
    - Viewed (0)
  9. docs/em/docs/how-to/extending-openapi.md

    🔜 👆 💪 ❎ `.openapi()` 👩‍🔬 ⏮️ 👆 🆕 🔢.
    
    ```Python hl_lines="28"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### ✅ ⚫️
    
    🕐 👆 🚶 <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a> 👆 🔜 👀 👈 👆 ⚙️ 👆 🛃 🔱 (👉 🖼, **FastAPI**'Ⓜ 🔱):
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.7K bytes
    - Viewed (1)
  10. scripts/playwright/separate_openapi_schemas/image03.py

    def run(playwright: Playwright) -> None:
        browser = playwright.chromium.launch(headless=False)
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("GET/items/Read Items").click()
        page.get_by_role("tab", name="Schema").click()
        page.get_by_label("Schema").get_by_role("button", name="Expand all").click()
        page.screenshot(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 892 bytes
    - Viewed (0)
Back to top