Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for attribute (0.18 sec)

  1. tests/test_read_with_orm_mode.py

            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
            model_config = ConfigDict(from_attributes=True)
    
        class PersonCreate(PersonBase):
            pass
    
        class PersonRead(PersonBase):
            full_name: str
    
            model_config = {"from_attributes": True}
    
        app = FastAPI()
    
        @app.post("/people/", response_model=PersonRead)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. ci/official/wheel_test/test_import_api_packages.py

            return set(file.read().splitlines())
    
        super().setUp()
        self.api_packages_v2 = _get_api_packages_v2()
        # Some paths in the api_packages_path file cannot be directly imported.
        # These paths may point to attributes or sub-modules within a module's
        # namespace, but they don't correspond to an actual file
        # or directory on the filesystem.
        self.packages_for_skip = [
            "tensorflow.distribute.cluster_resolver",
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Sep 13 15:52:07 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. fastapi/_compat.py

                loc: Tuple[Union[int, str], ...] = (),
            ) -> Tuple[Any, Union[List[Dict[str, Any]], None]]:
                try:
                    return (
                        self._type_adapter.validate_python(value, from_attributes=True),
                        None,
                    )
                except ValidationError as exc:
                    return None, _regenerate_error_with_loc(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top