Is it Possible to Access Project's File Store Using Python?

This topic was automatically generated from Slack. You can find the original thread here.

Hi there. I’m trying to access files in the projects file store using Python. For Node.js, there is detailed documentation, but not for Python. The bot told me to use the API, but the endpoint returned “route not found”. Is it even possible to access the file store using Python? TIA for any help :pray::skin-tone-2:

Hi Stefan - good question. File Stores are still in Beta and only available for Node.js code steps.

But you can still use the presigned GET and PATCH URLs from files exported from Node.js code steps in your Python code for programmatic interaction

For example, in a Node.js code step, retrieve the file from the File Store and export it:

return $.files.open('myfile.txt')

Then in the next step in your workflow, use a Python code step to use the presigned URLs to either retrieve the file, or upload data to replace/update that file in the File Store.

Hi Thanks for your fast reply. Ah yess, good input. i can first do a Node.js step and use the export :+1::skin-tone-2: Sometimes the solutions is too obvious to be seen :see_no_evil:

All good! It’s not exactly a common pattern that you can jump across languages in the same workflow, it’s definitely a Pipedream super power

Just a heads up, the URLs are short lived, so they may expire when you’re testing. Just rerun the Node.js code step to refresh them