Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1051 - 1060 of 1,977 for Fastapi (0.1 sec)

  1. tests/test_security_http_digest_description.py

    from fastapi import FastAPI, Security
    from fastapi.security import HTTPAuthorizationCredentials, HTTPDigest
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    security = HTTPDigest(description="HTTPDigest scheme")
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)):
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. .github/workflows/publish.yml

    name: Publish
    
    on:
      release:
        types:
          - created
    
    jobs:
      publish:
        runs-on: ubuntu-latest
        strategy:
          matrix:
            package:
              - fastapi
              - fastapi-slim
        permissions:
          id-token: write
        steps:
          - name: Dump GitHub context
            env:
              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: actions/checkout@v4
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Nov 01 11:19:50 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_extra_models/test_tutorial005_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.extra_models.tutorial005_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get_items(client: TestClient):
        response = client.get("/keyword-weights/")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_websockets/test_tutorial001.py

    import pytest
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from docs_src.websockets.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    def test_websocket():
        with pytest.raises(WebSocketDisconnect):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 10 09:08:19 UTC 2020
    - 822 bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/dependencies/index.md

    /// info | "Informação"
    
    FastAPI passou a suportar a notação `Annotated` (e começou a recomendá-la) na versão 0.95.0.
    
    Se você utiliza uma versão anterior, ocorrerão erros ao tentar utilizar `Annotated`.
    
    Certifique-se de [Atualizar a versão do FastAPI](../../deployment/versions.md#atualizando-as-versoes-do-fastapi){.internal-link target=_blank} para pelo menos 0.95.1 antes de usar `Annotated`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. docs/de/docs/advanced/websockets.md

    {!../../docs_src/websockets/tutorial001.py!}
    ```
    
    ## Einen `websocket` erstellen
    
    Erstellen Sie in Ihrer **FastAPI**-Anwendung einen `websocket`:
    
    ```Python hl_lines="1  46-47"
    {!../../docs_src/websockets/tutorial001.py!}
    ```
    
    /// note | "Technische Details"
    
    Sie können auch `from starlette.websockets import WebSocket` verwenden.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  7. docs/fr/docs/alternatives.md

    quelque chose qu'un framework comme Starlette (ou **FastAPI**) fournirait par-dessus.
    
    C'est le serveur recommandé pour Starlette et **FastAPI**.
    
    /// check | "**FastAPI** le recommande comme"
    
    Le serveur web principal pour exécuter les applications **FastAPI**.
    
    Vous pouvez le combiner avec Gunicorn, pour avoir un serveur multi-processus asynchrone.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  8. docs/uk/docs/tutorial/body.md

    * Якщо параметр оголошується як тип **Pydantic моделі**, він інтерпретується як **тіло** запиту.
    
    /// note
    
    FastAPI буде знати, що значення "q" не є обов'язковим через значення за замовчуванням "= None".
    
    `Optional` у `Optional[str]` не використовується FastAPI, але дозволить вашому редактору надати вам кращу підтримку та виявляти помилки.
    
    ///
    
    ## Без Pydantic
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/first-steps.md

    ```
    
    `FastAPI` ist eine Python-Klasse, die die gesamte Funktionalität für Ihre API bereitstellt.
    
    /// note | "Technische Details"
    
    `FastAPI`  ist eine Klasse, die direkt von `Starlette` erbt.
    
    Sie können alle <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a>-Funktionalitäten auch mit `FastAPI` nutzen.
    
    ///
    
    ### Schritt 2: Erzeugen einer `FastAPI`-„Instanz“
    
    ```Python hl_lines="3"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/cors.md

    ## Использование `CORSMiddleware`
    
    Вы можете настроить этот механизм в вашем **FastAPI** приложении, используя `CORSMiddleware`.
    
    * Импортируйте `CORSMiddleware`.
    * Создайте список разрешённых источников (в виде строк).
    * Добавьте его как "middleware" к вашему **FastAPI** приложению.
    
    Вы также можете указать, разрешает ли ваш бэкенд использование:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top