๐Ÿ–ผ๏ธ Assets

Expose assets by URL.

Add

Copy in production this current file as an asset (file) and allow yourself to get it by calling the returned URL.

naas.assets.add()

You will get URL who downloads this current file when you open it.

screenshot-add-asset

Other files

If you want to add another file than the current one, give a path:

naas.assets.add("path/to/my/super/data.csv")

Parameters

inline : Get a response in your web browser instead of downloading the result.

params = {"inline": True}
โ€‹
naas.assets.add(params=params)

Debug

naas.assets.add(debug=True)

List

You can list all version of a file pushed into the production:

Current file

naas.assets.list()

Other file

naas.assets.list(path="path/to/my/super/data.csv")

Get

You can get a version of a file pushed into the production:

Get the last one

naas.assets.get()

With a file path

naas.assets.get(path="path/to/my/super/data.csv")

With history id

naas.assets.get(histo="20201008101221879662")

Combined

naas.assets.get(path="path/to/my/super/data.csv", histo="20201008101221879662")

Clear

You can clear the previous version of a file pushed into the production:

One

naas.assets.clear(histo="20201008101221879662")

Other Notebook

naas.assets.clear(path="path/to/my/super/data.csv", histo="20201008101221879662")

All

naas.assets.clear()

All for filepath

naas.assets.clear(path="path/to/my/super/data.csv")

Delete

You can remove any scheduler capability like that, it takes optionally a path.

Current

naas.assets.delete()

Other file

naas.assets.delete(path="path/to/my/super/data.csv")

Debug

naas.assets.delete(debug=True)

List Assets

You don't remember how many Assets notebook you have?

Simple

naas.assets.currents()

Raw result

naas.assets.currents(raw=True)