Search Options

Results per page
Sort
Preferred Languages
Advance

Results 211 - 220 of 334 for Starlette (0.15 sec)

  1. tests/test_exception_handlers.py

    import pytest
    from fastapi import FastAPI, HTTPException
    from fastapi.exceptions import RequestValidationError
    from fastapi.testclient import TestClient
    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Feb 17 12:40:12 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  2. docs/ko/docs/advanced/events.md

    그러나 `open()`은 `async`와 `await`을 사용하지 않기 때문에 이벤트 핸들러 함수는 `async def`가 아닌 표준 `def`로 선언하고 있습니다.
    
    ///
    
    /// info | "정보"
    
    이벤트 핸들러에 관한 내용은 <a href="https://www.starlette.io/events/" class="external-link" target="_blank">Starlette 이벤트 문서</a>에서 추가로 확인할 수 있습니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. tests/test_additional_responses_custom_model_in_callback.py

    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, HttpUrl
    from starlette.responses import JSONResponse
    
    
    class CustomModel(BaseModel):
        a: int
    
    
    app = FastAPI()
    
    callback_router = APIRouter(default_response_class=JSONResponse)
    
    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. docs/tr/docs/index.md

    ## Gereksinimler
    
    FastAPI iki devin omuzları üstünde duruyor:
    
    * Web tarafı için <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a>.
    * Data tarafı için <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a>.
    
    ## Kurulum
    
    <div class="termy">
    
    ```console
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 16 16:50:01 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. docs/tr/docs/history-design-future.md

    Geliştirme sırasında, diğer ana gereksinim olan <a href="https://www.starlette.io/" class="external-link" target="_blank">**Starlette**</a>'e de katkıda bulundum.
    
    ## Geliştirme
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Jul 29 23:35:07 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. docs/nl/docs/index.md

    **Typer** is het kleine broertje van FastAPI. En het is bedoeld als de **FastAPI van CLI's**. ️
    
    ## Vereisten
    
    FastAPI staat op de schouders van reuzen:
    
    * <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> voor de webonderdelen.
    * <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> voor de datadelen.
    
    ## Installatie
    
    <div class="termy">
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. docs/ko/docs/tutorial/first-steps.md

    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    `FastAPI`는 당신의 API를 위한 모든 기능을 제공하는 파이썬 클래스입니다.
    
    /// note | "기술 세부사항"
    
    `FastAPI`는 `Starlette`를 직접 상속하는 클래스입니다.
    
    `FastAPI`로 <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a>의 모든 기능을 사용할 수 있습니다.
    
    ///
    
    ### 2 단계: `FastAPI` "인스턴스" 생성
    
    ```Python hl_lines="3"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/path-operation-configuration.md

    {!../../docs_src/path_operation_configuration/tutorial001.py!}
    ```
    
    そのステータスコードはレスポンスで使用され、OpenAPIスキーマに追加されます。
    
    /// note | "技術詳細"
    
    また、`from starlette import status`を使用することもできます。
    
    **FastAPI** は開発者の利便性を考慮して、`fastapi.status`と同じ`starlette.status`を提供しています。しかし、これはStarletteから直接提供されています。
    
    ///
    
    ## タグ
    
    `tags`パラメータを`str`の`list`(通常は1つの`str`)と一緒に渡すと、*path operation*にタグを追加できます:
    
    ```Python hl_lines="17  22  27"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/custom-response.md

    /// note | Detalhes Técnicos
    
    Você também pode utilizar `from starlette.responses import HTMLResponse`.
    
    O **FastAPI** provê a mesma `starlette.responses` como `fastapi.responses` apenas como uma facilidade para você, desenvolvedor. Mas a maioria das respostas disponíveis vêm diretamente do Starlette.
    
    ///
    
    ### `Response`
    
    A classe principal de respostas, todas as outras respostas herdam dela.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 11:47:10 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  10. docs_src/handling_errors/tutorial006.py

    from fastapi import FastAPI, HTTPException
    from fastapi.exception_handlers import (
        http_exception_handler,
        request_validation_exception_handler,
    )
    from fastapi.exceptions import RequestValidationError
    from starlette.exceptions import HTTPException as StarletteHTTPException
    
    app = FastAPI()
    
    
    @app.exception_handler(StarletteHTTPException)
    async def custom_http_exception_handler(request, exc):
        print(f"OMG! An HTTP error!: {repr(exc)}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Aug 09 11:10:33 UTC 2020
    - 928 bytes
    - Viewed (0)
Back to top