Using Cypher From A Python Task

Morpheus has built in ways to allow the use of Cypher secrets in most tasks. To use a cypher secret in Python, you have to import a module from PyPI and use the task token in your lookup.

In the Python Task, put morpheus-cypher in the additional packages box and follow the example here:

from morpheuscypher import Cypher
c = Cypher(morpheus=morpheus)
mysecret = c.get("secret/test")

You’ll have to specify the URL and token if using a Python script from outside a Morpheus Python task, but that just means you can access secrets in the Morpheus Cypher from other systems. The module can be found here: GitHub - tryfan/python-morpheus-cypher