- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 981 for Optional (0.26 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 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K 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 21 07:19:11 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 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.2K 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 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 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) -
internal/config/notify/help.go
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Mar 19 04:37:54 GMT 2024 - 18.8K bytes - Viewed (0) -
common-protos/k8s.io/api/apps/v1beta2/generated.proto
// +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; // The reason for the condition's last transition. // +optional optional string reason = 4; // A human readable message indicating details about the transition. // +optional optional string message = 5; } // DaemonSetList is a collection of daemon sets. message DaemonSetList {
Plain Text - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Mon Mar 11 18:43:24 GMT 2024 - 36.4K bytes - Viewed (0) -
common-protos/k8s.io/api/authorization/v1beta1/generated.proto
// +optional optional string version = 4; // Resource is one of the existing resource types. "*" means all. // +optional optional string resource = 5; // Subresource is one of the existing resource types. "" means none. // +optional optional string subresource = 6; // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. // +optional
Plain Text - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Mon Mar 11 18:43:24 GMT 2024 - 11.9K bytes - Viewed (0)