Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for html (0.22 sec)

  1. tests/test_tutorial/test_websockets/test_tutorial001.py

    from docs_src.websockets.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    def test_websocket():
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/ws") as websocket:
                message = "Message one"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 09:08:19 GMT 2020
    - 822 bytes
    - Viewed (0)
  2. fastapi/applications.py

    )
    from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError
    from fastapi.logger import logger
    from fastapi.openapi.docs import (
        get_redoc_html,
        get_swagger_ui_html,
        get_swagger_ui_oauth2_redirect_html,
    )
    from fastapi.openapi.utils import get_openapi
    from fastapi.params import Depends
    from fastapi.types import DecoratedCallable, IncEx
    from fastapi.utils import generate_unique_id
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  3. docs_src/templates/tutorial001.py

    templates = Jinja2Templates(directory="templates")
    
    
    @app.get("/items/{id}", response_class=HTMLResponse)
    async def read_item(request: Request, id: str):
        return templates.TemplateResponse(
            request=request, name="item.html", context={"id": id}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 26 20:12:34 GMT 2023
    - 521 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_metadata/test_tutorial001.py

                    "email": "******@****.***",
                },
                "license": {
                    "name": "Apache 2.0",
                    "url": "https://www.apache.org/licenses/LICENSE-2.0.html",
                },
                "version": "0.0.1",
            },
            "paths": {
                "/items/": {
                    "get": {
                        "summary": "Read Items",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  5. fastapi/exceptions.py

            code: Annotated[
                int,
                Doc(
                    """
                    A closing code from the
                    [valid codes defined in the specification](https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1).
                    """
                ),
            ],
            reason: Annotated[
                Union[str, None],
                Doc(
                    """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  6. scripts/mkdocs_hooks.py

        material_path = Path(material.__file__).parent
        material_langs_path = material_path / "templates" / "partials" / "languages"
        langs = [file.stem for file in material_langs_path.glob("*.html")]
        return langs
    
    
    class EnFile(File):
        pass
    
    
    def on_config(config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
        available_langs = get_mkdocs_material_langs()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

        return app
    
    
    @needs_py39
    def test_main(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    @needs_py39
    def test_websocket_with_cookie(app: FastAPI):
        client = TestClient(app, cookies={"session": "fakesession"})
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        return app
    
    
    @needs_py310
    def test_main(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    @needs_py310
    def test_websocket_with_cookie(app: FastAPI):
        client = TestClient(app, cookies={"session": "fakesession"})
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  9. fastapi/routing.py

                Type[Response],
                Doc(
                    """
                    The default response class to be used.
    
                    Read more in the
                    [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class).
                    """
                ),
            ] = Default(JSONResponse),
            responses: Annotated[
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  10. tests/test_application.py

        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    
    def test_redoc():
        response = client.get("/redoc")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "redoc@next" in response.text
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
Back to top