Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 97 for dependsOn (0.61 sec)

  1. docs/ko/docs/tutorial/dependencies/index.md

        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    비록 `Body`, `Query` 등을 사용하는 것과 같은 방식으로 여러분의 함수의 매개변수에 있는 `Depends`를 사용하지만, `Depends`는 약간 다르게 작동합니다.
    
    `Depends`에 단일 매개변수만 전달했습니다.
    
    이 매개변수는 함수같은 것이어야 합니다.
    
    여러분은 직접 **호출하지 않았습니다** (끝에 괄호를 치지 않았습니다), 단지 `Depends()`에 매개변수로 넘겨 줬을 뿐입니다.
    
    그리고 그 함수는 *경로 작동 함수*가 작동하는 것과 같은 방식으로 매개변수를 받습니다.
    
    !!! tip "팁"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/security/oauth2-scopes.md

        ```
    
    !!! info "Technical Details"
        `Security` is actually a subclass of `Depends`, and it has just one extra parameter that we'll see later.
    
        But by using `Security` instead of `Depends`, **FastAPI** will know that it can declare security scopes, use them internally, and document the API with OpenAPI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  3. tests/test_security_oauth2_optional_description.py

            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
        return form_data
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        return current_user
    
    
    client = TestClient(app)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Comparators.java

      }
    
      /**
       * Returns the minimum of the two values. If the values compare as 0, the first is returned.
       *
       * <p>The recommended solution for finding the {@code minimum} of some values depends on the type
       * of your data and the number of elements you have. Read more in the Guava User Guide article on
       * <a href="https://github.com/google/guava/wiki/CollectionUtilitiesExplained#comparators">{@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. fastapi/security/oauth2.py

        ## Example
    
        ```python
        from typing import Annotated
    
        from fastapi import Depends, FastAPI
        from fastapi.security import OAuth2PasswordRequestForm
    
        app = FastAPI()
    
    
        @app.post("/login")
        def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]):
            data = {}
            data["scopes"] = []
            for scope in form_data.scopes:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  6. docs/de/docs/advanced/security/oauth2-scopes.md

        `Security` ist tatsächlich eine Unterklasse von `Depends` und hat nur noch einen zusätzlichen Parameter, den wir später kennenlernen werden.
    
        Durch die Verwendung von `Security` anstelle von `Depends` weiß **FastAPI** jedoch, dass es Sicherheits-Scopes deklarieren, intern verwenden und die API mit OpenAPI dokumentieren kann.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:08 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  7. tests/test_security_oauth2.py

    
    @app.post("/login")
    # Here we use string annotations to test them
    def login(form_data: "OAuth2PasswordRequestFormStrict" = Depends()):
        return form_data
    
    
    @app.get("/users/me")
    # Here we use string annotations to test them
    def read_current_user(current_user: "User" = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/security/first-steps.md

    Es könnte wie folgt aufgerufen werden:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    Es kann also mit `Depends` verwendet werden.
    
    ### Verwendung
    
    Jetzt können Sie dieses `oauth2_scheme` als Abhängigkeit `Depends` übergeben.
    
    === "Python 3.9+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/security/tutorial001_an_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:08 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/security/first-steps.md

    Ее можно вызвать следующим образом:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    Поэтому ее можно использовать вместе с `Depends`.
    
    ### Использование
    
    Теперь вы можете передать ваш `oauth2_scheme` в зависимость с помощью `Depends`.
    
    === "Python 3.9+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/security/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  10. cmd/s3-zip-handlers.go

    			// As per "Permission" section in
    			// https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html
    			// If the object you request does not exist,
    			// the error Amazon S3 returns depends on
    			// whether you also have the s3:ListBucket
    			// permission.
    			// * If you have the s3:ListBucket permission
    			//   on the bucket, Amazon S3 will return an
    			//   HTTP status code 404 ("no such key")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 09 10:41:25 GMT 2024
    - 15.8K bytes
    - Viewed (0)
Back to top