Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 47 of 47 for exists (0.18 sec)

  1. docs/en/docs/advanced/response-change-status-code.md

    But in some cases you need to return a different status code than the default.
    
    ## Use case
    
    For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
    
    But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`.
    
    But you still want to be able to filter and convert the data you return with a `response_model`.
    
    For those cases, you can use a `Response` parameter.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. docs/fr/docs/alternatives.md

    Mais la documentation fait toujours défaut. C'est alors qu'APISpec a été créé.
    
    Il s'agit d'un plug-in pour de nombreux frameworks (et il existe également un plug-in pour Starlette).
    
    Le principe est le suivant : vous écrivez la définition du schéma au format YAML dans la docstring de chaque fonction gérant une route.
    
    Et il génère des schémas OpenAPI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27.5K bytes
    - Viewed (0)
  3. docs/es/docs/advanced/response-change-status-code.md

    Pero en algunos casos necesitas retornar un status code diferente al predeterminado.
    
    ## Casos de uso
    
    Por ejemplo, imagina que quieres retornar un HTTP status code de "OK" `200` por defecto.
    
    Pero si los datos no existen, quieres crearlos y retornar un HTTP status code de "CREATED" `201`.
    
    Pero aún quieres poder filtrar y convertir los datos que retornas con un `response_model`.
    
    Para esos casos, puedes usar un parámetro `Response`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Feb 06 19:56:23 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/encoder.md

    # Codificador Compatível com JSON
    
    Existem alguns casos em que você pode precisar converter um tipo de dados (como um modelo Pydantic) para algo compatível com JSON (como um `dict`, `list`, etc).
    
    Por exemplo, se você precisar armazená-lo em um banco de dados.
    
    Para isso, **FastAPI** fornece uma função `jsonable_encoder()`.
    
    ## Usando a função `jsonable_encoder`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/security/first-steps.md

    Se ele não ver o header de `Autorização` ou o valor não tem um token `Bearer`, vai responder com um código de erro  401 (`UNAUTHORIZED`) diretamente.
    
    Você nem precisa verificar se o token existe para retornar um erro. Você pode ter certeza de que se a sua função for executada, ela terá um `str` nesse token.
    
    Você já pode experimentar na documentação interativa:
    
    <img src="/img/tutorial/security/image03.png">
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/query-params.md

        {!> ../../../docs_src/query_params/tutorial006_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/query_params/tutorial006.py!}
        ```
    
    Nesse caso, existem 3 parâmetros de consulta:
    
    * `needy`, um `str` obrigatório.
    * `skip`, um `int` com o valor padrão `0`.
    * `limit`, um `int` opcional.
    
    !!! tip "Dica"
    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)
  7. docs/en/docs/deployment/docker.md

    When the **container** is started and running (started from a **container image**) it could create or change files, environment variables, etc. Those changes will exist only in that container, but would not persist in the underlying container image (would not be saved to disk).
    
    A container image is comparable to the **program** file and contents, e.g. `python` and some file `main.py`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
Back to top