pschatzmann / jupyter-openscad-kernel

Jupyter kernel for OpenSCAD
11 stars 3 forks source link

Support for Octoprint #4

Open pschatzmann opened 4 years ago

pschatzmann commented 4 years ago

Add file upload:

import requests

def Upload_File(): fle={'file': open('max.gcode', 'rb'), 'filename': 'max.gcode'} url='http://localhost:5000/api/files/{}'.format('local') payload={'select': 'true','print': 'false' } header={'X-Api-Key': 'FD550BD4DA2442BA906AD1850539D6DB' } response = requests.post(url, files=fle,data=payload,headers=header) print(response)