Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for defaults (0.18 sec)

  1. docs/en/docs/tutorial/response-model.md

    * `tax: float = 10.5` has a default of `10.5`.
    * `tags: List[str] = []` has a default of an empty list: `[]`.
    
    but you might want to omit them from the result if they were not actually stored.
    
    For example, if you have models with many optional attributes in a NoSQL database, but you don't want to send very long JSON responses full of default values.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  2. docs/en/docs/alternatives.md

    They are, more or less, at opposite ends, complementing each other.
    
    Requests has a very simple and intuitive design, it's very easy to use, with sensible defaults. But at the same time, it's very powerful and customizable.
    
    That's why, as said in the official website:
    
    > Requests is one of the most downloaded Python packages of all time
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  3. fastapi/encoders.py

                exclude_none=exclude_none,
                exclude_defaults=exclude_defaults,
            )
            if "__root__" in obj_dict:
                obj_dict = obj_dict["__root__"]
            return jsonable_encoder(
                obj_dict,
                exclude_none=exclude_none,
                exclude_defaults=exclude_defaults,
                # TODO: remove when deprecating Pydantic v1
                custom_encoder=encoders,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/response-model.md

    !!! info
        Sie können auch:
    
        * `response_model_exclude_defaults=True`
        * `response_model_exclude_none=True`
    
        verwenden, wie in der <a href="https://docs.pydantic.dev/1.10/usage/exporting_models/#modeldict" class="external-link" target="_blank">Pydantic Dokumentation</a> für `exclude_defaults` und `exclude_none` beschrieben.
    
    #### Daten mit Werten für Felder mit Defaultwerten
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/response-model.md

    !!! info
        👆 💪 ⚙️:
    
        * `response_model_exclude_defaults=True`
        * `response_model_exclude_none=True`
    
        🔬 <a href="https://docs.pydantic.dev/latest/concepts/serialization/#modeldict" class="external-link" target="_blank">Pydantic 🩺</a> `exclude_defaults` &amp; `exclude_none`.
    
    #### 📊 ⏮️ 💲 🏑 ⏮️ 🔢
    
    ✋️ 🚥 👆 📊 ✔️ 💲 🏷 🏑 ⏮️ 🔢 💲, 💖 🏬 ⏮️ 🆔 `bar`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 16K bytes
    - Viewed (0)
  6. docs/en/docs/how-to/sql-databases-peewee.md

    Peewee was not designed for async frameworks, or with them in mind.
    
    Peewee has some heavy assumptions about its defaults and about how it should be used.
    
    If you are developing an application with an older non-async framework, and can work with all its defaults, **it can be a great tool**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (1)
  7. docs/de/docs/tutorial/query-params-str-validations.md

    <img src="/img/tutorial/query-params-str-validations/image02.png">
    
    ### Query-Parameter-Liste / Mehrere Werte mit Defaults
    
    Und Sie können auch eine Default-`list`e von Werten definieren, wenn keine übergeben werden:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 17:58:59 GMT 2024
    - 27.7K bytes
    - Viewed (0)
  8. tests/test_openapi_separate_input_output_schemas.py

        tags: List[str] = []
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
        sub: Optional[SubItem] = None
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    def get_app_client(separate_input_output_schemas: bool = True) -> TestClient:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  9. fastapi/params.py

            json_schema_extra: Union[Dict[str, Any], None] = None,
            **extra: Any,
        ):
            assert default is ..., "Path parameters cannot have a default value"
            self.in_ = self.in_
            super().__init__(
                default=default,
                default_factory=default_factory,
                annotation=annotation,
                alias=alias,
                alias_priority=alias_priority,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  10. tests/test_query.py

                    }
                ]
            }
        )
    
    
    def test_query_int_default():
        response = client.get("/query/int/default")
        assert response.status_code == 200
        assert response.json() == "foo bar 10"
    
    
    def test_query_int_default_query_50():
        response = client.get("/query/int/default?query=50")
        assert response.status_code == 200
        assert response.json() == "foo bar 50"
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
Back to top