Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 60 for define (0.15 sec)

  1. docs_src/separate_openapi_schemas/tutorial001_py310.py

    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
                description="Device to travel through the multi-rick-verse",
            ),
            Item(name="Plumbus"),
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 451 bytes
    - Viewed (0)
  2. docs/es/docs/python-types.md

    Para declarar esos tipos y sub-tipos puedes usar el módulo estándar de Python `typing`.
    
    Él existe específicamente para dar soporte a este tipo de type hints.
    
    #### Listas
    
    Por ejemplo, vamos a definir una variable para que sea una `list` compuesta de `str`.
    
    De `typing`, importa `List` (con una `L` mayúscula):
    
    ```Python hl_lines="1"
    {!../../../docs_src/python_types/tutorial006.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  3. docs/pt/docs/python-types.md

    Para declarar esses tipos e os tipos internos, você pode usar o módulo Python padrão `typing`.
    
    Ele existe especificamente para suportar esses type hints.
    
    #### `List`
    
    Por exemplo, vamos definir uma variável para ser uma `lista` de `str`.
    
    Em `typing`, importe `List` (com um `L` maiúsculo):
    
    ```Python hl_lines="1"
    {!../../../docs_src/python_types/tutorial006.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py

        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
                "name": "Portal Gun",
                "description": "Device to travel through the multi-rick-verse",
            },
            {"name": "Plumbus", "description": None},
        ]
    
    
    @needs_py310
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py

        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
                "name": "Portal Gun",
                "description": "Device to travel through the multi-rick-verse",
            },
            {"name": "Plumbus", "description": None},
        ]
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. docs/pt/docs/deployment/versions.md

    Se você usar qualquer outra ferramenta para gerenciar suas instalações, como Poetry, Pipenv ou outras, todas elas têm uma maneira que você pode usar para definir as versões específicas dos seus pacotes.
    
    ## Versões disponíveis
    
    Você pode ver as versões disponíveis (por exemplo, para verificar qual é a versão atual) em [Release Notes](../release-notes.md){.internal-link target=\_blank}.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 29 20:14:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/handling-errors.md

    # Handling Errors
    
    There are many situations in which you need to notify an error to a client that is using your API.
    
    This client could be a browser with a frontend, a code from someone else, an IoT device, etc.
    
    You could need to tell the client that:
    
    * The client doesn't have enough privileges for that operation.
    * The client doesn't have access to that resource.
    * The item the client was trying to access doesn't exist.
    * etc.
    
    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)
  8. fastapi/exceptions.py

        """
    
        def __init__(
            self,
            code: Annotated[
                int,
                Doc(
                    """
                    A closing code from the
                    [valid codes defined in the specification](https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1).
                    """
                ),
            ],
            reason: Annotated[
                Union[str, None],
                Doc(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/body-nested-models.md

    Portanto, você pode declarar "objects" JSON profundamente aninhados com nomes, tipos e validações de atributos específicos.
    
    Tudo isso, aninhado arbitrariamente.
    
    ### Defina um sub-modelo
    
    Por exemplo, nós podemos definir um modelo `Image`:
    
    ```Python hl_lines="9-11"
    {!../../../docs_src/body_nested_models/tutorial004.py!}
    ```
    
    ### Use o sub-modelo como um tipo
    
    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. .github/workflows/build-docs.yml

      docs-all-green:  # This job does nothing and is only used for the branch protection
        if: always()
        needs:
          - build-docs
        runs-on: ubuntu-latest
        steps:
          - name: Decide whether the needed jobs succeeded or failed
            uses: re-actors/alls-green@release/v1
            with:
              jobs: ${{ toJSON(needs) }}
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 03:12:00 GMT 2024
    - 4.8K bytes
    - Viewed (0)
Back to top