Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 478 for unifon (0.13 sec)

  1. docs/pt/docs/python-types.md

    ```
    
    ////
    
    #### Utilizando `Union` ou `Optional`
    
    Se você está utilizando uma versão do Python abaixo da 3.10, aqui vai uma dica do meu ponto de vista bem **subjetivo**:
    
    * 🚨 Evite utilizar `Optional[SomeType]`
    * No lugar, ✨ **use `Union[SomeType, None]`** ✨.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 15 12:32:27 UTC 2024
    - 18K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/body.md

    * Se o parâmetro é de um **tipo único** (como `int`, `float`, `str`, `bool`, etc) será interpretado como um parâmetro de **consulta**.
    * Se o parâmetro é declarado como um **modelo Pydantic**, será interpretado como o **corpo** da requisição.
    
    /// note | "Observação"
    
    O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= None`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/extra-data-types.md

            * Nas requisições, uma lista será lida, eliminando duplicadas e convertendo-a em um `set`.
            * Nas respostas, o `set` será convertido para uma `list`.
            * O esquema gerado vai especificar que os valores do `set` são unicos (usando o `uniqueItems` do JSON Schema).
    * `bytes`:
        * O `bytes` padrão do Python.
        * Em requisições e respostas será representado como uma `str`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. docs_src/body_multiple_params/tutorial004.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 10 18:49:18 UTC 2023
    - 653 bytes
    - Viewed (0)
  5. docs_src/body_multiple_params/tutorial004_an.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 703 bytes
    - Viewed (0)
  6. docs_src/body_multiple_params/tutorial004_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 674 bytes
    - Viewed (0)
  7. fastapi/openapi/models.py

        headers: Optional[Dict[str, Union[Header, Reference]]] = None
        securitySchemes: Optional[Dict[str, Union[SecurityScheme, Reference]]] = None
        links: Optional[Dict[str, Union[Link, Reference]]] = None
        # Using Any for Specification Extensions
        callbacks: Optional[Dict[str, Union[Dict[str, PathItem], Reference, Any]]] = None
        pathItems: Optional[Dict[str, Union[PathItem, Reference]]] = None
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 22:49:33 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. fastapi/params.py

                ),
            ] = None,
            discriminator: Union[str, None] = None,
            strict: Union[bool, None] = _Unset,
            multiple_of: Union[float, None] = _Unset,
            allow_inf_nan: Union[bool, None] = _Unset,
            max_digits: Union[int, None] = _Unset,
            decimal_places: Union[int, None] = _Unset,
            examples: Optional[List[Any]] = None,
            example: Annotated[
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 18:06:20 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  9. docs_src/body_multiple_params/tutorial001_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Path
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: Union[str, None] = None,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 610 bytes
    - Viewed (0)
  10. docs_src/body_multiple_params/tutorial003_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 575 bytes
    - Viewed (0)
Back to top