- Sort Score
- Result 10 results
- Languages All
Results 491 - 500 of 1,074 for Str (0.01 sec)
-
docs_src/bigger_applications/app/dependencies.py
from fastapi import Header, HTTPException async def get_token_header(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 369 bytes - Viewed (0) -
tests/test_webhooks_security.py
app = FastAPI() bearer_scheme = HTTPBearer() class Subscription(BaseModel): username: str monthly_fee: float start_date: datetime @app.webhooks.post("new-subscription") def new_subscription( body: Subscription, token: Annotated[str, Security(bearer_scheme)] ): """ When a new user subscribes to your service we'll send you a POST request with this
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 20 09:00:44 UTC 2023 - 4.6K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial005_py310.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item = Body(embed=True)): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 369 bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableListMultimap.java
* * <pre>{@code * static final Multimap<Character, String> FIRST_LETTER_MULTIMAP = * Stream.of("banana", "apple", "carrot", "asparagus", "cherry") * .collect(toImmutableListMultimap(str -> str.charAt(0), str -> str.substring(1))); * * // is equivalent to * * static final Multimap<Character, String> FIRST_LETTER_MULTIMAP = * new ImmutableListMultimap.Builder<Character, String>()
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 19.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 19:43:49 UTC 2024 - 17.9K bytes - Viewed (0) -
schema/relationship.go
return } func (rel *Relationship) ParseConstraint() *Constraint { str := rel.Field.TagSettings["CONSTRAINT"] if str == "-" { return nil } if rel.Type == BelongsTo { for _, r := range rel.FieldSchema.Relationships.Relations {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
docs_src/bigger_applications/app_an/dependencies.py
from fastapi import Header, HTTPException from typing_extensions import Annotated async def get_token_header(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 419 bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/dependencies.py
from typing import Annotated from fastapi import Header, HTTPException async def get_token_header(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 409 bytes - Viewed (0) -
docs_src/query_params/tutorial003_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: 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: Fri Jan 07 14:11:31 UTC 2022 - 374 bytes - Viewed (0) -
docs_src/background_tasks/tutorial001.py
from fastapi import BackgroundTasks, FastAPI app = FastAPI() def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 519 bytes - Viewed (0)