Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for shapes (0.33 sec)

  1. fastapi/utils.py

        new_field.post_validators = field.post_validators  # type: ignore[attr-defined]
        new_field.parse_json = field.parse_json  # type: ignore[attr-defined]
        new_field.shape = field.shape  # type: ignore[attr-defined]
        new_field.populate_validators()  # type: ignore[attr-defined]
        return new_field
    
    
    def generate_operation_id_for_path(
        *, name: str, path: str, method: str
    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)
  2. docs/de/docs/reference/dependencies.md

    ::: fastapi.Depends
    
    ## `Security()`
    
    In vielen Szenarien können Sie die Sicherheit (Autorisierung, Authentifizierung usw.) mit Abhängigkeiten handhaben, indem Sie `Depends()` verwenden.
    
    Wenn Sie jedoch auch OAuth2-Scopes deklarieren möchten, können Sie `Security()` anstelle von `Depends()` verwenden.
    
    Sie können `Security()` direkt von `fastapi` importieren:
    
    ```python
    from fastapi import Security
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:16:45 GMT 2024
    - 765 bytes
    - Viewed (0)
  3. docs_src/security/tutorial005_an.py

                raise credentials_exception
            token_scopes = payload.get("scopes", [])
            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
            if scope not in token_data.scopes:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/security/simple-oauth2.md

        但由于这种用例很常见,FastAPI 为了简便,就直接提供了对它的支持。
    
    ### 使用表单数据
    
    !!! tip "提示"
    
        `OAuth2PasswordRequestForm` 类依赖项的实例没有以空格分隔的长字符串属性 `scope`,但它支持 `scopes` 属性,由已发送的 scope 字符串列表组成。
    
        本例没有使用 `scopes`,但开发者也可以根据需要使用该属性。
    
    现在,即可使用表单字段 `username`,从(伪)数据库中获取用户数据。
    
    如果不存在指定用户,则返回错误消息,提示**用户名或密码错误**。
    
    本例使用 `HTTPException` 异常显示此错误:
    
    ```Python hl_lines="3  77-79"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/security/simple-oauth2.md

        ✋️ ⚫️ ⚠ ⚙️ 💼, ⚫️ 🚚 **FastAPI** 🔗, ⚒ ⚫️ ⏩.
    
    ### ⚙️ 📨 💽
    
    !!! tip
        👐 🔗 🎓 `OAuth2PasswordRequestForm` 🏆 🚫 ✔️ 🔢 `scope` ⏮️ 📏 🎻 👽 🚀, ↩️, ⚫️ 🔜 ✔️ `scopes` 🔢 ⏮️ ☑ 📇 🎻 🔠 ↔ 📨.
    
        👥 🚫 ⚙️ `scopes` 👉 🖼, ✋️ 🛠️ 📤 🚥 👆 💪 ⚫️.
    
    🔜, 🤚 👩‍💻 📊 ⚪️➡️ (❌) 💽, ⚙️ `username` ⚪️➡️ 📨 🏑.
    
    🚥 📤 🙅‍♂ ✅ 👩‍💻, 👥 📨 ❌ 💬 "❌ 🆔 ⚖️ 🔐".
    
    ❌, 👥 ⚙️ ⚠ `HTTPException`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  6. docs/en/docs/reference/dependencies.md

    ```
    
    ::: fastapi.Depends
    
    ## `Security()`
    
    For many scenarios, you can handle security (authorization, authentication, etc.) with dependencies, using `Depends()`.
    
    But when you want to also declare OAuth2 scopes, you can use `Security()` instead of `Depends()`.
    
    You can import `Security()` directly from `fastapi`:
    
    ```python
    from fastapi import Security
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 671 bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/extra-models.md

        'full_name': None,
    }
    ```
    
    #### Desembrulhando um `dict`
    
    Se tomarmos um `dict` como `user_dict` e passarmos para uma função (ou classe) com `**user_dict`, o Python irá "desembrulhá-lo". Ele passará as chaves e valores do `user_dict` diretamente como argumentos chave-valor.
    
    Então, continuando com o `user_dict` acima, escrevendo:
    
    ```Python
    UserInDB(**user_dict)
    ```
    
    Resultaria em algo equivalente a:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/schema-extra-example.md

    ### `Body` com vários `examples`
    
    Alternativamente ao único `example`, você pode passar `examples` usando um `dict` com **vários examples**, cada um com informações extras que serão adicionadas no **OpenAPI** também.
    
    As chaves do `dict` identificam cada exemplo, e cada valor é outro `dict`.
    
    Cada `dict` de exemplo específico em `examples` pode conter:
    
    * `summary`: Pequena descrição do exemplo.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/security/oauth2-jwt.md

    <img src="/img/tutorial/security/image10.png">
    
    !!! note
        👀 🎚 `Authorization`, ⏮️ 💲 👈 ▶️ ⏮️ `Bearer `.
    
    ## 🏧 ⚙️ ⏮️ `scopes`
    
    Oauth2️⃣ ✔️ 🔑 "↔".
    
    👆 💪 ⚙️ 👫 🚮 🎯 ⚒ ✔ 🥙 🤝.
    
    ⤴️ 👆 💪 🤝 👉 🤝 👩‍💻 🔗 ⚖️ 🥉 🥳, 🔗 ⏮️ 👆 🛠️ ⏮️ ⚒ 🚫.
    
    👆 💪 💡 ❔ ⚙️ 👫 &amp; ❔ 👫 🛠️ 🔘 **FastAPI** ⏪ **🏧 👩‍💻 🦮**.
    
    ## 🌃
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  10. docs/de/docs/reference/security/index.md

    # Sicherheitstools
    
    Wenn Sie Abhängigkeiten mit OAuth2-Scopes deklarieren müssen, verwenden Sie `Security()`.
    
    Aber Sie müssen immer noch definieren, was das <abbr title="Das von dem abhängt, die zu verwendende Abhängigkeit">Dependable</abbr>, das Callable ist, welches Sie als Parameter an `Depends()` oder `Security()` übergeben.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:15:05 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top