Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for syntax (0.17 sec)

  1. docs/en/docs/tutorial/path-params.md

    # Path Parameters
    
    You can declare path "parameters" or "variables" with the same syntax used by Python format strings:
    
    ```Python hl_lines="6-7"
    {!../../../docs_src/path_params/tutorial001.py!}
    ```
    
    The value of the path parameter `item_id` will be passed to your function as the argument `item_id`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/configure-swagger-ui.md

    FastAPI converts the configurations to **JSON** to make them compatible with JavaScript, as that's what Swagger UI needs.
    
    ## Disable Syntax Highlighting
    
    For example, you could disable syntax highlighting in Swagger UI.
    
    Without changing the settings, syntax highlighting is enabled by default:
    
    <img src="/img/tutorial/extending-openapi/image02.png">
    
    But you can disable it by setting `syntaxHighlight` to `False`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. docs/en/docs/features.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)
    
    ### Just Modern Python
    
    It's all based on standard **Python type** declarations (thanks to Pydantic). No new syntax to learn. Just standard modern Python.
    
    If you need a 2 minute refresher of how to use Python types (even if you don't use FastAPI), check the short tutorial: [Python Types](python-types.md){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/body-nested-models.md

    ```Python
    my_list: list[str]
    ```
    
    In versions of Python before 3.9, it would be:
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    That's all standard Python syntax for type declarations.
    
    Use that same standard syntax for model attributes with internal types.
    
    So, in our example, we can make `tags` be specifically a "list of strings":
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. docs/en/docs/deployment/server-workers.md

    [19515] [INFO] Waiting for application startup.
    [19515] [INFO] Application startup complete.
    ```
    
    </div>
    
    Let's see what each of those options mean:
    
    * `main:app`: This is the same syntax used by Uvicorn, `main` means the Python module named "`main`", so, a file `main.py`. And `app` is the name of the variable that is the **FastAPI** application.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/path-params-numeric-validations.md

    * declare the `q` query parameter without a `Query` nor any default value
    * declare the path parameter `item_id` using `Path`
    * have them in a different order
    * not use `Annotated`
    
    ...Python has a little special syntax for that.
    
    Pass `*`, as the first parameter of the function.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/path-params.md

    # Parâmetros da rota da URL
    
    Você pode declarar os "parâmetros" ou "variáveis" com a mesma sintaxe utilizada pelo formato de strings do Python:
    
    ```Python hl_lines="6-7"
    {!../../../docs_src/path_params/tutorial001.py!}
    ```
    
    O valor do parâmetro que foi passado à `item_id` será passado para a sua função como o argumento `item_id`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/first-steps.md

    * a rota `/`
    * usando o  <abbr title="o método HTTP GET">operador <code>get</code></abbr>
    
    !!! info "`@decorador`"
        Essa sintaxe `@alguma_coisa` em Python é chamada de "decorador".
    
        Você o coloca em cima de uma função. Como um chapéu decorativo (acho que é daí que vem o termo).
    
        Um "decorador" pega a função abaixo e faz algo com ela.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/body-nested-models.md

    * Passe o(s) tipo(s) interno(s) como "parâmetros de tipo" usando colchetes: `[` e `]`
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    Essa é a sintaxe padrão do Python para declarações de tipo.
    
    Use a mesma sintaxe padrão para atributos de modelo com tipos internos.
    
    Portanto, em nosso exemplo, podemos fazer com que `tags` sejam especificamente uma "lista de strings":
    
    
    ```Python hl_lines="14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/path-params-numeric-validations.md

    Se você quiser declarar o parâmetro de consulta `q` sem um `Query` nem um valor padrão, e o parâmetro de rota `item_id` usando `Path`, e definí-los em uma ordem diferente, Python tem um pequeno truque na sintaxe para isso.
    
    Passe `*`, como o primeiro parâmetro da função.
    
    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)
Back to top