- Sort Score
- Result 10 results
- Languages All
Results 4371 - 4380 of 7,250 for return (0.05 sec)
-
tests/test_security_api_key_query_description.py
class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): 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 client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_base_optional.py
@app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None: return {"msg": "Create an account first"} return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_base():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
internal/grid/grid_types_test.go
Num int String string } type testResponse struct { OrgNum int OrgString string Embedded testRequest } func newTestRequest() *testRequest { return &testRequest{} } func newTestResponse() *testResponse { return &testResponse{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 1.1K bytes - Viewed (0) -
internal/disk/fdatasync_unix.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 29 23:40:28 UTC 2021 - 1.1K bytes - Viewed (0) -
internal/disk/fdatasync_unsupported.go
package disk import ( "os" ) // Fdatasync is a no-op func Fdatasync(f *os.File) error { return nil } // FadviseDontNeed is a no-op func FadviseDontNeed(f *os.File) error { return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 29 23:40:28 UTC 2021 - 1K bytes - Viewed (0) -
src/cmd/asm/internal/lex/lex_test.go
// lines joins the arguments together as complete lines. func lines(a ...string) string { return strings.Join(a, "\n") + "\n" } // drain returns a single string representing the processed input tokens. func drain(input *Input) string { var buf strings.Builder for { tok := input.Next() if tok == scanner.EOF { return buf.String() } if tok == '#' { continue } if buf.Len() > 0 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 29 07:48:38 UTC 2023 - 5.8K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
The same way, you can declare it as the function's **return type**, and then the shape of the data will show up in the automatic API docs UI. {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[40:45] hl[40:45] *} </details> Here we use the `SessionDep` dependency (a `Session`) to add the new `Hero` to the `Session` instance, commit the changes to the database, refresh the data in the `hero`, and then return it. ### Read Heroes
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.7K bytes - Viewed (0) -
src/bytes/example_test.go
// Output: // 8 // 9 // -1 } func ExampleMap() { rot13 := func(r rune) rune { switch { case r >= 'A' && r <= 'Z': return 'A' + (r-'A'+13)%26 case r >= 'a' && r <= 'z': return 'a' + (r-'a'+13)%26 } return r } fmt.Printf("%s\n", bytes.Map(rot13, []byte("'Twas brillig and the slithy gopher..."))) // Output: // 'Gjnf oevyyvt naq gur fyvgul tbcure... }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
} private List<Entry<Object, Object>> warmUp(LoadingCache<Object, Object> cache) { return warmUp(cache, WARMUP_MIN, WARMUP_MAX); } /** * Returns the entries that were added to the map, so they won't fall out of a map with weak or * soft references until the caller drops the reference to the returned entries. */ private List<Entry<Object, Object>> warmUp(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 15K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/BiMapInverseTester.java
} private static final long serialVersionUID = 0; } /** * Returns {@link Method} instances for the tests that assume that the inverse will be the same * after serialization. */ @J2ktIncompatible @GwtIncompatible // reflection public static List<Method> getInverseSameAfterSerializingMethods() { return Collections.singletonList(getMethod("testInverseSerialization")); } @J2ktIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3K bytes - Viewed (0)