- Sort Score
- Result 10 results
- Languages All
Results 851 - 860 of 1,087 for tstr (0.05 sec)
-
tests/test_security_oauth2_authorization_code_bearer.py
app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", auto_error=True ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
tests/test_additional_properties.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Items(BaseModel): items: dict[str, int] @app.post("/foo") def foo(items: Items): return items.items client = TestClient(app) def test_additional_properties_post(): response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.6K bytes - Viewed (0) -
docs/fr/docs/tutorial/path-params-numeric-validations.md
/// tip Ce n'est probablement pas aussi important ou nécessaire si vous utilisez `Annotated`. /// Disons que vous voulez déclarer le paramètre de requête `q` comme un `str` requis. Et vous n'avez pas besoin de déclarer autre chose pour ce paramètre, donc vous n'avez pas vraiment besoin d'utiliser `Query`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 6.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
/// tip | Dica Isso provavelmente não é tão importante ou necessário se você usar `Annotated`. /// Vamos supor que você queira declarar o parâmetro de consulta `q` como uma `str` obrigatória. E você não precisa declarar mais nada para esse parâmetro, então você realmente não precisa usar `Query`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CreateRequestTest.java
void testToString() { request = new Smb2CreateRequest(mockConfig, "test\\file.txt"); request.setResolveInDfs(true); String str = request.toString(); assertNotNull(str); assertTrue(str.contains("name=test\\file.txt")); assertTrue(str.contains("resolveDfs=true")); } @Test @DisplayName("Test writeBytesWireFormat with empty name")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 18.6K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Thread owner = aggregatorLock.getOwner(); MojoDescriptor ownerMojo = owner != null ? mojos.get(owner) : null; String str = ownerMojo != null ? " The " + ownerMojo.getId() : "An"; String msg = str + " aggregator mojo is already being executed " + "in this parallel build, those kind of mojos require exclusive access to "
Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Thu Jun 12 14:55:55 UTC 2025 - 21K bytes - Viewed (0) -
docs_src/path_params/tutorial005_py39.py
from enum import Enum from fastapi import FastAPI class ModelName(str, Enum): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI() @app.get("/models/{model_name}") async def get_model(model_name: ModelName): if model_name is ModelName.alexnet: return {"model_name": model_name, "message": "Deep Learning FTW!"} if model_name.value == "lenet":
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 546 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial006_an_py39.py
from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( *, item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str, size: Annotated[float, Query(gt=0, lt=10.5)], ): results = {"item_id": item_id} if q: results.update({"q": q}) if size: results.update({"size": size})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Aug 28 23:39:15 UTC 2024 - 447 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 511 bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
The main `Response` class, all the other responses inherit from it. You can return it directly. It accepts the following parameters: * `content` - A `str` or `bytes`. * `status_code` - An `int` HTTP status code. * `headers` - A `dict` of strings. * `media_type` - A `str` giving the media type. E.g. `"text/html"`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.4K bytes - Viewed (0)