Renga CLI and SDK for Python¶
A Python library for the Renga collaborative data science platform. It lets you perform any action with
renga
command or from withing Python apps - create projects, manage
buckets, track files, run containers, etc.
This is an experimental developer preview release.
Installation¶
The latest release is available on PyPI and can be installed using
pip
:
$ pip install renga
The development version can be installed directly from the Git repository:
$ pip install -e git+https://github.com/SwissDataScienceCenter/renga-python.git#egg=renga
For more information about the Renga API see its documentation.
Getting started¶
To instantiate a Renga client from a running notebook on the platform, you
can use from_env()
helper function.
import renga
client = renga.from_env()
You can now upload files to new bucket:
>>> bucket = client.buckets.create('first-bucket')
>>> with bucket.files.open('greeting.txt', 'w') as fp:
... fp.write('hello world')
You can access files from a bucket:
>>> client.buckets.list()[0].files.list()[0].open('r').read()
b'hello world'
For more details and examples have a look at the reference.