Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for result2 (0.03 sec)

  1. fastapi/encoders.py

        Encodes a Decimal as int if there's no exponent, otherwise float
    
        This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
        where an 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
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  2. tests/test_compat.py

        field_info = FieldInfo(annotation=Union[list[str], None])
        field = v2.ModelField(name="items", field_info=field_info)
        result = v2.serialize_sequence_value(field=field, value=["a", "b", "c"])
        assert result == ["a", "b", "c"]
        assert isinstance(result, list)
    
    
    @needs_py310
    def test_serialize_sequence_value_with_optional_list_pipe_union():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. scripts/translate.py

        »»»
    
    Some examples in Spanish:
    
        Source:
    
            «««
            /// tip
            »»»
    
        Result:
    
            «««
            /// tip | Consejo
            »»»
    
        Source:
    
            «««
            /// details | Preview
            »»»
    
        Result:
    
            «««
            /// details | Vista previa
            »»»
    
    
    ### Tab blocks
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  4. fastapi/openapi/utils.py

            if isinstance(route, routing.APIRoute):
                result = get_openapi_path(
                    route=route,
                    operation_ids=operation_ids,
                    model_name_map=model_name_map,
                    field_mapping=field_mapping,
                    separate_input_output_schemas=separate_input_output_schemas,
                )
                if result:
                    path, security_schemes, path_definitions = result
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  5. docs/en/docs/release-notes.md

        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
        result = ml_models["answer_to_everything"](x)
        return {"result": result}
    ```
    
    **Note**: This is the recommended way going forward, instead of using `startup` and `shutdown` events.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top