Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 181 - 190 of 1,377 for app (0.01 seconds)

  1. tests/test_tutorial/test_custom_response/test_tutorial009b.py

    from pathlib import Path
    
    from fastapi.testclient import TestClient
    
    from docs_src.custom_response import tutorial009b_py39
    from docs_src.custom_response.tutorial009b_py39 import app
    
    client = TestClient(app)
    
    
    def test_get(tmp_path: Path):
        file_path: Path = tmp_path / "large-video-file.mp4"
        tutorial009b_py39.some_file_path = str(file_path)
        test_content = b"Fake video bytes"
        file_path.write_bytes(test_content)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 505 bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/sql-databases.md

    <div class="screenshot">
    <img src="/img/tutorial/sql-databases/image01.png">
    </div>
    
    ## Update the App with Multiple Models { #update-the-app-with-multiple-models }
    
    Now let's **refactor** this app a bit to increase **security** and **versatility**.
    
    If you check the previous app, in the UI you can see that, up to now, it lets the client decide the `id` of the `Hero` to create. ๐Ÿ˜ฑ
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 02 05:06:56 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  3. docs/de/docs/tutorial/sql-databases.md

    <div class="screenshot">
    <img src="/img/tutorial/sql-databases/image01.png">
    </div>
    
    ## Die App mit mehreren Modellen aktualisieren { #update-the-app-with-multiple-models }
    
    Jetzt lassen Sie uns diese App ein wenig **refaktorisieren**, um die **Sicherheit** und **Vielseitigkeit** zu erhรถhen.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 02 17:32:56 GMT 2025
    - 18.1K bytes
    - Click Count (0)
  4. docs/es/docs/how-to/custom-docs-ui-assets.md

    * `openapi_url`: la URL donde la pรกgina HTML para la documentaciรณn puede obtener el OpenAPI esquema de tu API. Puedes usar aquรญ el atributo `app.openapi_url`.
    * `title`: el tรญtulo de tu API.
    * `oauth2_redirect_url`: puedes usar `app.swagger_ui_oauth2_redirect_url` aquรญ para usar el valor por defecto.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  5. docs/pt/docs/how-to/custom-docs-ui-assets.md

    * `openapi_url`: a URL onde a pรกgina HTML para a documentaรงรฃo pode obter o esquema OpenAPI para a sua API. Vocรช pode usar aqui o atributo `app.openapi_url`.
    * `title`: o tรญtulo da sua API.
    * `oauth2_redirect_url`: vocรช pode usar `app.swagger_ui_oauth2_redirect_url` aqui para usar o padrรฃo.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 8.8K bytes
    - Click Count (0)
  6. docs_src/dependencies/tutorial005_an_py310.py

    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: str | None = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[str | None, Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 510 bytes
    - Click Count (0)
  7. docs_src/query_param_models/tutorial001_an_py310.py

    from fastapi import FastAPI, Query
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class FilterParams(BaseModel):
        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(filter_query: Annotated[FilterParams, Query()]):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 17 18:54:10 GMT 2024
    - 443 bytes
    - Click Count (0)
  8. docs_src/query_params_str_validations/tutorial008_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: str | None = Query(
            default=None,
            title="Query string",
            description="Query string for the items to search in the database that have a good match",
            min_length=3,
        ),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 434 bytes
    - Click Count (0)
  9. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 580 bytes
    - Click Count (0)
  10. docs/ko/docs/advanced/testing-dependencies.md

    ์™ธ๋ถ€ ์ œ๊ณต์ž๋ฅผ ํ•œ ๋ฒˆ๋งŒ ํ…Œ์ŠคํŠธํ•˜๊ณ  ์‹ถ์„ ์ˆ˜๋„ ์žˆ์ง€๋งŒ ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•  ๋•Œ๋งˆ๋‹ค ๋ฐ˜๋“œ์‹œ ํ˜ธ์ถœํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.
    
    ์ด ๊ฒฝ์šฐ ํ•ด๋‹น ๊ณต๊ธ‰์ž๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ์ข…์†์„ฑ์„ ์˜ค๋ฒ„๋ผ์ด๋“œํ•˜๊ณ  ํ…Œ์ŠคํŠธ์— ๋Œ€ํ•ด์„œ๋งŒ ๋ชจ์˜ ์‚ฌ์šฉ์ž๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ์‚ฌ์šฉ์ž ์ง€์ • ์ข…์†์„ฑ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    
    ### `app.dependency_overrides` ์†์„ฑ ์‚ฌ์šฉํ•˜๊ธฐ
    
    ์ด๋Ÿฐ ๊ฒฝ์šฐ๋ฅผ ์œ„ํ•ด **FastAPI** ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์—๋Š” `app.dependency_overrides`๋ผ๋Š” ์†์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ๊ฐ„๋‹จํ•œ `dict`์ž…๋‹ˆ๋‹ค.
    
    ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด ์˜์กด์„ฑ์„ ์˜ค๋ฒ„๋ผ์ด๋“œํ•˜๋ ค๋ฉด, ์›๋ž˜ ์˜์กด์„ฑ(ํ•จ์ˆ˜)์„ ํ‚ค๋กœ ์„ค์ •ํ•˜๊ณ  ์˜ค๋ฒ„๋ผ์ด๋“œํ•  ์˜์กด์„ฑ(๋‹ค๋ฅธ ํ•จ์ˆ˜)์„ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
    
    ๊ทธ๋Ÿผ **FastAPI**๋Š” ์›๋ž˜ ์˜์กด์„ฑ ๋Œ€์‹  ์˜ค๋ฒ„๋ผ์ด๋“œ๋œ ์˜์กด์„ฑ์„ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Nov 27 22:12:04 GMT 2024
    - 2.6K bytes
    - Click Count (0)
Back to Top