Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 268 for defaults (0.15 sec)

  1. tests/test_jsonable_encoder.py

        assert jsonable_encoder(model) == {"Foo": "Bar"}
    
    
    def test_encode_model_with_default():
        model = ModelWithDefault(foo="foo", bar="bar")
        assert jsonable_encoder(model) == {"foo": "foo", "bar": "bar", "bla": "bla"}
        assert jsonable_encoder(model, exclude_unset=True) == {"foo": "foo", "bar": "bar"}
        assert jsonable_encoder(model, exclude_defaults=True) == {"foo": "foo"}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/extending-openapi.md

    ## Overriding the defaults
    
    Using the information above, you can use the same utility function to generate the OpenAPI schema and override each part that you need.
    
    For example, let's add <a href="https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-logo" class="external-link" target="_blank">ReDoc's OpenAPI extension to include a custom logo</a>.
    
    ### Normal **FastAPI**
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  3. 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 (0)
  4. 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)
  5. 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)
  6. 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)
  7. fastapi/param_functions.py

            item_id: Annotated[int, Path(title="The ID of the item to get")],
        ):
            return {"item_id": item_id}
        ```
        """
        return params.Path(
            default=default,
            default_factory=default_factory,
            alias=alias,
            alias_priority=alias_priority,
            validation_alias=validation_alias,
            serialization_alias=serialization_alias,
            title=title,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  8. fastapi/utils.py

        Create a new response field. Raises if type_ is invalid.
        """
        class_validators = class_validators or {}
        if PYDANTIC_V2:
            field_info = field_info or FieldInfo(
                annotation=type_, default=default, alias=alias
            )
        else:
            field_info = field_info or FieldInfo()
        kwargs = {"name": name, "field_info": field_info}
        if PYDANTIC_V2:
            kwargs.update({"mode": mode})
        else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. 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)
  10. docs_src/sql_databases_peewee/sql_app/database.py

    from contextvars import ContextVar
    
    import peewee
    
    DATABASE_NAME = "test.db"
    db_state_default = {"closed": None, "conn": None, "ctx": None, "transactions": None}
    db_state = ContextVar("db_state", default=db_state_default.copy())
    
    
    class PeeweeConnectionState(peewee._ConnectionState):
        def __init__(self, **kwargs):
            super().__setattr__("_state", db_state)
            super().__init__(**kwargs)
    
        def __setattr__(self, name, value):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 662 bytes
    - Viewed (0)
Back to top