Skip to main content

Blocks for sier2

Project description

This library provides useful blocks for sier2.

A block is implemented as:

class MyBlock(Block):
    ...

The Block class inherits from param.Parameterized, and uses parameters as described at https://param.holoviz.org/user_guide/Parameters.html. There are three kinds of parameters:

  • Input parameters start with in_. These parameters are set before a block is executed.

  • Output parameters start with out_. The block sets these in its execute() method.

  • Block parameters start with block_. These are reserved for use by blocks.

A typical block will have at least one input parameter, and an execute() method that is called when an input parameter value changes.

class MyBlock(Block):
    in_value = param.String(label='Input Value')
    out_upper = param.String(label='Output value)

    def execute(self):
        self.out_value = self.in_value.upper()
        print(f'New value is {self.out_value}')

The block parameter block_pause_execution allows a block to act as an “input” block, particularly when the block hsa a GUI interface. When set to True and dag execution reaches this block, the block’s prepare() method is called, then the dag stops executing. This allows the user to interact with a user interface.

The dag is then restarted using dag.execute_after_input(input_block) (typically by a “Continue” button in the GUI.) When the dag is continued at this block, the block’s execute() method is called, and dag execution continues.

Many blocks are optimised for use with Panel, and have a specified __panel__ method. This should return a panel-interpretable object which is displayed within a card when used in a PanelDag. If __panel__ is not defined, the in_ params will be used to automatically generate one.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sier2_blocks-0.13.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sier2_blocks-0.13-py2.py3-none-any.whl (12.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sier2_blocks-0.13.tar.gz.

File metadata

  • Download URL: sier2_blocks-0.13.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.2 Linux/5.15.180-123.192.amzn2.x86_64

File hashes

Hashes for sier2_blocks-0.13.tar.gz
Algorithm Hash digest
SHA256 4cf8e9f6e5f8755c7199ed3b82406427351ba9267da2f7c0e58ba8ed14063639
MD5 0cb063720f94ef57ef15638a06c0f747
BLAKE2b-256 ee7258cf91a442d4228e3522723638995d306d725713a1d7e60bd7123285ff0b

See more details on using hashes here.

File details

Details for the file sier2_blocks-0.13-py2.py3-none-any.whl.

File metadata

  • Download URL: sier2_blocks-0.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.2 Linux/5.15.180-123.192.amzn2.x86_64

File hashes

Hashes for sier2_blocks-0.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4770816b971b4dff91edb7847f43906a95226e1996aba0026c4ff7d905bb958a
MD5 f2966efc2d20f3710a93c195217ffdd1
BLAKE2b-256 18e1e4012aaf37b5f966eba52a577ac6d6842f05c835ac9945a1127ef91bd402

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page