- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 1,131 for defs (0.02 seconds)
-
build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionDownloadPluginFuncTest.groovy
import org.gradle.testkit.runner.TaskOutcome class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest { def "resolves current version from local build"() { given: internalBuild() localDistroSetup() def distroVersion = VersionProperties.getElasticsearch() buildFile << """ apply plugin: 'elasticsearch.internal-distribution-download'Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 01 09:19:30 GMT 2021 - 6.7K bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
) async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str: return token app = FastAPI(dependencies=[Depends(get_token)]) @app.get("/") async def root(): return {"message": "Hello World"} @app.get( "/with-oauth2-scheme", dependencies=[Security(oauth2_scheme, scopes=["read", "write"])], ) async def read_with_oauth2_scheme():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.6K bytes - Click Count (0) -
tests/test_security_api_key_query.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")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial005.py
@pytest.fixture( name="client", params=[ pytest.param("tutorial005_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}") client = TestClient(mod.app) return client def test_put_all(client: TestClient): response = client.put( "/items/123", json={ "name": "Foo",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/schema-extra-example.md
# Déclarer des exemples de données de requête { #declare-request-example-data } Vous pouvez déclarer des exemples des données que votre application peut recevoir. Voici plusieurs façons de le faire. ## Ajouter des données JSON Schema supplémentaires dans les modèles Pydantic { #extra-json-schema-data-in-pydantic-models } Vous pouvez déclarer `examples` pour un modèle Pydantic qui seront ajoutés au JSON Schema généré.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 10.2K bytes - Click Count (0) -
docs_src/dependencies/tutorial010_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 292 bytes - Click Count (0) -
docs/fr/docs/how-to/configure-swagger-ui.md
Swagger UI permet également d'autres configurations qui sont des objets réservés à JavaScript (par exemple, des fonctions JavaScript). FastAPI inclut aussi ces paramètres `presets` réservés à JavaScript : ```JavaScript presets: [ SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset ] ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 3.2K bytes - Click Count (0) -
tests/test_serialize_response.py
owner_ids: list[int] | None = None @app.get("/items/valid", response_model=Item) def get_valid(): return {"name": "valid", "price": 1.0} @app.get("/items/coerce", response_model=Item) def get_coerce(): return {"name": "coerce", "price": "1.0"} @app.get("/items/validlist", response_model=list[Item]) def get_validlist(): return [ {"name": "foo"}, {"name": "bar", "price": 1.0},
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.3K bytes - Click Count (0) -
tests/test_security_api_key_header_optional.py
api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: str | None = Security(api_key)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User | None = Depends(get_current_user)): if current_user is None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.1K bytes - Click Count (0) -
tests/test_security_http_digest_optional.py
security = HTTPDigest(auto_error=False) @app.get("/users/me") def read_current_user( credentials: HTTPAuthorizationCredentials | None = 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_digest():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.3K bytes - Click Count (0)