- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,153 for optional (0.2 sec)
-
tests/test_security_api_key_cookie_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_api_key_query_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2PasswordBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2PasswordBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer( tokenUrl="/token", description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/OptionalTest.java
assertThat(Optional.presentInstances(optionals)).isEmpty(); } public void testPresentInstances_somePresent() { List<Optional<String>> optionals = ImmutableList.of(Optional.of("a"), Optional.<String>absent(), Optional.of("c")); assertThat(Optional.presentInstances(optionals)).containsExactly("a", "c").inOrder(); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/OptionalTest.java
assertThat(Optional.presentInstances(optionals)).isEmpty(); } public void testPresentInstances_somePresent() { List<Optional<String>> optionals = ImmutableList.of(Optional.of("a"), Optional.<String>absent(), Optional.of("c")); assertThat(Optional.presentInstances(optionals)).containsExactly("a", "c").inOrder(); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 10.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java
} private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL = new Function<Object, Optional<?>>() { @Override public Optional<?> apply(@Nullable Object obj) { return Optional.fromNullable(obj); } }; private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE = new Function<Optional<?>, @Nullable Object>() { @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderFactory.java
} private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL = new Function<Object, Optional<?>>() { @Override public Optional<?> apply(@Nullable Object obj) { return Optional.fromNullable(obj); } }; private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE = new Function<Optional<?>, @Nullable Object>() { @Override
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 8.1K bytes - Viewed (0) -
common-protos/k8s.io/api/storage/v1beta1/generated.proto
// +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // provisioner indicates the type of the provisioner. optional string provisioner = 2; // parameters holds the parameters for the provisioner that should // create volumes of this storage class. // +optional map<string, string> parameters = 3;
Plain Text - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Mon Mar 11 18:43:24 GMT 2024 - 24.9K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/execution/ProfileActivation.java
* @param active Should the profile be activated? * @param optional Can the build continue if the profile does not exist? */ public void addProfileActivation(String id, boolean active, boolean optional) { final ActivationSettings settings = ActivationSettings.of(active, optional); this.activations.put(id, settings); } private Set<String> getProfileIds(final Predicate<ActivationSettings> predicate) {
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Mon Dec 26 15:12:32 GMT 2022 - 5.6K bytes - Viewed (0)