- Sort Score
- Result 10 results
- Languages All
Results 381 - 390 of 954 for annotaties (0.1 sec)
-
docs_src/bigger_applications/app_an_py39/dependencies.py
from typing import Annotated from fastapi import Header, HTTPException async def get_token_header(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def get_query_token(token: str): if token != "jessica":
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 409 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: list[str] = [] @app.get("/items/")
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 451 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 785 bytes - Viewed (0) -
docs_src/header_param_models/tutorial001_an.py
from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: List[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]):
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 446 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_pv1_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): class Config: extra = "forbid" host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: list[str] = [] @app.get("/items/")
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 455 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_an_py39.py
from typing_extensions import Annotated, Literal app = FastAPI() class FilterParams(BaseModel): model_config = {"extra": "forbid"} limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 493 bytes - Viewed (0) -
build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/testing/TestType.kt
} fun Test.includeSpockAnnotation(fqcn: String) { systemProperties.compute("include.spock.annotation") { _, oldValue -> if (oldValue == null) fqcn else "$oldValue,$fqcn" } } fun Test.excludeSpockAnnotation(fqcn: String) { systemProperties.compute("exclude.spock.annotation") { _, oldValue -> if (oldValue == null) fqcn else "$oldValue,$fqcn" }
Registered: Wed Oct 30 11:36:09 UTC 2024 - Last Modified: Sat Sep 30 16:17:28 UTC 2023 - 1.3K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/model/ClassMetaDataTest.groovy
def "is deprecated when @Deprecated annotation is attached to class"() { def notDeprecated = new ClassMetaData("SomeClass") def deprecated = new ClassMetaData("SomeClass") deprecated.addAnnotationTypeName(Deprecated.class.name) expect: !notDeprecated.deprecated deprecated.deprecated } def "is incubating when @Incubating annotation is attached to class"() {
Registered: Wed Oct 30 11:36:09 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 1.4K bytes - Viewed (0) -
istioctl/pkg/multicluster/remote_secret_test.go
}) } return sa } func makeSecret(name, caData, token string) *v1.Secret { out := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: testNamespace, Annotations: map[string]string{v1.ServiceAccountNameKey: testServiceAccountName}, }, Data: map[string][]byte{}, Type: v1.SecretTypeServiceAccountToken, } if len(caData) > 0 {
Registered: Wed Oct 30 22:53:10 UTC 2024 - Last Modified: Thu Oct 24 17:36:49 UTC 2024 - 20.7K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ):
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 511 bytes - Viewed (0)