Skip to content

Reference

datalab-app-plugin-example

Attributes:

Name Type Description
__version__

__version__

__version__ = version('datalab_app_plugin_example')

ExampleDataBlock

Bases: DataBlock

Attributes:

Name Type Description
accepted_file_extensions
blocktype str
description str
name str
plot_functions
version

accepted_file_extensions

accepted_file_extensions = ('.txt',)

blocktype

blocktype: str = 'example'

description

description: str = 'An example block from the plugin template. All of this information should be rewritten by plugin authors.'

name

name: str = 'Example Block'

plot_functions

plot_functions

version

version = __version__

plot_fake_scatter

plot_fake_scatter(filename: str | Path | None = None)

Creates a fake scatter plot and stores it in the database, using any provided filename or attached data as the plot title.

Parameters:

Name Type Description Default
filename str | Path | None

The name of the file to use as the plot title. If None, it will attempt to retrieve the file information from the database using the file_id stored in self.data.

None