Package: vantiqPythonExecConnector
Vantiq Python Execution ConnectorTheVantiqPython Execution Connector is a Python package that provides the ability
to execute Python code as directed by a Vantiq serverInstallationThe connector is installed from the PyPI repo.  To install this into your system,
usepip install vantiqPythonExecConnectorNote: depending on your local environment, you may need to usepip3instead ofpip, or whatever is appropriate to install into your
virtual environment.The Vantiq Python Execution Connector requires Python version 3.10 or better.Quick StartConnector ConfigurationYou will need valid credentials on a Vantiq server in the form of an
access token.  If you have a private Vantiq server,
contact your administrator for credentials.  If you wish to use the
Vantiq public cloud, contactsupport@vantiq.com.The information required is placed in aserver.configfile in theserverConfigdirectory below the working directory from which the connector will be run. The format is as follows:targetServer = ...
authToken = ...
sources = ...An example file might betargetServer = https://dev.vantiq.com
authToken = _cDWBfZLNO9FkXd-twjwKnVIBZSGwns35nF4nQFV_ps=
sources = pythonSourceFor users who may not want to write theauthTokenproperty to a file because of its sensitive nature, set the environment variableCONNECTOR_AUTH_TOKENto its value. If theauthTokenis specified in theserver.configdocument, that value will take precedence.
Otherwise, if theauthTokenis not set in the configuration file, the system will retrieve whatever value is provided in the environment variable.Note that this token will not work -- you will need to create your own
within a VANTIQ installationYou should also provide an appropriatelogger.inifile in the same directory.
An example file is provided atsrc/test/resources/logger.iniin this project's github repository.Running the ConnectorOnce you have the connector configuration (serverConfig/server.config) and logging configuration (serverConfig/logger.ini) files set up, you can run the connector using the commandvantiqPythonExecConnectorOn startup, the connector will connect to the configured Vantiq server awaiting calls to run Python code. No other interaction is necessary.DocumentationFor the full documentation on the SDK, see the documentation available at the github repository.  This README file provides the basics;  more detailed information is available indocs/Usage.md.DevelopersThe project is set up as agradleproject.  To run the tests, use./gradlew testor./gradlew.bat testin a Windows environment.The tests run will run a mocked version. To execute tests against aliveserver,
define the following gradle properties:# Python project valuesTestVantiqServer=<Vantiq server url>TestAccessToken=<access token from that Vantiq system>TestVantiqUsername=<Vantiq user name>TestVantiqPassword=<Password for that Vantiq user>Alternatively, when running directly, use the following environment variables:VANTIQ_URL <Vantiq erver url>
VANTIQ_ACCESS_TOKEN <Access token from that Vantiq system>
VANTIQ_USERNAME <Vantiq user name>
VANTIQ_PASSWORD <Password for that Vantiq user>Copyright and LicenseCopyright © 2022 Vantiq, Inc.  Code released under theMIT license.The MIT License (MIT)Copyright (c) 2022 Vantiq, Inc.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.