Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 427 for _attributes (0.2 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. tests/test_compat.py

    
    @needs_pydanticv2
    def test_get_model_config():
        # For coverage in Pydantic v2
        class Foo(BaseModel):
            model_config = ConfigDict(from_attributes=True)
    
        foo = Foo()
        config = _get_model_config(foo)
        assert config == {"from_attributes": True}
    
    
    def test_complex():
        app = FastAPI()
    
        @app.post("/")
        def foo(foo: Union[str, List[int]]):
            return foo
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  3. .idea/inspectionProfiles/Gradle.xml

        <inspection_tool class="62125fc1-a999-3cf1-9b9b-a30b4375d9bf" enabled="true" level="WARNING" enabled_by_default="true" />
        <inspection_tool class="73cd39e8-e54e-3a38-ad1b-b883fff4b1eb" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" />
    XML
    - Registered: Wed May 08 11:36:15 GMT 2024
    - Last Modified: Thu Apr 11 13:39:08 GMT 2024
    - 13K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body/test_tutorial001_py310.py

        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid dictionary or object to extract fields from",
                        "input": "name=Foo&price=50.5",
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (2)
  5. tests/test_tutorial/test_body/test_tutorial001.py

        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid dictionary or object to extract fields from",
                        "input": "name=Foo&price=50.5",
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (7)
  6. maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

                                temp.toPath(),
                                destination.toPath(),
                                StandardCopyOption.REPLACE_EXISTING,
                                StandardCopyOption.COPY_ATTRIBUTES);
    
                        if (!temp.delete()) {
                            temp.deleteOnExit();
                        }
                    } catch (IOException e) {
                        throw new TransferFailedException(
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Sep 14 11:48:15 GMT 2023
    - 29.9K bytes
    - Viewed (0)
  7. maven-core/src/main/java/org/apache/maven/ReactorReader.java

                Files.copy(
                        artifact.getPath(),
                        target,
                        StandardCopyOption.REPLACE_EXISTING,
                        StandardCopyOption.COPY_ATTRIBUTES);
            } catch (IOException e) {
                LOGGER.error("Error while copying artifact to project local repository", e);
            }
        }
    
        private Path getArtifactPath(Artifact artifact) {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 16:33:18 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  8. 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)
  9. tensorflow/c/eager/c_api.cc

    #include "tensorflow/core/common_runtime/eager/tensor_handle.h"
    #include "tensorflow/core/common_runtime/function.h"
    #include "tensorflow/core/framework/attr_value.pb.h"
    #include "tensorflow/core/framework/device_attributes.pb.h"
    #include "tensorflow/core/framework/function.h"
    #include "tensorflow/core/framework/node_def_util.h"
    #include "tensorflow/core/framework/rendezvous.h"
    #include "tensorflow/core/framework/tensor_shape.pb.h"
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  10. .idea/inspectionProfiles/idea_default.xml

          <scope name="runtime.classes" level="ERROR" enabled="true" />
        </inspection_tool>
        <inspection_tool class="LoggingStringTemplateAsArgument" enabled="true" level="TEXT ATTRIBUTES" enabled_by_default="true" editorAttributes="CONSIDERATION_ATTRIBUTES" />
        <inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
          <option name="m_onlyPrivateOrFinal" value="false" />
    XML
    - Registered: Fri May 03 08:18:13 GMT 2024
    - Last Modified: Thu Nov 09 20:59:03 GMT 2023
    - 32.4K bytes
    - Viewed (0)
Back to top