Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for Power (0.43 sec)

  1. docs/en/docs/advanced/dataclasses.md

        Keep in mind that dataclasses can't do everything Pydantic models can do.
    
        So, you might still need to use Pydantic models.
    
        But if you have a bunch of dataclasses laying around, this is a nice trick to use them to power a web API using FastAPI. 🤓
    
    ## Dataclasses in `response_model`
    
    You can also use `dataclasses` in the `response_model` parameter:
    
    ```Python hl_lines="1  7-13  19"
    {!../../../docs_src/dataclasses/tutorial002.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body.md

    To declare a **request** body, you use <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> models with all their power and benefits.
    
    !!! info
        To send data, you should use one of: `POST` (the more common), `PUT`, `DELETE` or `PATCH`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. docs/en/docs/help-fastapi.md

    There you could buy me a coffee ☕️ to say thanks. 😄
    
    And you can also become a Silver or Gold sponsor for FastAPI. 🏅🎉
    
    ## Sponsor the tools that power FastAPI
    
    As you have seen in the documentation, FastAPI stands on the shoulders of giants, Starlette and Pydantic.
    
    You can also sponsor:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  4. docs/en/docs/fastapi-people.md

    ## Top Translation Reviewers
    
    These users are the **Top Translation Reviewers**. 🕵️
    
    I only speak a few languages (and not very well 😅). So, the reviewers are the ones that have the [**power to approve translations**](contributing.md#translations){.internal-link target=_blank} of the documentation. Without them, there wouldn't be documentation in several other languages.
    
    {% if people %}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 16 23:54:24 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  5. docs/en/docs/deployment/concepts.md

    If you are paying for 3 servers but you are using only a little bit of their RAM and CPU, you are probably **wasting money** 💸, and probably **wasting server electric power** 🌎, etc.
    
    In that case, it could be better to have only 2 servers and use a higher percentage of their resources (CPU, memory, disk, network bandwidth, etc).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  6. tests/test_additional_responses_router.py

        },
    )
    async def b():
        return "b"
    
    
    @router.get(
        "/c",
        responses={
            "400": {"description": "Error with str"},
            "5xx": {"description": "Error with range, lower"},
            "default": {"description": "A default response"},
        },
    )
    async def c():
        return "c"
    
    
    @router.get(
        "/d",
        responses={
            "400": {"description": "Error with str"},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  7. tests/test_filter_pydantic_sub_model_pv2.py

        class ModelC(ModelB):
            password: str
    
        class ModelA(BaseModel):
            name: str
            description: Optional[str] = None
            foo: ModelB
    
            @field_validator("name")
            def lower_username(cls, name: str, info: ValidationInfo):
                if not name.endswith("A"):
                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body-nested-models.md

    ```
    
    ### Declare a `list` with a type parameter
    
    To declare types that have type parameters (internal types), like `list`, `dict`, `tuple`:
    
    * If you are in a Python version lower than 3.9, import their equivalent version from the `typing` module
    * Pass the internal type(s) as "type parameters" using square brackets: `[` and `]`
    
    In Python 3.9 it would be:
    
    ```Python
    my_list: list[str]
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  9. tests/test_filter_pydantic_sub_model/app_pv1.py

        username: str
    
    
    class ModelC(ModelB):
        password: str
    
    
    class ModelA(BaseModel):
        name: str
        description: Optional[str] = None
        model_b: ModelB
    
        @validator("name")
        def lower_username(cls, name: str, values):
            if not name.endswith("A"):
                raise ValueError("name must end in A")
            return name
    
    
    async def get_model_c() -> ModelC:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 784 bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/schema-extra-example.md

        Because of that, versions of FastAPI previous to 0.99.0 still used versions of OpenAPI lower than 3.1.0.
    
    ### Pydantic and FastAPI `examples`
    
    When you add `examples` inside a Pydantic model, using `schema_extra` or `Field(examples=["something"])` that example is added to the **JSON Schema** for that Pydantic model.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
Back to top