Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Fprintf (0.47 sec)

  1. docs/em/docs/tutorial/handling-errors.md

    ```Python hl_lines="2-5  15  21"
    {!../../../docs_src/handling_errors/tutorial006.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  2. docs_src/dependencies/tutorial008c_an.py

    from typing_extensions import Annotated
    
    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: Annotated[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
    - 710 bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    ๐Ÿ”˜, `open("./somefile.txt")` โœ ๐ŸŽš ๐Ÿ‘ˆ ๐Ÿค™ "๐Ÿ”‘ ๐Ÿ‘จโ€๐Ÿ’ผ".
    
    ๐Ÿ•โ” `with` ๐Ÿซ ๐Ÿ, โšซ๏ธ โš’ ๐Ÿ’ญ ๐Ÿ” ๐Ÿ“, ๐Ÿšฅ ๐Ÿ“ค โš .
    
    ๐Ÿ•โ” ๐Ÿ‘† โœ ๐Ÿ”— โฎ๏ธ `yield`, **FastAPI** ๐Ÿ”œ ๐Ÿ”˜ ๐Ÿ—œ โšซ๏ธ ๐Ÿ”‘ ๐Ÿ‘จโ€๐Ÿ’ผ, & ๐ŸŒ€ โšซ๏ธ โฎ๏ธ ๐ŸŽ ๐Ÿ”— ๐Ÿงฐ.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial008d.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again ๐Ÿ˜Ž")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 694 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008d_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again ๐Ÿ˜Ž")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 744 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial008d_an_py39.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again ๐Ÿ˜Ž")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 734 bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/extra-models.md

    and then we call:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    we now have a `dict` with the data in the variable `user_dict` (it's a `dict` instead of a Pydantic model object).
    
    And if we call:
    
    ```Python
    print(user_dict)
    ```
    
    we would get a Python `dict` with:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  8. 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)
  9. docs/pt/docs/tutorial/extra-models.md

    e depois chamarmos:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    agora temos um `dict` com os dados na variรกvel `user_dict` (รฉ um `dict` em vez de um objeto de modelo Pydantic).
    
    E se chamarmos:
    
    ```Python
    print(user_dict)
    ```
    
    terรญamos um `dict` Python com:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    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)
  10. docs/em/docs/tutorial/extra-models.md

    ```
    
    & โคด๏ธ ๐Ÿ‘ฅ ๐Ÿค™:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    ๐Ÿ‘ฅ ๐Ÿ”œ โœ”๏ธ `dict` โฎ๏ธ ๐Ÿ’ฝ ๐Ÿ”ข `user_dict` (โšซ๏ธ `dict` โ†ฉ๏ธ Pydantic ๐Ÿท ๐ŸŽš).
    
    & ๐Ÿšฅ ๐Ÿ‘ฅ ๐Ÿค™:
    
    ```Python
    print(user_dict)
    ```
    
    ๐Ÿ‘ฅ ๐Ÿ”œ ๐Ÿคš ๐Ÿ `dict` โฎ๏ธ:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### ๐ŸŽ `dict`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
Back to top