I am working on developing a mobile application using flutter and I use the Python language as part of the project. I want to know how to send data between flutter and Python, especially sending data from Python to flutter. For example if i have Python code like this :

**thisdict** = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964

i want to send the value of the dictionary thisdict to flutter How to do that ?

Solution 1: C Rishi

I'm assuming the values stored in the dictionary are read from a database, which means you will hav to implement a RESTful-API on Python using Django's REST Framework or Flask's REST Framework.

Django Rest Framework


This API will read values from the database upon a request and send the data back as a JSON object to the user/API Caller with the data required in the dictionary.

To send HTTP Post or GET Requests you will have to use Flutter-BLoC to send POST as well as GET Requests to an API and then capture the Response.

Flutter BLoC

Here's the documentation on FLutter BLoC.