- Sort Score
- Result 10 results
- Languages All
Results 2131 - 2140 of 3,843 for getT (0.02 sec)
-
docs_src/templates/tutorial001.py
from fastapi.templating import Jinja2Templates app = FastAPI() app.mount("/static", StaticFiles(directory="static"), name="static") templates = Jinja2Templates(directory="templates") @app.get("/items/{id}", response_class=HTMLResponse) async def read_item(request: Request, id: str): return templates.TemplateResponse( request=request, name="item.html", context={"id": id}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:12:34 UTC 2023 - 521 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 466 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002.py
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 - 497 bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
assertThat(reader.readLine()).isEqualTo("This is the new location!") val first = server.takeRequest() assertThat(first.requestLine).isEqualTo("GET / HTTP/1.1") val redirect = server.takeRequest() assertThat(redirect.requestLine).isEqualTo("GET /new-path HTTP/1.1") } /** * Test that MockWebServer blocks for a call to enqueue() if a request is made before a mock * response is ready. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
docs_src/dataclasses/tutorial003.py
@app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: List[Item]): # (5) return {"name": author_id, "items": items} # (6) @app.get("/authors/", response_model=List[Author]) # (7) def get_authors(): # (8) return [ # (9) { "name": "Breaters", "items": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Jul 31 14:09:15 UTC 2024 - 1.4K bytes - Viewed (0) -
tests/connection_test.go
} return nil }) if err != nil { t.Errorf(fmt.Sprintf("WithSingleConnection should work, but got err %v", err)) } if actualName != expectedName { t.Errorf("WithSingleConnection() method should get correct value, expect: %v, got %v", expectedName, actualName) } } func getSetSQL(driverName string) (string, string) { switch driverName { case mysql.Dialector{}.Name():
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 28 14:16:42 UTC 2022 - 963 bytes - Viewed (0) -
cni/pkg/scopes/scopes.go
// limitations under the License. package scopes import ( "istio.io/istio/cni/pkg/constants" "istio.io/istio/pkg/log" ) // Required to get global logging to work var ( CNIAgent = log.RegisterScope(constants.CNIAgentLogScope, "CNI agent scope") CNIPlugin = log.RegisterScope(constants.CNIPluginLogScope, "CNI plugin scope")
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri May 31 21:45:18 UTC 2024 - 894 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial002.py
name: str description: Union[str, None] = None app = FastAPI(separate_input_output_schemas=False) @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> List[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse", ), Item(name="Plumbus"),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 524 bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an.py
def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query( query_or_default: Annotated[str, Depends(query_or_cookie_extractor)], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 558 bytes - Viewed (0) -
docs_src/query_params/tutorial004.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 468 bytes - Viewed (0)