- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 2,056 for App (0.03 sec)
-
docs_src/schema_extra_example/tutorial003_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: int, item: Annotated[ Item, Body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 721 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial005 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1K bytes - Viewed (0) -
tests/test_starlette_exception.py
) return {"item": items[item_id]} @app.get("/http-no-body-statuscode-exception") async def no_body_status_code_exception(): raise HTTPException(status_code=204) @app.get("/http-no-body-statuscode-with-detail-exception") async def no_body_status_code_with_detail_exception(): raise HTTPException(status_code=204, detail="I should just disappear!") @app.get("/starlette-items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/profile/ProfileAction.java
* @author shinsuke */ 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.codelibs.fess.mylasta.action.FessUserBean;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 3.7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/labeltype/ApiAdminLabeltypeAction.java
import org.codelibs.fess.Constants; import org.codelibs.fess.app.pager.LabelTypePager; import org.codelibs.fess.app.service.LabelTypeService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.api.ApiResult; import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiResponse; import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 6.8K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py
from docs_src.cookie_params.tutorial001_an_py310 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(): from docs_src.cookie_params.tutorial001_an_py310 import app client = TestClient(app) response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
database.db.close() @app.post("/users/", response_model=schemas.User, dependencies=[Depends(get_db)]) def create_user(user: schemas.UserCreate): db_user = crud.get_user_by_email(email=user.email) if db_user: raise HTTPException(status_code=400, detail="Email already registered") return crud.create_user(user=user)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 2.2K bytes - Viewed (0) -
docs_src/handling_errors/tutorial003.py
def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418, content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."}, ) @app.get("/unicorns/{name}") async def read_unicorn(name: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 626 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java
*/ package org.codelibs.fess.app.web.api.admin.backup; import static org.codelibs.core.stream.StreamUtil.stream; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.NDJSON_EXTENTION; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getBackupItems; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getClickLogNdjsonWriteCall;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 12 01:54:15 UTC 2024 - 6.1K bytes - Viewed (0) -
docs_src/body_fields/tutorial001.py
from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 561 bytes - Viewed (0)