Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Page (0.36 sec)

  1. scripts/playwright/separate_openapi_schemas/image02.py

        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("GET/items/Read Items").click()
        page.get_by_role("button", name="Try it out").click()
        page.get_by_role("button", name="Execute").click()
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png"
        )
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 873 bytes
    - Viewed (0)
  2. scripts/playwright/separate_openapi_schemas/image03.py

        context = browser.new_context(viewport={"width": 960, "height": 1080})
        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"
        )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 892 bytes
    - Viewed (0)
  3. tests/test_router_redirect_slashes.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    
    def test_redirect_slashes_enabled():
        app = FastAPI()
        router = APIRouter()
    
        @router.get("/hello/")
        def hello_page() -> str:
            return "Hello, World!"
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/hello/", follow_redirects=False)
        assert response.status_code == 200
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 22 10:37:50 GMT 2023
    - 974 bytes
    - Viewed (0)
  4. scripts/playwright/separate_openapi_schemas/image01.py

        browser = playwright.chromium.launch(headless=False)
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("POST/items/Create Item").click()
        page.get_by_role("tab", name="Schema").first.click()
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image01.png"
        )
    
        # ---------------------
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 819 bytes
    - Viewed (0)
  5. scripts/playwright/separate_openapi_schemas/image04.py

        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_role("button", name="Item-Input").click()
        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"
        )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 881 bytes
    - Viewed (0)
  6. scripts/mkdocs_hooks.py

    
    def on_pre_page(page: Page, *, config: MkDocsConfig, files: Files) -> Page:
        return page
    
    
    def on_page_markdown(
        markdown: str, *, page: Page, config: MkDocsConfig, files: Files
    ) -> str:
        if isinstance(page.file, EnFile):
            for excluded_section in non_traslated_sections:
                if page.file.src_path.startswith(excluded_section):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  7. scripts/playwright/separate_openapi_schemas/image05.py

        browser = playwright.chromium.launch(headless=False)
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        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"
        )
    
        # ---------------------
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 829 bytes
    - Viewed (0)
  8. tests/test_union_inherited_body.py

    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class ExtendedItem(Item):
        age: int
    
    
    @app.post("/items/")
    def save_union_different_body(item: Union[ExtendedItem, Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_post_extended_item():
        response = client.post("/items/", json={"name": "Foo", "age": 5})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  9. docs_src/graphql/tutorial001.py

    import strawberry
    from fastapi import FastAPI
    from strawberry.asgi import GraphQL
    
    
    @strawberry.type
    class User:
        name: str
        age: int
    
    
    @strawberry.type
    class Query:
        @strawberry.field
        def user(self) -> User:
            return User(name="Patrick", age=100)
    
    
    schema = strawberry.Schema(query=Query)
    
    
    graphql_app = GraphQL(schema)
    
    app = FastAPI()
    app.add_route("/graphql", graphql_app)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 03 18:00:28 GMT 2021
    - 446 bytes
    - Viewed (0)
  10. tests/test_response_model_include_exclude.py

    from pydantic import BaseModel
    
    
    class Model1(BaseModel):
        foo: str
        bar: str
    
    
    class Model2(BaseModel):
        ref: Model1
        baz: str
    
    
    class Model3(BaseModel):
        name: str
        age: int
        ref2: Model2
    
    
    app = FastAPI()
    
    
    @app.get(
        "/simple_include",
        response_model=Model2,
        response_model_include={"baz": ..., "ref": {"foo"}},
    )
    def simple_include():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 4K bytes
    - Viewed (0)
Back to top