- Sort Score
- Num 10 results
- Language All
Results 351 - 360 of 1,555 for depend (0.04 seconds)
-
tests/test_security_api_key_cookie_description.py
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", description="An API Cookie Key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
docs_src/settings/app02_an_py39/main.py
from functools import lru_cache from typing import Annotated from fastapi import Depends, FastAPI from .config import Settings app = FastAPI() @lru_cache def get_settings(): return Settings() @app.get("/info") async def info(settings: Annotated[Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 445 bytes - Click Count (0) -
android/guava/src/com/google/common/hash/HashCode.java
*/ @Override public final String toString() { byte[] bytes = getBytesInternal(); StringBuilder sb = new StringBuilder(2 * bytes.length); for (byte b : bytes) { sb.append(hexDigits[(b >> 4) & 0xf]).append(hexDigits[b & 0xf]); } return sb.toString(); } private static final char[] hexDigits = "0123456789abcdef".toCharArray();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 12.6K bytes - Click Count (0) -
tests/test_security_api_key_query.py
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") 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")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 1.9K bytes - Click Count (0) -
tests/test_stringified_annotation_dependency.py
from __future__ import annotations from typing import TYPE_CHECKING, Annotated import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot if TYPE_CHECKING: # pragma: no cover from collections.abc import AsyncGenerator class DummyClient: async def get_people(self) -> list: return ["John Doe", "Jane Doe"] async def close(self) -> None:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.2K bytes - Click Count (0) -
docs_src/authentication_error_status_code/tutorial001_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer app = FastAPI() class HTTPBearer403(HTTPBearer): def make_not_authenticated_error(self) -> HTTPException: return HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Not authenticated" )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 618 bytes - Click Count (0) -
guava-tests/test/com/google/common/io/CharSourceTest.java
TestCharSource okSource = new TestCharSource(STRING); assertThrows(IOException.class, () -> okSource.copyTo(new TestCharSink(option))); // ensure reader was closed IF it was opened (depends on implementation whether or not it's // opened at all if sink.newWriter() throws). assertTrue( "stream not closed when copying to sink with option: " + option,
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 17:27:14 GMT 2025 - 11.5K bytes - Click Count (0) -
docs/es/docs/tutorial/dependencies/dependencies-with-yield.md
{* ../../docs_src/dependencies/tutorial008e_an_py39.py hl[12,16] *} `Depends()` recibe un parĂ¡metro `scope` que puede ser:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.7K bytes - Click Count (0) -
tests/test_security_api_key_header_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2K bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStub.java
/** * A stub dependency graph that is custom-made for testing concurrent build graph evaluations. * <p> * Implements a graph as follows: * A has no dependencies * B depends on A * C depends on A * X depends on B & C * Y depends on B * Z depends on C * </p> * */ public class ProjectDependencyGraphStub implements ProjectDependencyGraph { public static final MavenProject A = new MavenProject();Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 8.6K bytes - Click Count (0)