Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,926 for App (0.01 sec)

  1. docs_src/custom_request_and_route/tutorial003_py39.py

                return response
    
            return custom_route_handler
    
    
    app = FastAPI()
    router = APIRouter(route_class=TimedRoute)
    
    
    @app.get("/")
    async def not_timed():
        return {"message": "Not timed"}
    
    
    @router.get("/timed")
    async def timed():
        return {"message": "It's the time of my life"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1K bytes
    - Viewed (0)
  2. tests/test_custom_swagger_ui_redirect.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    swagger_ui_oauth2_redirect_url = "/docs/redirect"
    
    app = FastAPI(swagger_ui_oauth2_redirect_url=swagger_ui_oauth2_redirect_url)
    
    
    @app.get("/items/")
    async def read_items():
        return {"id": "foo"}
    
    
    client = TestClient(app)
    
    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  3. docs_src/custom_docs_ui/tutorial002_py39.py

    )
    from fastapi.staticfiles import StaticFiles
    
    app = FastAPI(docs_url=None, redoc_url=None)
    
    app.mount("/static", StaticFiles(directory="static"), name="static")
    
    
    @app.get("/docs", include_in_schema=False)
    async def custom_swagger_ui_html():
        return get_swagger_ui_html(
            openapi_url=app.openapi_url,
            title=app.title + " - Swagger UI",
            oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_serialize_response.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: Optional[float] = None
        owner_ids: Optional[list[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return {"name": "valid", "price": 1.0}
    
    
    @app.get("/items/coerce", response_model=Item)
    def get_coerce():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  5. docs/uk/docs/tutorial/debugging.md

    Отже, цей блок коду:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    буде виконаний.
    
    ---
    
    Це не станеться, якщо Ви імпортуєте цей модуль (файл).
    
    Якщо у Вас є інший файл, наприклад `importer.py`, з наступним кодом:
    
    ```Python
    from myapp import app
    
    # Додатковий код
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:24:45 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  6. tests/test_request_params/test_body/test_optional_str.py

    from fastapi import Body, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-str", operation_id="optional_str")
    async def read_optional_str(p: Annotated[Optional[str], Body(embed=True)] = None):
        return {"p": p}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  7. docs_src/body_updates/tutorial001_py310.py

    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.put("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        update_item_encoded = jsonable_encoder(item)
        items[item_id] = update_item_encoded
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 856 bytes
    - Viewed (0)
  8. tests/test_additional_responses_bad.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/a", responses={"hello": {"description": "Not a valid additional response"}})
    async def a():
        pass  # pragma: no cover
    
    
    openapi_schema = {
        "openapi": "3.1.0",
        "info": {"title": "FastAPI", "version": "0.1.0"},
        "paths": {
            "/a": {
                "get": {
                    "responses": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  9. docs_src/body_updates/tutorial002_py39.py

        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/web/profile/ProfileAction.java

     */
    /**
     */
    package org.codelibs.fess.app.web.profile;
    
    import org.apache.logging.log4j.LogManager;
    import org.apache.logging.log4j.Logger;
    import org.codelibs.fess.app.service.UserService;
    import org.codelibs.fess.app.web.base.FessSearchAction;
    import org.codelibs.fess.app.web.base.login.LocalUserCredential;
    import org.codelibs.fess.app.web.login.LoginAction;
    import org.lastaflute.web.Execute;
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Nov 27 07:01:25 UTC 2025
    - 4.5K bytes
    - Viewed (0)
Back to top