Skip to main content

WayScript gives you flexible building blocks to seamlessly integrate, automate and host tools in the cloud.

Project description

WayScript Python SDK

PyPI version CircleCI Status

A new way to build software.

  • WayScript gives you flexible building blocks to seamlessly integrate, automate and host tools in the cloud. Unlock new potential with drag and drop programming.

  • Instantly connect to hundreds of datasets including GitHub, Twitter, databases, ecommerce data, or build your own integration. WayScript can read data from Excel, Google Sheets, and an evergrowing list of third-party APIs.

  • Seamlessly migrate to the cloud: Generate interfaces, instantly share, and run via event-based triggering.

Installation

pip install wayscript

Basic Usage

  1. Get the API Key from your WayScript user profile page

  2. Run your WayScript programs from your Python code:

from wayscript import WayScript

api_key = 'YOUR_API_KEY'
wayscript = WayScript( api_key )

# Run a program by id
program_id = 1234
wayscript.run_program( program_id )

# Pass variables to a program (optional)
variables = [ 'one', 'two', 'three' ]
wayscript.run_program( program_id, variables = variables )

# Run a specific function within your program (optional)
function = 'My Function'
wayscript.run_program( program_id, variables = variables, function = function )

# Run a program asynchronously (optional)
wayscript.run_program( program_id, run_async = True )
wayscript.run_program( program_id, variables = variables, function = function, run_async = True )

# Get the response from the server
response = wayscript.run_program( program_id )

⭐ In order to run a program using the WayScript Python API, you must first add an active Webhook Trigger to that program.

Running a specific function

  • The function you specify MUST have an active Webhook Trigger.
  • If you do not specify a function name in your request and your program has one function with a Webhook Trigger, the function with the Webhook Trigger will run.
  • If you do not specify a function name in your request and your program has multiple functions with Webhook Triggers, you will be asked to specify which function you would like to run.

Run a WayScript program from command line

WS_API_KEY="YOUR_API_KEY"
PROGRAM_ID=1234
ARGUMENT="whatever"
FUNCTION="My Function"

python -c "from wayscript import WayScript; WayScript('$WS_API_KEY').run_program($PROGRAM_ID, '$ARGUMENT', '$FUNCTION')"

If you don't want to use Python on the command line, you can use curl. (See the WayScript REST API documentation.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wayscript, version 0.0.3
Filename, size & hash File type Python version Upload date
wayscript-0.0.3.tar.gz (3.9 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page