Hi Everyone,
I’m quite new to Speckle and i’m trying to look for a way to send (large) ifc-files to the Speckle server using python. I can find a lot of documentation about using an ifc-parser written in js but none of which showing examples written in python. Does such examples/modules/packages exist? Please help to guide me on which resources i can call opun for more information regarding this task (and what other possibilities might be available).
Hey @DonnyRH, welcome to the Speckle Community. You’ve caught many of us taking a short hiatus, so I’m sorry your question wasn’t answered in the expected timeframe.
Uploading any file supported for conversion (ifc, ETL, obj) to the file import service endpoint will trigger a conversion and subsequent version commit to a Speckle project stream.
So, the most straightforward method from any Python script is to POST the binary data to the streams/$STREAM_ID/uploads endpoint of your preferred Speckle server, which will perform the parsing for you.
@jonathon Thank you very much for the reply. The code below shows my attempt of sending the binairy data of a certain file to a chosen endpoint. But it seems like i’m missing something in the proces. Can you see what i’m missing?