Programmatically create shareable url

Hi all, I think this is a silly question, but I can’t find out how to create a shareable url from my Python code. With the CLI it works great with the --url flag, I was hoping to do something similar programmatically.

I was looking for it under the Access Type in the Go documentation, but I can’t figure it out. Serializing the access seems in the right direction, but how do I create a linkshare from the serialized gibberish?

Have a look at this

I couldn’t find a full api documentation for the Python library, hence was reading the golang docs. Does the Python repo explain how to generate a linkshare somewhere?

Could you please take a look on

However, it will not produce a linksharing URL.
Here how to do this with uplink CLI: share - Storj DCS
I do not think that this third-party binding has an analogue.
Here is the code in GO: uplink-c/edge_share.go at b5a2eed860c6042ca4aa1859f7a2f4f33e06b09d · storj/uplink-c · GitHub

It’s unclear whether the wiki documents the full functionality of the Python bindings.

Is it possible with the go library? (cause I don’t understand how I should read that from the docs)

Yes, you can use our code for uplink as a prototype:

You can also check out this walkthrough: Libuplink Walkthrough · storj/storj Wiki · GitHub

2 Likes