import requests # Work with list-like objects from listwork import * server = 'http://127.0.0.1:3333' # Draw some pixels # [[x, y, color-1, color-2, color-3], ...] fill = {"main": pack([[200, 100, 0, 0, 0], [15, 30, 255, 54, 43]]) } response = requests.post(server, data=fill) if response: print("posted") # Get color code of coords # [[x,y], ...] xys = pack([[200,100], [13,10], [50,50]]) response = requests.get(f'{server}/get_color={xys}') print( unpack(response.text) )