- Sort Score
- Num 10 results
- Language All
Results 201 - 210 of 930 for toOptional (0.11 seconds)
-
tests/test_serialize_response_model.py
from typing import Optional from fastapi import FastAPI from pydantic import BaseModel, Field from starlette.testclient import TestClient app = FastAPI() class Item(BaseModel): name: str = Field(alias="aliased_name") price: Optional[float] = None owner_ids: Optional[list[int]] = None @app.get("/items/valid", response_model=Item) def get_valid(): return Item(aliased_name="valid", price=1.0)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 4.2K bytes - Click Count (0) -
tests/test_security_http_digest_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPDigest from fastapi.testclient import TestClient app = FastAPI() security = HTTPDigest(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Feb 27 12:29:20 GMT 2025 - 2.2K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionResolverResult.java
* specific language governing permissions and limitations * under the License. */ package org.apache.maven.api.services; import java.util.List; import java.util.Optional; import org.apache.maven.api.Repository; import org.apache.maven.api.Version; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.annotations.Nonnull; /** * * @since 4.0.0
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Jan 29 08:17:07 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_security_http_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer from fastapi.testclient import TestClient app = FastAPI() security = HTTPBearer(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2AuthorizationCodeBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.4K bytes - Click Count (0) -
tests/test_security_oauth2_password_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2PasswordBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.1K bytes - Click Count (0) -
tests/test_security_http_base_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security.http import HTTPAuthorizationCredentials, HTTPBase from fastapi.testclient import TestClient app = FastAPI() security = HTTPBase(scheme="Other", auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is None:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.9K bytes - Click Count (0) -
tests/test_security_oauth2_authorization_code_bearer.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2AuthorizationCodeBearer from fastapi.testclient import TestClient 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}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.3K bytes - Click Count (0) -
tests/test_custom_schema_fields.py
from typing import Annotated, Optional from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, WithJsonSchema app = FastAPI() class Item(BaseModel): name: str description: Annotated[ Optional[str], WithJsonSchema({"type": ["string", "null"]}) ] = None model_config = { "json_schema_extra": { "x-something-internal": {"level": 4},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 1.3K bytes - Click Count (0) -
apache-maven/src/assembly/maven/bin/mvn.cmd
@REM @REM JAVA_HOME (Optional) Points to a Java installation. @REM MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments. @REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands. @REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending. @REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Dec 10 16:40:06 GMT 2025 - 10.7K bytes - Click Count (3)