You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2022. It is now read-only.
*WayScript gives you flexible building blocks to seamlessly integrate, automate and host tools in the cloud. Unlock new potential with drag and drop programming.
7
+
WayScript allows you to run Python in the cloud, and seamlessly integrate with your favorite APIs.
8
8
9
-
* 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.
10
-
11
-
* Seamlessly migrate to the cloud: Generate interfaces, instantly share, and run via event-based triggering.
9
+

12
10
13
11
## Installation
14
12
@@ -18,52 +16,57 @@ pip install wayscript
18
16
19
17
## Basic Usage
20
18
21
-
1. Get the API Key from your WayScript user profile page
19
+
1. Add one or more [HTTP Triggers](https://docs.wayscript.com/library/triggers/http-trigger) to your script.
20
+
21
+
2. If you have a [password-protected endpoint](https://docs.wayscript.com/library/triggers/http-trigger#password-protect-your-endpoints), obtain your API key or the credentials you would like to use.
22
+
23
+
3. If you have specified a [custom endpoint](https://docs.wayscript.com/library/triggers/http-trigger#endpoints), you will need the name of that endpoint as well.
22
24
23
-
2. Run your WayScript programs from your Python code:
25
+
4. If your HTTP Trigger takes [query parameters](https://docs.wayscript.com/library/triggers/http-trigger#request-query-parameters) and/or [JSON body parameters](https://docs.wayscript.com/library/triggers/http-trigger#request-json-body-parameters), you can pass those as a dictionary using the `params` and/or `data` arguments, respectively. (See [HTTP Trigger Outputs](https://docs.wayscript.com/library/triggers/http-trigger#outputs) for more information.)
26
+
27
+
5. Run your WayScript programs from your Python code:
24
28
25
29
```python
26
30
from wayscript import WayScript
27
31
28
-
api_key ='YOUR_API_KEY'
29
-
wayscript = WayScript( api_key )
32
+
# Create the WayScript client
33
+
wayscript = WayScript()
34
+
35
+
# If your program requires a password to run, supply those credentials when creating the client
⭐ In order to run a program using the WayScript Python API, you must first add an active [Webhook Trigger](https://wayscript.com/documentation/trigger/webhook_trigger) to that program.
52
-
53
-
### Running a specific function
54
-
55
-
- The function you specify MUST have an active [Webhook Trigger](https://wayscript.com/documentation/trigger/webhook_trigger).
56
-
- 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.
57
-
- 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.
If you don't want to use Python on the command line, you can use `curl`. (See the WayScript [REST API documentation](https://wayscript.com/documentation/apis/rest_api).)
72
+
If you don't want to use Python on the command line, you can use `cURL`. (See the [HTTP Trigger Sample Code](https://docs.wayscript.com/library/triggers/http-trigger#sample-code) for an example.)
0 commit comments