Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 96 for if (0.21 sec)

  1. docs/en/docs/advanced/websockets.md

    === "Python 3.10+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="66-67  79"
        {!> ../../../docs_src/websockets/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="68-69  81"
        {!> ../../../docs_src/websockets/tutorial002.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. docs/en/docs/features.md

    ### Just Modern Python
    
    It's all based on standard **Python type** declarations (thanks to Pydantic). No new syntax to learn. Just standard modern Python.
    
    If you need a 2 minute refresher of how to use Python types (even if you don't use FastAPI), check the short tutorial: [Python Types](python-types.md){.internal-link target=_blank}.
    
    You write standard Python with types:
    
    ```Python
    from datetime import date
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/simple-oauth2.md

    We want to get the `current_user` *only* if this user is active.
    
    So, we create an additional dependency `get_current_active_user` that in turn uses `get_current_user` as a dependency.
    
    Both of these dependencies will just return an HTTP error if the user doesn't exist, or if is inactive.
    
    So, in our endpoint, we will only get a user if the user exists, was correctly authenticated, and is active:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  4. docs/pt/docs/fastapi-people.md

    {% if sponsors %}
    {% if sponsors.gold %}
    
    ### Patrocinadores Ouro
    
    {% for sponsor in sponsors.gold -%}
    <a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}"></a>
    {% endfor %}
    {% endif %}
    
    {% if sponsors.silver %}
    
    ### Patrocinadores Prata
    
    {% for sponsor in sponsors.silver -%}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  5. docs/uk/docs/fastapi-people.md

    {% if sponsors %}
    
    {% if sponsors.gold %}
    
    ### Золоті спонсори
    
    {% for sponsor in sponsors.gold -%}
    <a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}" style="border-radius:15px"></a>
    {% endfor %}
    {% endif %}
    
    {% if sponsors.silver %}
    
    ### Срібні спонсори
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  6. docs/en/docs/async.md

    If your utility function is a normal function with `def`, it will be called directly (as you write it in your code), not in a threadpool, if the function is created with `async def` then you should `await` for that function when you call it in your code.
    
    ---
    
    Again, these are very technical details that would probably be useful if you came searching for them.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    And if that `Response` has a JSON media type (`application/json`), like is the case with the `JSONResponse` and `UJSONResponse`, the data you return will be automatically converted (and filtered) with any Pydantic `response_model` that you declared in the *path operation decorator*.
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  8. tests/test_filter_pydantic_sub_model_pv2.py

        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:
            return ModelC(username="test-user", password="test-password")
    
    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)
  9. README.md

    * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
    * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  10. fastapi/openapi/models.py

        anyOf: Optional[List["SchemaOrBool"]] = None
        oneOf: Optional[List["SchemaOrBool"]] = None
        not_: Optional["SchemaOrBool"] = Field(default=None, alias="not")
        if_: Optional["SchemaOrBool"] = Field(default=None, alias="if")
        then: Optional["SchemaOrBool"] = None
        else_: Optional["SchemaOrBool"] = Field(default=None, alias="else")
        dependentSchemas: Optional[Dict[str, "SchemaOrBool"]] = None
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top