Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for binversion (1.28 sec)

  1. docs/en/docs/tutorial/path-params.md

    !!! check
        This will give you editor support inside of your function, with error checks, completion, etc.
    
    ## Data <abbr title="also known as: serialization, parsing, marshalling">conversion</abbr>
    
    If you run this example and open your browser at <a href="http://127.0.0.1:8000/items/3" class="external-link" target="_blank">http://127.0.0.1:8000/items/3</a>, you will see a response of:
    
    ```JSON
    {"item_id":3}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body-multiple-params.md

        }
    }
    ```
    
    !!! note
        Notice that even though the `item` was declared the same way as before, it is now expected to be inside of the body with a key `item`.
    
    
    **FastAPI** will do the automatic conversion from the request, so that the parameter `item` receives it's specific content and the same for `user`.
    
    It will perform the validation of the compound data, and will document it like that for the OpenAPI schema and automatic docs.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  3. docs/fr/docs/tutorial/query-params.md

    Toutes les fonctionnalités qui s'appliquent aux paramètres de chemin s'appliquent aussi aux paramètres de requête :
    
    * Support de l'éditeur : vérification d'erreurs, auto-complétion, etc.
    * <abbr title="conversion de la chaîne de caractères venant de la requête HTTP en données Python">"Parsing"</abbr> de données.
    * Validation de données.
    * Annotations d'API et documentation automatique.
    
    ## Valeurs par défaut
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 20:52:31 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/body-nested-models.md

            "name": "The Foo live"
        }
    }
    ```
    
    Again, doing just that declaration, with **FastAPI** you get:
    
    * Editor support (completion, etc.), even for nested models
    * Data conversion
    * Data validation
    * Automatic documentation
    
    ## Special types and validation
    
    Apart from normal singular types like `str`, `int`, `float`, etc. you can use more complex singular types that inherit from `str`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params.md

    !!! check
        Also notice that **FastAPI** is smart enough to notice that the path parameter `item_id` is a path parameter and `q` is not, so, it's a query parameter.
    
    ## Query parameter type conversion
    
    You can also declare `bool` types, and they will be converted:
    
    === "Python 3.10+"
    
        ```Python hl_lines="7"
        {!> ../../../docs_src/query_params/tutorial003_py310.py!}
        ```
    
    === "Python 3.8+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:08:42 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/extra-models.md

    We could do better.
    
    We can declare a `UserBase` model that serves as a base for our other models. And then we can make subclasses of that model that inherit its attributes (type declarations, validation, etc).
    
    All the data conversion, validation, documentation, etc. will still work as normally.
    
    That way, we can declare just the differences between the models (with plaintext `password`, with `hashed_password` and without password):
    
    === "Python 3.10+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  7. docs/en/docs/advanced/response-directly.md

    !!! tip
        `JSONResponse` itself is a sub-class of `Response`.
    
    And when you return a `Response`, **FastAPI** will pass it directly.
    
    It won't do any data conversion with Pydantic models, it won't convert the contents to any type, etc.
    
    This gives you a lot of flexibility. You can return any data type, override any data declaration or validation, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 3K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/extra-data-types.md

    * `int`
    * `float`
    * `str`
    * `bool`
    
    But you can also use more complex data types.
    
    And you will still have the same features as seen up to now:
    
    * Great editor support.
    * Data conversion from incoming requests.
    * Data conversion for response data.
    * Data validation.
    * Automatic annotation and documentation.
    
    ## Other data types
    
    Here are some of the additional data types you can use:
    
    * `UUID`:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/header-params.md

    !!! info
        To declare headers, you need to use `Header`, because otherwise the parameters would be interpreted as query parameters.
    
    ## Automatic conversion
    
    `Header` has a little extra functionality on top of what `Path`, `Query` and `Cookie` provide.
    
    Most of the standard headers are separated by a "hyphen" character, also known as the "minus symbol" (`-`).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. tests/test_starlette_urlconvertors.py

    client = TestClient(app)
    
    
    def test_route_converters_int():
        # Test integer conversion
        response = client.get("/int/5")
        assert response.status_code == 200, response.text
        assert response.json() == {"int": 5}
        assert app.url_path_for("int_convertor", param=5) == "/int/5"  # type: ignore
    
    
    def test_route_converters_float():
        # Test float conversion
        response = client.get("/float/25.5")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 27 14:46:06 GMT 2022
    - 1.7K bytes
    - Viewed (0)
Back to top