Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for Carnes (0.98 sec)

  1. tests/test_tutorial/test_events/test_tutorial001.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial001 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. tests/test_regex_deprecated_params.py

    from fastapi import FastAPI, Query
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(DeprecationWarning):
    
            @app.get("/items/")
            async def read_items(
                q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
            ):
                if q:
                    return f"Hello {q}"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/query-params.md

    ```Python hl_lines="9"
    {!../../../docs_src/query_params/tutorial001.py!}
    ```
    
    El query es el conjunto de pares de key-value que van después del `?` en la URL, separados por caracteres `&`.
    
    Por ejemplo, en la URL:
    
    ```
    http://127.0.0.1:8000/items/?skip=0&limit=10
    ```
    
    ...los parámetros de query son:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/path-params-numeric-validations.md

    Passe `*`, como o primeiro parâmetro da função.
    
    O Python não vai fazer nada com esse `*`, mas ele vai saber que a partir dali os parâmetros seguintes deverão ser chamados argumentos nomeados (pares chave-valor), também conhecidos como <abbr title="Do inglês: K-ey W-ord Arg-uments"><code>kwargs</code></abbr>. Mesmo que eles não possuam um valor padrão.
    
    ```Python hl_lines="7"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/query-params.md

    ```Python hl_lines="9"
    {!../../../docs_src/query_params/tutorial001.py!}
    ```
    
    A consulta é o conjunto de pares chave-valor que vai depois de `?` na URL, separado pelo caractere `&`.
    
    Por exemplo, na URL:
    
    ```
    http://127.0.0.1:8000/items/?skip=0&limit=10
    ```
    
    ...os parâmetros da consulta são:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. docs/es/docs/async.md

    ## Detalles Técnicos
    
    Las versiones modernas de Python tienen soporte para **"código asíncrono"** usando algo llamado **"coroutines"**, usando la sintaxis **`async` y `await`**.
    
    Veamos esa frase por partes en las secciones siguientes:
    
    * **Código Asíncrono**
    * **`async` y `await`**
    * **Coroutines**
    
    ## Código Asíncrono
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  7. docs/pt/docs/alternatives.md

    Ele é projetado para ter funções que recebem dois parâmetros, uma "requisição" e uma "resposta". Então você "lê" as partes da requisição, e "escreve" partes para a resposta. Devido ao seu design, não é possível declarar parâmetros de requisição e corpos com _type hints_ Python padrão como parâmetros de funções.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_async_sql_databases/test_tutorial001.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.async_sql_databases.tutorial001 import app
        yield app
    
    
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_create_read(app: FastAPI):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 6K bytes
    - Viewed (0)
  9. tests/test_regex_deprecated_body.py

    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(DeprecationWarning):
    
            @app.post("/items/")
            async def read_items(
                q: Annotated[str | None, Form(regex="^fixedquery$")] = None,
            ):
                if q:
                    return f"Hello {q}"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```
    
    ...and **FastAPI** will know what to do.
    
    !!! tip
        If that seems more confusing than helpful, disregard it, you don't *need* it.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
Back to top