Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for Huston (0.33 sec)

  1. tests/test_custom_route_class.py

    Sebastián Ramírez <******@****.***> 1688149516 +0200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. pdm_build.py

        )
        # Get custom optional dependencies name to always include in this (non-slim) package
        include_optional_dependencies: List[str] = config.get(
            "include-optional-dependencies", []
        )
        # Override main [project] configs with custom configs for this package
        for key, value in project_config.items():
            metadata[key] = value
        # Get custom build config for the current package
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 30 06:38:13 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs_src/websockets/tutorial002_an_py310.py

                <label>Token: <input type="text" id="token" autocomplete="off" value="some-key-token"/></label>
                <button onclick="connect(event)">Connect</button>
                <hr>
                <label>Message: <input type="text" id="messageText" autocomplete="off"/></label>
                <button>Send</button>
            </form>
            <ul id='messages'>
            </ul>
            <script>
            var ws = null;
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. docs_src/custom_request_and_route/tutorial003.py

    from fastapi.routing import APIRoute
    
    
    class TimedRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
            async def custom_route_handler(request: Request) -> Response:
                before = time.time()
                response: Response = await original_route_handler(request)
                duration = time.time() - before
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1K bytes
    - Viewed (0)
  5. docs_src/websockets/tutorial003.py

            <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"/>
                <button>Send</button>
            </form>
            <ul id='messages'>
            </ul>
            <script>
                var client_id = Date.now()
                document.querySelector("#ws-id").textContent = client_id;
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:52:19 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  6. tests/test_additional_responses_custom_model_in_callback.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. docs_src/handling_errors/tutorial006.py

    )
    from fastapi.exceptions import RequestValidationError
    from starlette.exceptions import HTTPException as StarletteHTTPException
    
    app = FastAPI()
    
    
    @app.exception_handler(StarletteHTTPException)
    async def custom_http_exception_handler(request, exc):
        print(f"OMG! An HTTP error!: {repr(exc)}")
        return await http_exception_handler(request, exc)
    
    
    @app.exception_handler(RequestValidationError)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 11:10:33 GMT 2020
    - 928 bytes
    - Viewed (0)
  8. scripts/playwright/separate_openapi_schemas/image03.py

        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("GET/items/Read Items").click()
        page.get_by_role("tab", name="Schema").click()
        page.get_by_label("Schema").get_by_role("button", name="Expand all").click()
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image03.png"
        )
    
        # ---------------------
        context.close()
        browser.close()
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 892 bytes
    - Viewed (0)
  9. tests/test_request_body_parameters_media_type.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  10. fastapi/security/oauth2.py

                data["client_secret"] = form_data.client_secret
            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
    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)
Back to top