Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for our (0.16 sec)

  1. fastapi/encoders.py

        This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
        where a integer (but not int typed) is used. Encoding this as a float
        results in failed round-tripping between encode and parse.
        Our Id type is a prime example of this.
    
        >>> decimal_encoder(Decimal("1.0"))
        1.0
    
        >>> decimal_encoder(Decimal("1"))
        1
        """
        if dec_value.as_tuple().exponent >= 0:  # type: ignore[operator]
    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)
  2. fastapi/_compat.py

                    exclude_defaults=exclude_defaults,
                    exclude_none=exclude_none,
                )
    
            def __hash__(self) -> int:
                # Each ModelField is unique for our purposes, to allow making a dict from
                # ModelField to its JSON Schema.
                return id(self)
    
        def get_annotation_from_field_info(
            annotation: Any, field_info: FieldInfo, field_name: str
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top