Create a Python Connection

Before creating a new Python Read Connector, first create a new Python Connection.

A custom Python Connection can contain any code to be shared with a read connector.

Similarly, a Credential for a Python Connection can contain any text, code, or key-value pair a long as the code inserted into the Python Connection and/or Read Connector can parse it.

Step 1: Create a new connection.

  • From the Build pane, select Read Connector
  • Next, select + New Connection.
  • Select Python from the Custom category.

Step 2: Configure your Connection.

  • Complete the required configurations for your new connection.
  • Define any shared custom Python for Python Read Connectors that are created with this connection to access.
  • indicate additional PIP packages to install with this connection. PIP packages should be space delimited. Ex. requests python-dateutil.

Step 3: Create new credentials.

  • If the Requires Credentials checkbox is marked, select an existing Python credential or create a new one.
  • In Custom Credentials, insert your credentials. Credentials can be in any format (JSON formatted text, key/value pair, etc.) as long as the Python code can parse the content within the credential.
    • An example of JSON formatted text. This text can be parsed in a Python Connector like context example
      {  
        "username": "example_user",  
        "password": "secret"  
      }
      

πŸ‘

External Keys and Secrets Management

Ascend Custom Python Credentials also allows you to call external Keys and utilize and secrets manager within your Credentials. The external key can be added to Credentials in any format. See Developing Your Python Connector to learn how to pass the key into your code.

Step 4: Test and launch your Connection.

  • Select the TEST CONNECTION button to check whether the Python connection can be parsed with the supplied code and credentials.
  • If a green check appears with ALL PASS, select CREATE.

🚧

Running TEST CONNECTION will run the code and attempt to parse any defined functions.