- Sort Score
- Result 10 results
- Languages All
Results 751 - 760 of 2,056 for app (0.02 sec)
-
tests/test_openapi_examples.py
from dirty_equals import IsDict from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 15:57:43 UTC 2024 - 17.7K bytes - Viewed (0) -
docs_src/body_updates/tutorial001.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.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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 906 bytes - Viewed (0) -
docs_src/body_updates/tutorial002_py310.py
} @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) update_data = item.dict(exclude_unset=True)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 1010 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_py310.py
from fastapi import FastAPI, Query from pydantic import BaseModel, Field app = FastAPI() class FilterParams(BaseModel): model_config = {"extra": "forbid"} limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: FilterParams = Query()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 462 bytes - Viewed (0) -
docs_src/query_params/tutorial003.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: Union[str, None] = None, short: bool = False): item = {"item_id": item_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 406 bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_tutorial001_pv1.py
from ...utils import needs_pydanticv1 @needs_pydanticv1 def test_settings(monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") from docs_src.settings.tutorial001_pv1 import app client = TestClient(app) response = client.get("/info") assert response.status_code == 200, response.text assert response.json() == { "app_name": "Awesome API", "admin_email": "******@****.***",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 556 bytes - Viewed (0) -
istioctl/pkg/kubeinject/testdata/deployment/hello-with-proxyconfig-anno.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: hello spec: replicas: 7 selector: matchLabels: app: hello tier: backend track: stable template: metadata: annotations: proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }' labels: app: hello tier: backend track: stable spec: containers: - name: hello
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Jun 15 15:02:17 UTC 2023 - 556 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/dict/protwords/AdminDictProtwordsAction.java
import org.codelibs.fess.annotation.Secured; import org.codelibs.fess.app.pager.ProtwordsPager; import org.codelibs.fess.app.service.ProtwordsService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.admin.dict.AdminDictAction; import org.codelibs.fess.app.web.base.FessAdminAction; import org.codelibs.fess.app.web.base.FessBaseAction; import org.codelibs.fess.dict.protwords.ProtwordsItem;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 17.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/fileconfig/AdminFileconfigAction.java
import org.codelibs.fess.Constants; import org.codelibs.fess.annotation.Secured; import org.codelibs.fess.app.pager.FileConfigPager; import org.codelibs.fess.app.service.FileConfigService; import org.codelibs.fess.app.service.LabelTypeService; import org.codelibs.fess.app.service.RoleTypeService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.base.FessAdminAction; import org.codelibs.fess.es.config.exentity.CrawlingConfig.ConfigType;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 17.1K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_an.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.request_files.tutorial002_an import app client = TestClient(app) def test_post_form_no_body(): response = client.post("/files/") assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ { "type": "missing",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.5K bytes - Viewed (0)