- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for tolower (0.17 sec)
-
fastapi/security/http.py
unauthorized_headers = {"WWW-Authenticate": f'Basic realm="{self.realm}"'} else: unauthorized_headers = {"WWW-Authenticate": "Basic"} if not authorization or scheme.lower() != "basic": if self.auto_error: raise HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
fastapi/utils.py
operation_id = f"{operation_id}_{method.lower()}" return operation_id def generate_unique_id(route: "APIRoute") -> str: operation_id = f"{route.name}{route.path_format}" operation_id = re.sub(r"\W", "_", operation_id) assert route.methods operation_id = f"{operation_id}_{list(route.methods)[0].lower()}" return operation_id
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
fastapi/security/oauth2.py
authorization = request.headers.get("Authorization") scheme, param = get_authorization_scheme_param(authorization) if not authorization or scheme.lower() != "bearer": if self.auto_error: raise HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 21.1K bytes - Viewed (1) -
tests/test_jsonable_encoder.py
) assert encoded_instance["dt_field"] == instance.dt_field.isoformat() def test_custom_enum_encoders(): def custom_enum_encoder(v: Enum): return v.value.lower() class MyEnum(Enum): ENUM_VAL_1 = "ENUM_VAL_1" instance = MyEnum.ENUM_VAL_1 encoded_instance = jsonable_encoder( instance, custom_encoder={MyEnum: custom_enum_encoder}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
scripts/docs.py
def get_lang_paths() -> List[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: Optional[str]) -> Union[str, None]: if lang is None: return None lang = lang.lower() return lang def complete_existing_lang(incomplete: str): lang_path: Path for lang_path in get_lang_paths(): if lang_path.is_dir() and lang_path.name.startswith(incomplete):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 19:26:14 GMT 2024 - 10.9K bytes - Viewed (1) -
fastapi/openapi/utils.py
} ) if route.openapi_extra: deep_dict_update(operation, route.openapi_extra) path[method.lower()] = operation return path, security_schemes, definitions def get_fields_from_routes( routes: Sequence[BaseRoute], ) -> List[ModelField]: body_fields_from_routes: List[ModelField] = []
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
tests/test_additional_responses_router.py
}, ) async def b(): return "b" @router.get( "/c", responses={ "400": {"description": "Error with str"}, "5xx": {"description": "Error with range, lower"}, "default": {"description": "A default response"}, }, ) async def c(): return "c" @router.get( "/d", responses={ "400": {"description": "Error with str"},
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.1K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None foo: ModelB @field_validator("name") def lower_username(cls, name: str, info: ValidationInfo): if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 6.3K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/app_pv1.py
username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None model_b: ModelB @validator("name") def lower_username(cls, name: str, values): if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 784 bytes - Viewed (0) -
configure.py
no_reply += '\n' if enabled_by_default: question += ' [Y/n]: ' else: question += ' [y/N]: ' var = environ_cp.get(var_name) if var is not None: var_content = var.strip().lower() true_strings = ('1', 't', 'true', 'y', 'yes') false_strings = ('0', 'f', 'false', 'n', 'no') if var_content in true_strings: var = True elif var_content in false_strings: var = False
Python - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 18:25:36 GMT 2024 - 53.8K bytes - Viewed (1)