Search Options

Results per page
Sort
Preferred Languages
Advance

Results 711 - 720 of 1,174 for async (0.06 sec)

  1. tests/test_security_oauth2_authorization_code_bearer.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize", tokenUrl="token", auto_error=True
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/first-steps.md

    ```
    
    ๐Ÿ‘‰ ๐Ÿ ๐Ÿ”ข.
    
    โšซ๏ธ ๐Ÿ”œ ๐Ÿค™ **FastAPI** ๐Ÿ•โ” โšซ๏ธ ๐Ÿ“จ ๐Ÿ“จ ๐Ÿ“› "`/`" โš™๏ธ `GET` ๐Ÿ› ๏ธ.
    
    ๐Ÿ‘‰ ๐Ÿ’ผ, โšซ๏ธ `async` ๐Ÿ”ข.
    
    ---
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”ฌ โšซ๏ธ ๐Ÿ˜ ๐Ÿ”ข โ†ฉ๏ธ `async def`:
    
    ```Python hl_lines="7"
    {!../../docs_src/first_steps/tutorial003.py!}
    ```
    
    /// note
    
    ๐Ÿšฅ ๐Ÿ‘† ๐Ÿšซ ๐Ÿ’ญ ๐Ÿ”บ, โœ… [๐Ÿ”: *"๐Ÿƒ โ“"*](../async.md#_2){.internal-link target=_blank}.
    
    ///
    
    ### ๐Ÿ” 5๏ธโƒฃ: ๐Ÿ“จ ๐ŸŽš
    
    ```Python hl_lines="8"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. tests/test_security_oauth2_authorization_code_bearer_description.py

    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_password_bearer_optional.py

    from fastapi.security import OAuth2PasswordBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False)
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/InetAddressOrder.kt

    import java.net.Inet6Address
    import java.net.InetAddress
    import okhttp3.internal.interleave
    
    /**
     * Implementation of HappyEyeballs Sorting Addresses.
     *
     * The current implementation does not address any of:
     *  - Async DNS split by IP class
     *  - Stateful handling of connectivity results
     *  - The prioritisation of addresses
     *
     * https://datatracker.ietf.org/doc/html/rfc8305#section-4
     */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python hl_lines="4"
    {!../../docs_src/dependencies/tutorial007.py!}
    ```
    
    ๐Ÿ“Ÿ ๐Ÿ“„ `yield` ๐Ÿ“„ ๐Ÿ› ๏ธ โฎ๏ธ ๐Ÿ“จ โœ”๏ธ ๐Ÿšš:
    
    ```Python hl_lines="5-6"
    {!../../docs_src/dependencies/tutorial007.py!}
    ```
    
    /// tip
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `async` โš–๏ธ ๐Ÿ˜ ๐Ÿ”ข.
    
    **FastAPI** ๐Ÿ”œ โ–ถ๏ธ๏ธ ๐Ÿ‘œ โฎ๏ธ ๐Ÿ” , ๐ŸŽ โฎ๏ธ ๐Ÿ˜ ๐Ÿ”—.
    
    ///
    
    ## ๐Ÿ”— โฎ๏ธ `yield` & `try`
    
    ๐Ÿšฅ ๐Ÿ‘† โš™๏ธ `try` ๐Ÿซ ๐Ÿ”— โฎ๏ธ `yield`, ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ“จ ๐Ÿ™† โš  ๐Ÿ‘ˆ ๐Ÿšฎ ๐Ÿ•โ” โš™๏ธ ๐Ÿ”—.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/first-steps.md

    ใ“ใ‚Œใฏใ€Pythonใฎ้–ขๆ•ฐใงใ™ใ€‚
    
    ใ“ใฎ้–ขๆ•ฐใฏใ€`GET`ใ‚ชใƒšใƒฌใƒผใ‚ทใƒงใƒณใ‚’ไฝฟใฃใŸURLใ€Œ`/`ใ€ใธใฎใƒชใ‚ฏใ‚จใ‚นใƒˆใ‚’ๅ—ใ‘ๅ–ใ‚‹ใŸใณใซ**FastAPI**ใซใ‚ˆใฃใฆๅ‘ผใณๅ‡บใ•ใ‚Œใพใ™ใ€‚
    
    ใ“ใฎๅ ดๅˆใ€ใ“ใฎ้–ขๆ•ฐใฏ`async`้–ขๆ•ฐใงใ™ใ€‚
    
    ---
    
    `async def`ใฎไปฃใ‚ใ‚Šใซ้€šๅธธใฎ้–ขๆ•ฐใจใ—ใฆๅฎš็พฉใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™:
    
    ```Python hl_lines="7"
    {!../../docs_src/first_steps/tutorial003.py!}
    ```
    
    /// note | "ๅ‚™่€ƒ"
    
    ้•ใ„ใŒๅˆ†ใ‹ใ‚‰ใชใ„ๅ ดๅˆใฏใ€[Async: *"ๆ€ฅใ„ใงใ„ใพใ™ใ‹๏ผŸ"*](../async.md#_1){.internal-link target=_blank}ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
    
    ///
    
    ### Step 5: ใ‚ณใƒณใƒ†ใƒณใƒ„ใฎ่ฟ”ไฟก
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/first-steps.md

    In this case, it is an `async` function.
    
    ---
    
    You could also define it as a normal function instead of `async def`:
    
    {* ../../docs_src/first_steps/tutorial003.py hl[7] *}
    
    /// note
    
    If you don't know the difference, check the [Async: *"In a hurry?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
    
    ///
    
    ### Step 5: return the content
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:48:16 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. fastapi/security/oauth2.py

                flows=cast(OAuthFlowsModel, flows), description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
            if not authorization:
                if self.auto_error:
                    raise HTTPException(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 23 18:30:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/web/base/login/FessLoginAssist.java

    import org.codelibs.fess.sso.SsoAuthenticator;
    import org.codelibs.fess.util.ComponentUtil;
    import org.dbflute.optional.OptionalEntity;
    import org.dbflute.optional.OptionalThing;
    import org.lastaflute.core.magic.async.AsyncManager;
    import org.lastaflute.core.time.TimeManager;
    import org.lastaflute.web.login.LoginHandlingResource;
    import org.lastaflute.web.login.PrimaryLoginManager;
    import org.lastaflute.web.login.TypicalLoginAssist;
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top