Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 107 for dict (0.26 sec)

  1. docs/em/docs/tutorial/extra-models.md

    & 🚥 👥 🤙:
    
    ```Python
    print(user_dict)
    ```
    
    👥 🔜 🤚 🐍 `dict` ⏮️:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### 🎁 `dict`
    
    🚥 👥 ✊ `dict` 💖 `user_dict` & 🚶‍♀️ ⚫️ 🔢 (⚖️ 🎓) ⏮️ `**user_dict`, 🐍 🔜 "🎁" ⚫️. ⚫️ 🔜 🚶‍♀️ 🔑 & 💲 `user_dict` 🔗 🔑-💲 ❌.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  2. fastapi/openapi/models.py

        schemas: Optional[Dict[str, Union[Schema, Reference]]] = None
        responses: Optional[Dict[str, Union[Response, Reference]]] = None
        parameters: Optional[Dict[str, Union[Parameter, Reference]]] = None
        examples: Optional[Dict[str, Union[Example, Reference]]] = None
        requestBodies: Optional[Dict[str, Union[RequestBody, Reference]]] = None
        headers: Optional[Dict[str, Union[Header, Reference]]] = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. fastapi/encoders.py

        SecretStr: str,
        set: list,
        UUID: str,
        Url: str,
        AnyUrl: str,
    }
    
    
    def generate_encoders_by_class_tuples(
        type_encoder_map: Dict[Any, Callable[[Any], Any]],
    ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
        encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(
            tuple
        )
        for type_, encoder in type_encoder_map.items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/extra-models.md

        email = user_dict["email"],
        full_name = user_dict["full_name"],
    )
    ```
    
    #### A Pydantic model from the contents of another
    
    As in the example above we got `user_dict` from `user_in.dict()`, this code:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    would be equivalent to:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  5. docs/en/docs/how-to/async-sql-encode-databases.md

    ### About `{**note.dict(), "id": last_record_id}`
    
    `note` is a Pydantic `Note` object.
    
    `note.dict()` returns a `dict` with its data, something like:
    
    ```Python
    {
        "text": "Some note",
        "completed": False,
    }
    ```
    
    but it doesn't have the `id` field.
    
    So we create a new `dict`, that contains the key-value pairs from `note.dict()` with:
    
    ```Python
    {**note.dict()}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/body-nested-models.md

    Você não conseguiria este tipo de suporte de editor se estivesse trabalhando diretamente com `dict` em vez de modelos Pydantic.
    
    Mas você também não precisa se preocupar com eles, os dicts de entrada são convertidos automaticamente e sua saída é convertida automaticamente para JSON também.
    
    ## Corpos de `dict`s arbitrários
    
    Você também pode declarar um corpo como um `dict` com chaves de algum tipo e valores de outro tipo.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  7. fastapi/_compat.py

        ) -> Any:
            return {}
    
        def get_model_definitions(
            *,
            flat_models: Set[Union[Type[BaseModel], Type[Enum]]],
            model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str],
        ) -> Dict[str, Any]:
            definitions: Dict[str, Dict[str, Any]] = {}
            for model in flat_models:
                m_schema, m_definitions, m_nested_models = model_process_schema(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  8. fastapi/utils.py

        return operation_id
    
    
    def deep_dict_update(main_dict: Dict[Any, Any], update_dict: Dict[Any, Any]) -> None:
        for key, value in update_dict.items():
            if (
                key in main_dict
                and isinstance(main_dict[key], dict)
                and isinstance(value, dict)
            ):
                deep_dict_update(main_dict[key], value)
            elif (
                key in main_dict
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. docs/uk/docs/tutorial/encoder.md

    # JSON Compatible Encoder
    
    Існують випадки, коли вам може знадобитися перетворити тип даних (наприклад, модель Pydantic) в щось сумісне з JSON (наприклад, `dict`, `list`, і т. д.).
    
    Наприклад, якщо вам потрібно зберегти це в базі даних.
    
    Для цього, **FastAPI** надає `jsonable_encoder()` функцію.
    
    ## Використання `jsonable_encoder`
    
    Давайте уявимо, що у вас є база даних `fake_db`, яка приймає лише дані, сумісні з JSON.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  10. fastapi/openapi/utils.py

        if license_info:
            info["license"] = license_info
        output: Dict[str, Any] = {"openapi": openapi_version, "info": info}
        if servers:
            output["servers"] = servers
        components: Dict[str, Dict[str, Any]] = {}
        paths: Dict[str, Dict[str, Any]] = {}
        webhook_paths: Dict[str, Dict[str, Any]] = {}
        operation_ids: Set[str] = set()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
Back to top