Registering your license
When you first install the software on your system, and after running your first script, WbW should initialize a trial license, as it did in the output from the previous section. While this allows you to use WbW without restrictions for the trial period, after this time you'll need to purchase a license from www.whiteboxgeo.com and register it to continue to use the software. An annual license only costs US$10 per seat and you may purchase multiple seats at the same time. After the purchase, you'll be redirected to a website providng you with an activation key. If you've purchased multiple seats, you'll be provided a single activation key that contains your purchased number of seats.
Be sure to copy your activation key, or the embedded Python script, before closing the redirect page. You will need this to activate your license.
To register your license, you need run the following Python script:
import whitebox_workflows as wbw # Be sure to replace the key below with your issued key; this one is just an # example. Also update with your first and last name and email address. Note, # by running the script, you are agreeing to the terms of the license, found # on www.whiteboxgeo.com wbw.activate_license( key="889d88d3c7ccc6c9d3ccc9cad3c8d3ced3cecbc6cbcfd3cbcacdc6c7d3cec9c9cec8c8cfc", firstname="Jane", lastname="Doe", email="email@example.com", agree_to_license_terms=True )
Node-locked and floating licenses
When you register your license, WbW writes information about your license on your computer. This will allow you to use WbW on your computer at any time, even when you are not connected to the Internet. This is a so-called 'node-locked' license (i.e., it is tied to a specific computer). However, when you register your license, you will also be sent an email confirming the registration. This email will contain a floating-license user ID, which consists of a three-word string, e.g. 'white-bolting-camel'. This string connects your floating license with the WbW license server and allows you to use WbW on any computer or computing environment (e.g., Google Colab or Jupyter Notebooks).
Notice, it is important that use your correct email when registering your license or you will not be able to access your floating-license user ID and you will only be able to use the node-locked license on the computer system that you registered WbW from.
Using your floating license is easy. Instead of using the usual means of intializing a WbEnvironment:
import whitebox_workflows as wbw # Checks for a valid node-locked WbW license stored locally wbe = wbw.WbEnvironment()
You simply need to specify your floating-license user ID as an optional parameter, being sure to check-in the license when you have completed:
import whitebox_workflows as wbw # Checks for a valid floating license stored on remote server wbe = wbw.WbEnvironment('your-license-id') try: # Do some processing here... except Exception as e: print("The error raised is: ", e) finally: wbe.check_in_license('your-license-id')
When you specify your floating-license user ID in the WbEnvironment initializer, the program will communicate with the Whitebox Geospatial Inc. remote license server web app. This requires Internet access. Thus, if you are unable to access the Internet for a time, you should fall back on your node-locked license instead.
Your floating-license user ID is unique to you and you should keep this string private. Sharing your user ID with other people will result in the early termination of your license.
How much time remains on my license?
To determine how much time is remaining on your license, you may use the
import whitebox_workflows as wbw # on the host machine with the node-locked license... print(whitebox_workflows.license_info()) # or for a floating license... print(whitebox_workflows.license_info('white-bolting-camel')) # specify your floating-license user ID
Transfering and deactivating licenses
Licenses are transferable, if for example you would like to move your node-locked license to a different system. For this, you need to use the
wbw.transfer_license() method, which will issue you a new activation key, with the number of days remaining on your license; you may then use the issued key to register WbW on the other machine. Transfering a license will deactivate the license on the current computer.
import whitebox_workflows as wbw wbw.transfer_license() # Note, this function will print out the information that you will need to register the # license on another computer, including the required activation key. Also note that # after the license has been transferred, there may be a print out that says something # like, "The data in the license file appears to be corrupt..." This is simply because # after transfering the license, WbW can no longer be used on this current machine, # without registering another license. In fact, if you would like to re-register it # on the current computer using the issued activation code, that will work fine too.
wbw.deactivate_license() method is used to deactivate a license, although note that this simply removes the license but does not uninstall WbW from your system. To uninstall the software, use
pip uninstall whitebox-workflows.
For a demonstration of the registration process, please see the video below: