Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 96 for try (0.22 sec)

  1. docs/en/docs/advanced/security/http-basic-auth.md

    And then they can try again knowing that it's probably something more similar to `stanleyjobsox` than to `johndoe`.
    
    #### A "professional" attack
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  2. docs/en/docs/deployment/cloud.md

    And it shows their true commitment to FastAPI and its **community** (you), as they not only want to provide you a **good service** but also want to make sure you have a **good and healthy framework**, FastAPI. 🙇
    
    You might want to try their services and follow their guides:
    
    * <a href="https://docs.platform.sh/languages/python.html?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023" class="external-link" target="_blank">Platform.sh</a>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Jan 31 22:13:52 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  3. docs/en/docs/release-notes.md

    In short, if you had dependencies that looked like:
    
    ```Python
    def my_dep():
        try:
            yield
        except SomeException:
            pass
    ```
    
    Now you need to make sure you raise again after `except`, just as you would in regular Python:
    
    ```Python
    def my_dep():
        try:
            yield
        except SomeException:
            raise
    ```
    
    ### Docs
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  4. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python hl_lines="5 6"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    !!! tip "豆矄識"
        `async`ă‚„é€šćžžăźé–ąæ•°ă‚’äœżç”šă™ă‚‹ă“ăšăŒă§ăăŸă™ă€‚
    
        **FastAPI** ăŻă€é€šćžžăźäŸć­˜é–ąäż‚ăšćŒă˜ă‚ˆă†ă«ă€ăă‚Œăžă‚Œă§æ­Łă—ă„ă“ăšă‚’èĄŒă„ăŸă™ă€‚
    
    ## `yield`ず`try`ă‚’æŒă€äŸć­˜é–ąäż‚
    
    `yield`ă‚’æŒă€äŸć­˜é–ąäż‚ă§`try`ăƒ–ăƒ­ăƒƒă‚Żă‚’äœżç”šă—ăŸć Žćˆă€ăăźäŸć­˜é–ąäż‚ă‚’äœżç”šă—ăŸéš›ă«ç™șç”Ÿă—ăŸäŸ‹ć€–ă‚’ć—ă‘ć–ă‚‹ă“ăšă«ăȘă‚ŠăŸă™ă€‚
    
    äŸ‹ăˆă°ă€é€”äž­ăźă©ă“ă‹ăźæ™‚ç‚čă§ă€ćˆ„ăźäŸć­˜é–ąäż‚ă‚„*path operation*ăźäž­ă§ă€ăƒ‡ăƒŒă‚żăƒ™ăƒŒă‚čăƒˆăƒ©ăƒłă‚¶ă‚Żă‚·ăƒ§ăƒłă‚’ă€Œăƒ­ăƒŒăƒ«ăƒăƒƒă‚Żă€ă—ăŸă‚Šă€ăăźä»–ăźă‚šăƒ©ăƒŒă‚’äœœæˆă—ăŸă‚Šă™ă‚‹ă‚łăƒŒăƒ‰ăŒă‚ăŁăŸć Žćˆă€äŸć­˜é–ąäż‚ăźäž­ă§äŸ‹ć€–ă‚’ć—ă‘ć–ă‚‹ă“ăšă«ăȘă‚ŠăŸă™ă€‚
    
    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)
  5. docs_src/dependencies/tutorial008c.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney đŸ˜±")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 660 bytes
    - Viewed (0)
  6. fastapi/concurrency.py

        # to avoid this we let __exit__ run without a capacity limit
        # since we're creating a new limiter for each call, any non-zero limit
        # works (1 is arbitrary)
        exit_limiter = CapacityLimiter(1)
        try:
            yield await run_in_threadpool(cm.__enter__)
        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, None, limiter=exit_limiter
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/security/simple-oauth2.md

    If you click the lock icon and logout, and then try the same operation again, you will get an HTTP 401 error of:
    
    ```JSON
    {
      "detail": "Not authenticated"
    }
    ```
    
    ### Inactive user
    
    Now try with an inactive user, authenticate with:
    
    User: `alice`
    
    Password: `secret2`
    
    And try to use the operation `GET` with the path `/users/me`.
    
    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)
  8. docs_src/security/tutorial005_py310.py

        credentials_exception = HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Could not validate credentials",
            headers={"WWW-Authenticate": authenticate_value},
        )
        try:
            payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
            username: str = payload.get("sub")
            if username is None:
                raise credentials_exception
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005_an_py310.py

        credentials_exception = HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Could not validate credentials",
            headers={"WWW-Authenticate": authenticate_value},
        )
        try:
            payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
            username: str = payload.get("sub")
            if username is None:
                raise credentials_exception
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/index.md

    You might want to try their courses:
    
    * <a href="https://training.talkpython.fm/fastapi-courses" class="external-link" target="_blank">Talk Python Training</a>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top