- Sort Score
- Result 10 results
- Languages All
Results 381 - 390 of 1,074 for Str (0.03 sec)
-
docs_src/body_multiple_params/tutorial003_an.py
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 class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 604 bytes - Viewed (0) -
docs_src/security/tutorial002_py310.py
class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" ) async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 711 bytes - Viewed (0) -
docs_src/security/tutorial002_an_py310.py
class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" ) async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): user = fake_decode_token(token)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 761 bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java
@Override public List<Character> create(Character[] elements) { char[] chars = Chars.toArray(asList(elements)); StringBuilder str = new StringBuilder(); str.append(chars); return charactersOf(str); } } private abstract static class TestUnhashableListGenerator extends TestUnhashableCollectionGenerator<List<UnhashableObject>>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5K bytes - Viewed (0) -
docs_src/dependencies/tutorial006.py
from fastapi import Depends, FastAPI, Header, HTTPException app = FastAPI() async def verify_token(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: str = Header()): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 583 bytes - Viewed (0) -
docs_src/handling_errors/tutorial003.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): 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,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 626 bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java
String propertyValue = properties.getProperty(REMAINING_PROJECTS); Stream.of(propertyValue.split(PROPERTY_DELIMITER)) .filter(str -> str != null && !str.isEmpty()) .forEach(request.getProjectActivation()::activateOptionalProject); LOGGER.info("Resuming from {} due to the --resume / -r feature.", propertyValue); } }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.9K bytes - Viewed (0) -
docs_src/security/tutorial002.py
class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" ) async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 755 bytes - Viewed (0) -
tests/test_security_openid_connect.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect(openIdConnectUrl="/openid") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(oid)): user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/test_security_openid_connect_description.py
from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect( openIdConnectUrl="/openid", description="OpenIdConnect security scheme" ) class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(oid)): user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0)