0 votes
105 views
Can I share my datalab python workbooks with my collaborators, or is it just an individual thing?

That is, is there some way "friends" can access my notebooks using their own accounts, e.g. evaluating the code, seeing the graphics, etc.
by | 105 views

1 Answer

0 votes

Hi, thanks for reaching out.

Concurrent working on the same notebook between multiple users is not (yet) possible. You can share a notebook though, and then your friends can run their copy under their accounts.

If you don't want to send emails around with notebooks attached, you could place your notebook in your vospace storage area, in the public/ directory, which is by default readable by all Data Lab users. To write something to your vospace, you need to use the DL storeClient. Example code:

from dl import storeClient as sc
sc.mkdir('vos://public/mynotebooks/')
sc.put(fr='./example.ipynb',to='vos://public/mynotebooks')
print(sc.ls('vos://public/mynotebooks/',format='long'))
   -rw-rw-r-x demo02 37975 10 Nov 2021 17:26 example.ipynb

This assumed that you are already logged in (I was logged in as user demo02), and I copied a NB called example.ipynb from the same directory where I ran the NB with *this* code, into my VOSpace, into public/mynotebooks/ directory (which we just created).

Now, any of your friends can get it from there by doing e.g. this:

from dl import storeClient as sc
sc.get(fr='demo02://public/mynotebooks/example.ipynb',to='./example.iypnb')

Notice how they reference your VOSpace with your username, not with 'vos'. And here I assumed they want to copy the file into the same directory as where they are currently working from.

In the future there will be a web-based way to get to shared files, but we are not there yet.

Please let us know if we can help in any other way.

Best regards,

Robert

by robertdemo (7.9k points)

416 questions

432 answers

437 comments

636 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories