Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 2,000 for Fastapi (0.17 sec)

  1. docs_src/advanced_middleware/tutorial002.py

    from fastapi import FastAPI
    from fastapi.middleware.trustedhost import TrustedHostMiddleware
    
    app = FastAPI()
    
    app.add_middleware(
        TrustedHostMiddleware, allowed_hosts=["example.com", "*.example.com"]
    )
    
    
    @app.get("/")
    async def main():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 279 bytes
    - Viewed (0)
  2. docs/vi/docs/tutorial/first-steps.md

    `FastAPI` là một class kế thừa trực tiếp `Starlette`.
    
    Bạn cũng có thể sử dụng tất cả <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> chức năng với `FastAPI`.
    
    ///
    
    ### Bước 2: Tạo một `FastAPI` "instance"
    
    ```Python hl_lines="3"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Biến `app` này là một "instance" của class `FastAPI`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/response-cookies.md

    ✔️ 🤯 👈 🚥 👆 📨 📨 🔗 ↩️ ⚙️ `Response` 🔢, FastAPI 🔜 📨 ⚫️ 🔗.
    
    , 👆 🔜 ✔️ ⚒ 💭 👆 💽 ☑ 🆎. 🤶 Ⓜ. ⚫️ 🔗 ⏮️ 🎻, 🚥 👆 🛬 `JSONResponse`.
    
     &amp; 👈 👆 🚫 📨 🙆 📊 👈 🔜 ✔️ ⛽ `response_model`.
    
    ///
    
    ### 🌅 ℹ
    
    /// note | "📡 ℹ"
    
    👆 💪 ⚙️ `from starlette.responses import Response` ⚖️ `from starlette.responses import JSONResponse`.
    
    **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. tests/test_additional_responses_default_validationerror.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/a/{id}")
    async def a(id):
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  5. tests/test_duplicate_models_openapi.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        pass
    
    
    class Model2(BaseModel):
        a: Model
    
    
    class Model3(BaseModel):
        c: Model
        d: Model2
    
    
    @app.get("/", response_model=Model3)
    def f():
        return {"c": {}, "d": {"a": {}}}
    
    
    client = TestClient(app)
    
    
    def test_get_api_route():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. tests/test_custom_schema_fields.py

    from fastapi import FastAPI
    from fastapi._compat import PYDANTIC_V2
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
    
        if PYDANTIC_V2:
            model_config = {
                "json_schema_extra": {
                    "x-something-internal": {"level": 4},
                }
            }
        else:
    
            class Config:
                schema_extra = {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. docs/fr/docs/advanced/index.md

    pour débutants avancés pour compléter cette section de la documentation, vous pouvez consulter : <a href="https://testdrive.io/courses/tdd-fastapi/" class="external- link" target="_blank">Développement piloté par les tests avec FastAPI et Docker</a> par **TestDriven.io**.
    
    10 % de tous les bénéfices de ce cours sont reversés au développement de **FastAPI**. 🎉 😄...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/dataclasses.md

    6. 这行代码返回的是包含 `items` 的字典,`items` 是数据类列表;
    
        FastAPI 仍能把数据<abbr title="把数据转换为可以传输的格式">序列化</abbr>为 JSON;
    
    7. 这行代码中,`response_model` 的类型注解是 `Author` 数据类列表;
    
        再一次,可以把 `dataclasses` 与标准类型注解一起使用;
    
    8. 注意,*路径操作函数*使用的是普通函数,不是异步函数;
    
        与往常一样,在 FastAPI 中,可以按需组合普通函数与异步函数;
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  9. fastapi/openapi/docs.py

        for example the URLs to use to load Swagger UI's JavaScript and CSS.
    
        Read more about it in the
        [FastAPI docs for Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-swagger-ui/)
        and the [FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).
        """
        current_swagger_ui_parameters = swagger_ui_default_parameters.copy()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. docs/en/mkdocs.yml

      - search.share
      - search.suggest
      - toc.follow
    
      icon:
        repo: fontawesome/brands/github-alt
      logo: img/icon-white.svg
      favicon: img/favicon.png
      language: en
    repo_name: fastapi/fastapi
    repo_url: https://github.com/fastapi/fastapi
    plugins:
      # Material for MkDocs
      search:
      # Configured in mkdocs.insiders.yml
      # social:
      # Other plugins
      macros:
        include_yaml:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 20:28:02 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top