.. include:: ../common.txt .. _custom_execution_environments: ###################### Execution Environments ###################### The Execution Environment is the Python environment in which the |SNIPPET_FRAMEWORK| runs every Dynamic Application snippet. When you build a custom Execution Environment for a PowerPack, you decide which libraries are installed in it. The default set of libraries includes one ``silo-low-code-steps-*`` library for each family of :ref:`Steps ` (for example, ``silo-low-code-steps-ssh``), along with every transitive dependency those Steps need. If your PowerPack or Dynamic Application does not use a family of Steps, you can leave that ``steps`` library, and the dependencies only it requires, out of your Execution Environment. .. _ee_trimming: ******** Trimming ******** Trimming is the method for creating a custom Execution Environment: you start from the default set of libraries and remove the ``steps`` libraries (and the dependencies only they require) that your PowerPack or Dynamic Application does not use. .. important:: Always duplicate (copy) the Execution Environment before you make any changes, and make your adjustments to the copy only. Never trim the original Execution Environment, so that you can always return to the original set of libraries. Benefits of Trimming ==================== * **Smaller PowerPack**: every library in the Execution Environment is packaged into the PowerPack. Removing unused libraries (for example the compiled ``ssh2-python`` and ``gevent`` wheels used only by the ``ssh`` Steps) reduces the size of the PowerPack that you build, upload, and distribute. * **Faster snippet execution**: every ``silo-low-code-steps-*`` library that is installed registers all of its Steps each time a snippet executes, whether or not the snippet uses them. Removing a ``steps`` library that you do not use removes that registration work (and the imports it triggers) from every snippet execution. * **Smaller dependency surface**: fewer installed libraries means fewer libraries to track for vulnerabilities and version conflicts. .. note:: Trimming is optional. Only remove a ``steps`` library when you are certain that no Dynamic Application in the PowerPack, and no :ref:`custom step ` it ships, uses any Step provided by that library. A snippet that references a Step that is not installed fails when it runs. What Can Be Removed =================== Each row below lists a ``steps`` library, the Steps it provides, and the libraries to remove if you do not use any of those Steps. The libraries to remove are the ``steps`` library itself plus the transitive dependencies that no other library remaining in the Execution Environment requires. You can remove any combination of rows. .. warning:: Never remove ``silo-low-code-steps-standard``. Removing it prevents the ``low_code`` syntax from being registered, and snippet arguments that use it will not run. .. list-table:: :header-rows: 1 :widths: 20 25 40 15 * - Steps library - Steps it provides - Libraries to remove if unused - Total libraries * - ``silo-low-code-steps-cli==3.2.1`` - * ``parse_line`` * ``parse_sectional_rows`` * ``parse_proc_net_snmp`` * ``parse_ifconfig`` * ``parse_split_response`` * ``parse_table_row`` * ``parse_table_column`` * ``parse_netstat`` * ``ntc`` * ``textfsm`` * ``regex_select_table`` * ``select_table_item`` * ``format_remove_unit`` * ``format_build_string`` - * ``silo-low-code-steps-cli==3.2.1`` * ``ifconfig-parser==0.0.5`` * ``ntc-templates==4.4.0`` * ``textfsm==1.1.3`` - 4 * - ``silo-low-code-steps-jmx==0.4.1`` - * ``jmx`` - * ``silo-low-code-steps-jmx==0.4.1`` * ``jmxquery==1.1.0`` - 2 * - ``silo-low-code-steps-prometheus==1.1.3`` - * ``promql`` * ``promql_vector`` * ``promql_matrix`` * ``aggregation_percentile`` * ``aggregation_mean`` * ``aggregation_mode`` * ``aggregation_median`` * ``aggregation_max`` * ``aggregation_min`` - * ``silo-low-code-steps-prometheus==1.1.3`` - 1 * - ``silo-low-code-steps-rest==4.3.0`` - * ``http`` * ``paginator_offset`` - * ``silo-low-code-steps-rest==4.3.0`` - 1 * - ``silo-low-code-steps-snmp==0.3.4`` - * ``snmp`` - * ``silo-low-code-steps-snmp==0.3.4`` - 1 * - ``silo-low-code-steps-ssh==3.2.0`` - * ``ssh`` - * ``silo-low-code-steps-ssh==3.2.0`` * ``silo-ssh-requests==0.8.1`` * ``parallel-ssh==2.16.0.post1`` * ``gevent==26.8.0`` * ``greenlet==3.5.5`` * ``zope-event==6.2`` * ``zope-interface==8.6`` * ``ssh-python==1.2.0.post1`` * ``ssh2-python==1.2.0.post1`` - 9 * - ``silo-low-code-steps-winrm==0.2.1`` - * ``winrm`` * ``powershell`` - * ``silo-low-code-steps-winrm==0.2.1`` * ``pywinrm==0.5.0`` * ``pykerberos==1.2.4`` * ``requests-ntlm==1.3.0`` * ``pyspnego==0.12.2`` - 5 Removing Libraries ================== Libraries are removed manually from a custom Execution Environment using the |PRODUCT_NAME| Execution Environment Manager in the user interface.