Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for conversion (0.25 sec)

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

        que des vérifications d'erreur, de l'auto-complétion, etc.
    
    ## <abbr title="aussi appelé sérialisation, ou parfois parsing ou marshalling en anglais">Conversion</abbr> de données
    
    Si vous exécutez cet exemple et allez sur <a href="http://127.0.0.1:8000/items/3" class="external-link" target="_blank">http://127.0.0.1:8000/items/3</a>, vous aurez comme réponse :
    
    ```JSON
    {"item_id":3}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. docs/en/docs/alternatives.md

    ### <a href="https://marshmallow.readthedocs.io/en/stable/" class="external-link" target="_blank">Marshmallow</a>
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  7. docs/fr/docs/advanced/response-directly.md

    !!! note "Remarque"
        `JSONResponse` est elle-même une sous-classe de `Response`.
    
    Et quand vous retournez une `Response`, **FastAPI** la transmet directement.
    
    Elle ne fera aucune conversion de données avec les modèles Pydantic, elle ne convertira pas le contenu en un type quelconque.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. 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)
  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. 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)
Back to top