Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

Table of Contents
maxLevel3

Step 1 - Adding psutil dependency

Open requirements.txt and add psutil==5.9.4 as follows:

Code Block
titlerequirements.txt
linenumberstrue
#
# Specify any third-party Python modules that should be bundled with the
# extension. uip-cli will automatically download and bundle the modules
# upon running `uip build` or `uip push`. 
#
# Refer to https://pip.pypa.io/en/stable/reference/requirements-file-format/
# for the expected format.
#

requests==2.28.2
psutil==5.9.4

In addition to modifying requirements.txt, we will also need to modify src/extension.yml as follows:

Code Block
themeConfluence
titleextension.yml
linenumberstrue
extension:
  name: ue-task
  version: "1.0.0"
  api_level: "1.4.0"
  requires_python: ">=2.6"
  zip_safe: false
owner:
  name: Stonebranch
  organization: Stonebranch Inc.
comments: |
  Created using ue-task template

On line 6, the zip_safe property was set to false. This must be done, anytime an Extension uses a third party dependency requiring the C runtime (e.g. psutil).

Step 2 - Using the psutil dependency

...

On lines 43, we print the result of psutil.test()

< Previous     Next >