Developing Flows

If your organization develops and customizes flows, you can give your System Admins additional permissions by adding the “.env” file variables described in the sections below.

Uploading blocks and editing Custom Code Blocks

By default, the ALLOW_CODE_UPLOAD “.env” file variable is set to true, which allows System Admins to upload flow blocks and edit the code for Custom Code Blocks. If you want to prevent System Admins from completing these tasks, set ALLOW_CODE_UPLOAD to false.

To learn more about uploading flow blocks, contact your Hyperscience representative.

For more information on editing code in Custom Code Blocks, see Modifying Custom Code Blocks.

Managing third-party Python packages (v34 and later)

If developers at your organization are creating custom blocks for your flows, they may want to install custom Python packages to add features to the blocks. System Admins can install and manage these packages on behalf of your developers.  

Viewing installed Python packages 

To find out which Python packages are currently installed in your application, go to Flows > Python Packages.

PythonPackagesTable.png

The Python Packages table contains the following information for each package:

  • The package's name. If information about the package is available on an external website, clicking the name redirects you to that website.
  • Whether the package was pre-installed, or, if it was not, the date and time it was added
  • The version of the package
  • If the package was not pre-installed, links to download or delete the package

You can use the Search text box at the top of the page to search for a specific package by its name. You can also sort the table by the names of the packages and the dates they were added.

Adding packages

While several Python packages are installed in the Hyperscience application by default, developers at your organization may want to upload additional packages to meet their flow-development needs. If you are a System Admin, you can edit the application's ".env" file to allow the uploading of these packages. Then, you can upload custom Python packages on behalf of your developers.

Package requirements

The packages you install must be compatible with Python 3.7. If the package has any dependencies, you must also install those packages.

Enable package uploading in the application

Your application may already allow you to upload Python packages. To find out, go to Flows > Python Packages.

  • If the message at the top of the page ends with "To add more packages, upload through the 'Add Packages' button," your application already has package uploading enabled. You do not need to make any changes to your application's ".env" file, and you can follow the steps in Upload custom Python packages below.

YouCanImportPythonPackages.png

  • If the message at the top of the page ends with "Adding packages is currently disabled. Set HS_ALLOW_EXTERNAL_PYTHON_PACKAGES_UPLOAD to enable," you need to update your application's ".env" file before uploading packages.

PythonPackagesCannotImport.png

To enable package uploading in the application:

  1. Add the HS_ALLOW_EXTERNAL_PYTHON_PACKAGES_UPLOAD variable to your ".env" file and set it to true.
  2. After you've updated the ".env" file, go to Flows > Python Packages, and make sure the message at the top of the page ends with "To add more packages, upload through the 'Add Packages' button."
    • If it does, you can follow the steps in Upload custom Python packages below to begin uploading packages.
    • If it does not, double-check the content of your ".env" file to make sure you entered the new variable and its value correctly.

Upload custom Python packages

The steps in the upload process depend on which version of Hyperscience you are using.

v35 and later

  1. Go to Flows > Python Packages, and click Add Packages.

  2. Do one of the following:
    • Drag and drop the package's wheel (.whl) file into the Add Python Packages dialog box.
    • Click Choose Files, and find and open the package's wheel (.whl) file on your machine.

  3. If you would like to upload additional packages, click Add More Files to drag-and-drop or open more files. Otherwise, click Upload.

The package appears in the Python Packages table.

v34

Follow the steps outlined in our Flows SDK documentation.

Updating Python packages (v35 and later)

You cannot update pre-installed packages.

If you would like to update a Python package that you’ve installed in your application, you can do so by following the steps below:

  1. Go to Flows > Python Packages, and click Add Packages.

  2. Do one of the following:
    • Drag and drop the updated package's wheel (.whl) file into the Add Python Packages dialog box.
    • Click Choose Files, and find and open the updated package's wheel (.whl) file on your machine.

  3. If you would like to update additional packages, click Add More Files to drag-and-drop or open more files. Otherwise, click Upload.

  4. For each updated package, you are asked to confirm whether or not you want to overwrite the current package with its new version. To do so, click Confirm.

    The package's Date Added and Version values are updated in the Python Packages table.

Downloading packages

You can download individual or all Python packages installed in your application.

Download all packages

Downloading all packages in your application can help your developers know exactly which packages are available to them as they develop flows for your organization.

To download all the packages installed in your application, go to Flows > Python Packages, and click Download All Packages.

The downloaded file contains both pre-installed packages and any custom packages you've uploaded. The file's name is in the format python_packages_MMDD-HHMMSS.zip, where MMDD is the month and date of the download and HHMMSS is the hour, minutes, and seconds of the download's time in UTC time.

Download an individual package

You cannot download individual pre-installed packages. To download pre-installed packages, follow the steps in Download all packages.

You can download individual packages that you've previously uploaded. This process can be helpful when migrating your custom packages from one environment to another.

To download an individual package, go to Flows > Python Packages, and click the Download Package button ( DownloadModelIcon.png ) in the package's row in the table.

The downloaded file's name matches the name of the uploaded wheel file.

Deleting a custom package

You cannot delete pre-installed packages.

If you no longer need a custom package, you can delete it from the application.

v35 and later

Go to Flows > Python Packages, and click the Uninstall Package button ( DeleteAccountAPIAccount.png ) in the package's row in the table.

v34

Follow the steps outlined in our Flows SDK documentation.

Was this article helpful?
0 out of 0 found this helpful