Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 91 for roboto (0.14 sec)

  1. tests/test_default_response_class_router.py

    router_b_override = APIRouter()  # Overrides default class
    router_b_a = APIRouter()
    router_b_a_c_override = APIRouter()  # Overrides default class again
    
    
    @app.get("/")
    def get_root():
        return {"msg": "Hello World"}
    
    
    @app.get("/override", response_class=PlainTextResponse)
    def get_path_override():
        return "Hello World"
    
    
    @router_a.get("/")
    def get_a():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 01 20:49:20 GMT 2020
    - 5K bytes
    - Viewed (0)
  2. docs/bn/docs/index.md

    ## উদাহরণ
    
    ### তৈরি
    
    - `main.py` নামে একটি ফাইল তৈরি করুন:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 30.2K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/first-steps.md

    你还可以返回 Pydantic 模型(稍后你将了解更多)。
    
    还有许多其他将会自动转换为 JSON 的对象和模型(包括 ORM 对象等)。尝试下使用你最喜欢的一种,它很有可能已经被支持。
    
    ## 总结
    
    * 导入 `FastAPI`。
    * 创建一个 `app` 实例。
    * 编写一个**路径操作装饰器**(如 `@app.get("/")`)。
    * 编写一个**路径操作函数**(如上面的 `def root(): ...`)。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 9.2K bytes
    - Viewed (0)
  4. docs/pt/docs/deployment.md

    ### Crie o código **FastAPI**
    
    * Crie um diretório `app` e entre nele.
    * Crie um arquivo `main.py` com:
    
    ```Python
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: str = None):
        return {"item_id": item_id, "q": q}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 18 16:16:54 GMT 2022
    - 16.8K bytes
    - Viewed (0)
  5. docs/en/docs/release-notes.md

    ## 0.56.0
    
    * Add support for ASGI `root_path`:
        * Use `root_path` internally for mounted applications, so that OpenAPI and the docs UI works automatically without extra configurations and parameters.
        * Add new `root_path` parameter for `FastAPI` applications to provide it in cases where it can be set with the command line (e.g. for Uvicorn and Hypercorn, with the parameter `--root-path`).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  6. docs/ko/docs/deployment/docker.md

    * 빈 파일 `__init__.py`을 생성합니다.
    * 다음과 같은 `main.py`을 생성합니다:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### 도커파일
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  7. docs/pt/docs/index.md

    * **Fácil**: Projetado para ser fácil de aprender e usar. Menos tempo lendo documentação.
    * **Enxuto**: Minimize duplicação de código. Múltiplos recursos para cada declaração de parâmetro. Menos bugs.
    * **Robusto**: Tenha código pronto para produção. E com documentação interativa automática.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_async_tests/test_main.py

    import pytest
    
    from docs_src.async_tests.test_main import test_root
    
    
    @pytest.mark.anyio
    async def test_async_testing():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 06 15:32:11 GMT 2021
    - 143 bytes
    - Viewed (0)
  9. docs/de/docs/advanced/sub-applications.md

    ### Technische Details: `root_path`
    
    Wenn Sie eine Unteranwendung wie oben beschrieben mounten, kümmert sich FastAPI darum, den Mount-Pfad für die Unteranwendung zu kommunizieren, mithilfe eines Mechanismus aus der ASGI-Spezifikation namens `root_path`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:06 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial001 import app
    
    client = TestClient(app, root_path="/api/v1")
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
Back to top