Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for png (0.13 sec)

  1. tests/test_tutorial/test_additional_responses/test_tutorial002.py

    
    def test_path_operation_img():
        shutil.copy("./docs/en/docs/img/favicon.png", "./image.png")
        response = client.get("/items/foo?img=1")
        assert response.status_code == 200, response.text
        assert response.headers["Content-Type"] == "image/png"
        assert len(response.content)
        os.remove("./image.png")
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  2. docs_src/additional_responses/tutorial002.py

        response_model=Item,
        responses={
            200: {
                "content": {"image/png": {}},
                "description": "Return the JSON item or an image.",
            }
        },
    )
    async def read_item(item_id: str, img: Union[bool, None] = None):
        if img:
            return FileResponse("image.png", media_type="image/png")
        else:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 628 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_additional_responses/test_tutorial004.py

    
    def test_path_operation_img():
        shutil.copy("./docs/en/docs/img/favicon.png", "./image.png")
        response = client.get("/items/foo?img=1")
        assert response.status_code == 200, response.text
        assert response.headers["Content-Type"] == "image/png"
        assert len(response.content)
        os.remove("./image.png")
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  4. docs_src/extending_openapi/tutorial001.py

            description="Here's a longer description of the custom **OpenAPI** schema",
            routes=app.routes,
        )
        openapi_schema["info"]["x-logo"] = {
            "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png"
        }
        app.openapi_schema = openapi_schema
        return app.openapi_schema
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 737 bytes
    - Viewed (0)
  5. scripts/playwright/separate_openapi_schemas/image05.py

        page.get_by_role("button", name="Item", exact=True).click()
        page.set_viewport_size({"width": 960, "height": 700})
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image05.png"
        )
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial002:app"]
    )
    try:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 829 bytes
    - Viewed (0)
  6. tests/test_local_docs.py

        assert swagger_favicon_url in body_content
    
    
    def test_strings_in_custom_swagger():
        swagger_js_url = "swagger_fake_file.js"
        swagger_css_url = "swagger_fake_file.css"
        swagger_favicon_url = "swagger_fake_file.png"
        html = get_swagger_ui_html(
            openapi_url="/docs",
            title="title",
            swagger_js_url=swagger_js_url,
            swagger_css_url=swagger_css_url,
            swagger_favicon_url=swagger_favicon_url,
        )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 2.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extending_openapi/test_tutorial001.py

                "description": "Here's a longer description of the custom **OpenAPI** schema",
                "version": "2.5.0",
                "x-logo": {
                    "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png"
                },
            },
            "paths": {
                "/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  8. scripts/playwright/separate_openapi_schemas/image03.py

        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()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
    )
    try:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 892 bytes
    - Viewed (0)
  9. scripts/playwright/separate_openapi_schemas/image04.py

        page.get_by_role("button", name="Item-Output").click()
        page.set_viewport_size({"width": 960, "height": 820})
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image04.png"
        )
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
    )
    try:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 881 bytes
    - Viewed (0)
  10. fastapi/openapi/docs.py

            str,
            Doc(
                """
                The URL of the favicon to use. It is normally shown in the browser tab.
                """
            ),
        ] = "https://fastapi.tiangolo.com/img/favicon.png",
        oauth2_redirect_url: Annotated[
            Optional[str],
            Doc(
                """
                The OAuth2 redirect URL, it is normally automatically handled by FastAPI.
                """
            ),
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
Back to top