Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 63 for have (0.29 sec)

  1. tests/test_tutorial/test_path_params/test_tutorial005.py

    
    def test_get_enums_resnet():
        response = client.get("/models/resnet")
        assert response.status_code == 200
        assert response.json() == {"model_name": "resnet", "message": "Have some residuals"}
    
    
    def test_get_enums_invalid():
        response = client.get("/models/foo")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 5K bytes
    - Viewed (0)
  2. fastapi/encoders.py

        exclude_none: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_none` parameter, passed to Pydantic models to define
                if it should exclude from the output any fields that have a `None` value.
                """
            ),
        ] = False,
        custom_encoder: Annotated[
            Optional[Dict[Any, Callable[[Any], Any]]],
            Doc(
                """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  3. configure.py

      # Check if current bazel version can be detected properly.
      if not curr_version_int:
        print('WARNING: current bazel installation is not a release version.')
        return curr_version
    
      print('You have bazel %s installed.' % curr_version)
      return curr_version
    
    
    def set_cc_opt_flags(environ_cp):
      """Set up architecture-dependent optimization flags.
    
      Also append CC optimization flags to bazel.rc..
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

                "user": {"username": "Dave"},
            },
        )
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "importance": 2,
            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. docs_src/extra_models/tutorial001.py

        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 943 bytes
    - Viewed (0)
  6. docs_src/extra_models/tutorial001_py310.py

        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 899 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py39.py

                "user": {"username": "Dave"},
            },
        )
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "importance": 2,
            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. fastapi/params.py

            include_in_schema: bool = True,
            json_schema_extra: Union[Dict[str, Any], None] = None,
            **extra: Any,
        ):
            assert default is ..., "Path parameters cannot have a default value"
            self.in_ = self.in_
            super().__init__(
                default=default,
                default_factory=default_factory,
                annotation=annotation,
                alias=alias,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  9. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

                "user": {"username": "Dave"},
            },
        )
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "importance": 2,
            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py

                "user": {"username": "Dave"},
            },
        )
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "importance": 2,
            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top