Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for Ehat (0.19 sec)

  1. docs_src/websockets/tutorial003_py39.py

    from fastapi import FastAPI, WebSocket, WebSocketDisconnect
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    html = """
    <!DOCTYPE html>
    <html>
        <head>
            <title>Chat</title>
        </head>
        <body>
            <h1>WebSocket Chat</h1>
            <h2>Your ID: <span id="ws-id"></span></h2>
            <form action="" onsubmit="sendMessage(event)">
                <input type="text" id="messageText" autocomplete="off"/>
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. docs_src/query_params/tutorial003.py

        item = {"item_id": item_id}
        if q:
            item.update({"q": q})
        if not short:
            item.update(
                {"description": "This is an amazing item that has a long description"}
            )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 406 bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial008_an_py310.py

    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None,
            Query(
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
            ),
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 498 bytes
    - Viewed (0)
  4. docs_src/query_params/tutorial004_py310.py

    ):
        item = {"item_id": item_id, "owner_id": user_id}
        if q:
            item.update({"q": q})
        if not short:
            item.update(
                {"description": "This is an amazing item that has a long description"}
            )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 436 bytes
    - Viewed (0)
  5. docs_src/openapi_webhooks/tutorial001.py

    
    @app.webhooks.post("new-subscription")
    def new_subscription(body: Subscription):
        """
        When a new user subscribes to your service we'll send you a POST request with this
        data to the URL that you register for the event `new-subscription` in the dashboard.
        """
    
    
    @app.get("/users/")
    def read_users():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 550 bytes
    - Viewed (0)
  6. docs_src/query_params_str_validations/tutorial010_an_py39.py

    async def read_items(
        q: Annotated[
            Union[str, None],
            Query(
                alias="item-query",
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
                max_length=50,
                pattern="^fixedquery$",
                deprecated=True,
            ),
        ] = None,
    ):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 635 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 9K bytes
    - Viewed (0)
  8. fastapi/security/oauth2.py

            return data
        ```
    
        Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
        You could have custom internal logic to separate it by colon caracters (`:`) or
        similar, and get the two parts `items` and `read`. Many applications do that to
        group and organize permissions, you could do it as well in your application, just
        know that that it is application specific, it's not part of the specification.
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  9. tests/test_compat.py

    
    @needs_pydanticv1
    def test_union_scalar_list():
        # For coverage
        # TODO: there might not be a current valid code path that uses this, it would
        # potentially enable query parameters defined as both a scalar and a list
        # but that would require more refactors, also not sure it's really useful
        from fastapi._compat import is_pv1_scalar_field
    
        field_info = FieldInfo()
        field = ModelField(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  10. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

    Example: squash_testlogs.py /tf/pkg/testlogs /tf/pkg/merged.xml
    
    Recursively find all the JUnit test.xml files in one directory, and merge any
    of them that contain failures into one file. The TensorFlow DevInfra team
    uses this to generate a simple overview of an entire pip and nonpip test
    invocation, since the normal logs that Bazel creates are too large for the
    internal invocation viewer.
    """
    import collections
    import os
    import re
    import subprocess
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top