[pepper] Pass the JSON data obtained by python request to the tablet.

This is a memo. python side import requests

GET communication

    res = requests.get('https://hogehoge.org/fugafuga.json)
    data = res.json()
    self.memory.raiseEvent("myapp/data", json.dumps(data).encode("utf-8"))

Pass as, in the receiving Javascript, $.subscribeToALMemoryEvent("myapp/data", function (data) { data = JSON.parse(data); console.log(data); }); So OK !!

Recommended Posts

[pepper] Pass the JSON data obtained by python request to the tablet.
Just add the python array to the json data
Pass OpenCV data from the original C ++ library to Python
Convert Excel data to JSON with python
[Introduction to Python] How to handle JSON format data
How to erase the characters output by Python
Python C / C ++ Extensions: Pass some of the data as np.array to Python (set stride)
Log in by passing the login session cookie obtained by Python requests to the Selenium browser.
Read the xml file by referring to the Python tutorial
Write data to KINTONE using the Python requests module
(Maybe) This is all you need to pass the Python 3 Engineer Certification Data Analysis Exam
[Python] It might be useful to list the data frames
Various ways to calculate the similarity between data in python
Build a Python environment and transfer data to the server
Debug by attaching to the Python process of the SSH destination
[Introduction to Python] How to get data with the listdir function
Gzip the data by streaming
Read json data with python
How to pass and study the Python 3 Engineer Certification Basic Exam
Sort the file names obtained by Python glob in numerical order
Try to implement and understand the segment tree step by step (python)
Pass a list by reference from Python to C ++ with pybind11
Try to solve the shortest path with Python + NetworkX + social data
How to send a request to the DMM (FANZA) API with python
I tried to open the latest data of the Excel file managed by date in the folder with Python
[Python] How to FFT mp3 data
Leave the troublesome processing to Python
[Introduction to Python] How to parse JSON
In the python command python points to python3.8
How to get the Python version
[Python] How to import the library
Python logging and dump to json
[Python] Change the alphabet to numbers
Save json data received by mosquitto on docker to db and Elasticsearch
[Python Kivy] How to get the file path by dragging and dropping
I'm stunned by the behavior of filter () due to different versions of Python
Try to image the elevation data of the Geographical Survey Institute with Python
Send and receive image data as JSON over the network with Python
I tried to verify and analyze the acceleration of Python by Cython
Address to the bug that node.surface cannot be obtained with python3 + mecab
How to automatically notify by phone when the python system is down
I tried to analyze the New Year's card by myself using python
Get the key for the second layer migration of JSON data in python
How to sort by specifying a column in the Python Numpy array.