- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 67 for getattr (0.17 sec)
-
tests/test_operations_signatures.py
def test_signatures_consistency(): base_sig = inspect.signature(APIRouter.get) for method_name in method_names: router_method = getattr(APIRouter, method_name) app_method = getattr(FastAPI, method_name) router_sig = inspect.signature(router_method) app_sig = inspect.signature(app_method) param: inspect.Parameter
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Mon May 27 12:08:13 GMT 2019 - 934 bytes - Viewed (0) -
tests/test_custom_route_class.py
def test_route_classes(): routes = {} for r in app.router.routes: assert isinstance(r, Route) routes[r.path] = r assert getattr(routes["/a/"], "x_type") == "A" # noqa: B009 assert getattr(routes["/a/b/"], "x_type") == "B" # noqa: B009 assert getattr(routes["/a/b/c/"], "x_type") == "C" # noqa: B009 def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.1K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/schemas.py
class Config: orm_mode = True getter_dict = PeeweeGetterDict class UserBase(BaseModel): email: str class UserCreate(UserBase): password: str class User(UserBase): id: int is_active: bool items: List[Item] = [] class Config: orm_mode = True
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 868 bytes - Viewed (0) -
fastapi/dependencies/utils.py
isinstance(field_info, params.Param) and getattr(field_info, "in_", None) is None ): field_info.in_ = params.ParamTypes.query use_annotation_from_field_info = get_annotation_from_field_info( use_annotation, field_info, param_name, ) if not field_info.alias and getattr(field_info, "convert_underscores", None):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/database.py
class PeeweeConnectionState(peewee._ConnectionState): def __init__(self, **kwargs): super().__setattr__("_state", db_state) super().__init__(**kwargs) def __setattr__(self, name, value): self._state.get()[name] = value def __getattr__(self, name): return self._state.get()[name] db = peewee.SqliteDatabase(DATABASE_NAME, check_same_thread=False)
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 662 bytes - Viewed (0) -
fastapi/types.py
import types from enum import Enum from typing import Any, Callable, Dict, Set, Type, TypeVar, Union from pydantic import BaseModel DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any]) UnionType = getattr(types, "UnionType", Union) ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Dec 12 00:29:03 GMT 2023 - 383 bytes - Viewed (0) -
fastapi/exception_handlers.py
from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION async def http_exception_handler(request: Request, exc: HTTPException) -> Response: headers = getattr(exc, "headers", None) if not is_body_allowed_for_status_code(exc.status_code): return Response(status_code=exc.status_code, headers=headers) return JSONResponse(
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 1.3K bytes - Viewed (0) -
fastapi/encoders.py
exclude = set(exclude) if isinstance(obj, BaseModel): # TODO: remove when deprecating Pydantic v1 encoders: Dict[Any, Any] = {} if not PYDANTIC_V2: encoders = getattr(obj.__config__, "json_encoders", {}) # type: ignore[attr-defined] if custom_encoder: encoders.update(custom_encoder) obj_dict = _model_dump( obj, mode="json",
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 10.8K bytes - Viewed (0) -
fastapi/openapi/utils.py
if operation_id in operation_ids: message = ( f"Duplicate Operation ID {operation_id} for function " + f"{route.endpoint.__name__}" ) file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") if file_name: message += f" at {file_name}" warnings.warn(message, stacklevel=1) operation_ids.add(operation_id)
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
tensorflow/c/c_api.cc
} \ } DEFINE_GETATTR(TF_OperationGetAttrInt, int64_t, int64_t, i); DEFINE_GETATTR(TF_OperationGetAttrFloat, float, float, f); DEFINE_GETATTR(TF_OperationGetAttrBool, unsigned char, bool, b); DEFINE_GETATTR(TF_OperationGetAttrType, TF_DataType, DataType, type); #undef DEFINE_GETATTR void TF_OperationGetAttrShape(TF_Operation* oper, const char* attr_name,
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 102.3K bytes - Viewed (0)