<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Derrick Sherrill</title>
    <description>The latest articles on Forem by Derrick Sherrill (@derricksherrill).</description>
    <link>https://forem.com/derricksherrill</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F185410%2Fb7540d7f-8da5-4650-b080-7152160d6b1e.png</url>
      <title>Forem: Derrick Sherrill</title>
      <link>https://forem.com/derricksherrill</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/derricksherrill"/>
    <language>en</language>
    <item>
      <title>How to Automatically Execute Python Code Based on Datadog DevOps Alerts</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Wed, 14 Apr 2021 20:11:26 +0000</pubDate>
      <link>https://forem.com/wayscript/how-to-automatically-execute-python-code-based-on-datadog-devops-alerts-3f44</link>
      <guid>https://forem.com/wayscript/how-to-automatically-execute-python-code-based-on-datadog-devops-alerts-3f44</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today’s video, we’re going to take a look at how to setup the Datadog Trigger in WayScript and how to use it. Datadog is a powerful monitoring program that can be utilized in many different ways through WayScript, including triggering code executions and more. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;For this tutorial we’ll simply explore how to set up and connect a Datadog account to WayScript. First, we’ll add the Datadog Trigger module to our program tree. We’ll need to authenticate the account using an API key. To do this, navigate to the toolbar at right and select the button with three bars; from here, click “Add Account.”  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kydWlc0x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kydWlc0x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/1.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here, you will need a nickname, and API key, and an Application key.  &lt;/p&gt;

&lt;p&gt;To get the API and Application keys, visit the Datadog HQ and access your API key. The Application key can also be found here. You can create a new Application key to use solely for this program. Remember to keep both of these keys hidden and don’t share them with others. Paste both of these keys in the right toolbar in WayScript. Now, WayScript has access to your Datadog account.  &lt;/p&gt;

&lt;p&gt;After clicking “Update” and the refresh button in the toolbar, select your preferred organization. Next, turn on events in the toolbar by activating the toggle switch. To activate the trigger, switch the toggle within the Trigger module in the tree. Now, we’ve activated the Datadog Trigger module within WayScript. However, we need to visit the Datadog HQ website to take care of a few more things before we can start using it.  &lt;/p&gt;

&lt;p&gt;First, we’ll go to the Monitors tab on the website. For our account, we already have one running titled Demo Events. Clicking on this we see that we’re sending notifications to @webhook-wayscript-datadog-trigger. We can then copy this, go back to the Monitors tab, and create a new monitor. There are many different things we can monitor using various monitor types, like Events, Custom Checks, and Networks. We’ll monitor an event for this tutorial.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xl57Ukvt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xl57Ukvt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/3.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For our new event monitor, we’re just sending an event when a user uses an application built through Heroku and hosted on GitHub. We have a default string that says “something big has happened,” so we’ll type “something big” in the “Match events containing” text box to match our string. Next, we’ll set alert conditions above zero, and then in the text box at the bottom we’ll type “Notify” and pass in the @webhook-wayscript-datadog-trigger from earlier.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tXTz-imt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tXTz-imt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/190/2.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now add a title and click save, and the new monitor will be found in the monitors tab. We’re now ready to start using Datadog for a number of other applications within WayScript.  &lt;/p&gt;

&lt;p&gt;Having the ability to use Datadog within WayScript adds even more usability to the program. We can use Datadog to monitor our program and automatically trigger code executions to solve any issues that may arise, along with many other potential uses. Stay tuned for future tutorials using the Datadog trigger!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Pandas Data Frames to Process Spreadsheet Data -- All in the cloud! | Try WayScript Development Hub</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Mon, 01 Mar 2021 13:55:57 +0000</pubDate>
      <link>https://forem.com/wayscript/using-pandas-data-frames-to-process-spreadsheet-data-all-in-the-cloud-try-wayscript-development-hub-4d8l</link>
      <guid>https://forem.com/wayscript/using-pandas-data-frames-to-process-spreadsheet-data-all-in-the-cloud-try-wayscript-development-hub-4d8l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Pandas is a great data analysis tool to use, and WayScript provides users the ability to use pandas within the WayScript platform and in conjunction with several other modules. This article will detail how we manipulate pandas dataframes and pass them into other modules to use within our script. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;The first thing we’ll do for this script is create sample data by using the Create Variable module. These data will be used in the dataframe we’ll create later. In the toolbar at the left, we’ll create two simple lists; the first will contain numbers and the second will just contain a string of letters.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YOGT8HFD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YOGT8HFD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/1.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, add a Python module and open the editor to input custom code.  &lt;/p&gt;

&lt;p&gt;The first line of code will import pandas by simply using:  &lt;/p&gt;

&lt;p&gt;import pandas as pd  &lt;/p&gt;

&lt;p&gt;Now we need to create Python variables from the variables we created in WayScript earlier. This can be done with the following code:  &lt;/p&gt;

&lt;pre&gt;
list_a = variables[‘list_a’]
list_b = variables[‘list_b’]
&lt;/pre&gt;

&lt;p&gt;The next few lines of code will begin creating the dataframe. First, we need to adjust the data so that it can be read correctly. Then, we’ll create the dataframe and print it. &lt;/p&gt;

&lt;pre&gt;
data = {‘numbers’ : list_a, ‘letters’ : list_b}
df = pd.DataFrame(data) 
print(df)
&lt;/pre&gt;  
  

&lt;p&gt;Once we run the code, the dataframe generates on the right of the screen.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jzHz9K51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jzHz9K51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/2.png" alt="tutorial step #2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a number of different manipulations you can perform on the data frame after you’ve created it. In this example, we’ll create a new column of values that multiplies each number in the “numbers” column by 5.  &lt;/p&gt;

&lt;pre&gt;
df[‘new_values’] = df[‘numbers’] \* 5  
&lt;/pre&gt;

&lt;p&gt;We can also write this dataframe to an Excel spreadsheet.  &lt;/p&gt;

&lt;pre&gt;
df.to_excel(‘sample.xlsx’)  
&lt;/pre&gt;  

&lt;p&gt;This will create a new Excel file in the File Manager. We can then access this spreadsheet by using an Excel module and selecting the file under the “Choose File to Read” drop-down menu. From here, you can import values just like you could with any other spreadsheet. We can also export specific columns of data and create new WayScript variables from them, using this code:  &lt;/p&gt;

&lt;pre&gt;
variables[‘new_list’] = df[‘new_values’].to_list()  
&lt;/pre&gt;

&lt;p&gt;Once run, the new variable will generate under the ones we created in the first step.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bDwipGCg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bDwipGCg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/180/3.png" alt="tutorial step #3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we can use this variable in any other module, just like the others.  &lt;/p&gt;

&lt;p&gt;This tutorial was just a quick example showing how easy it is working with panda dataframes within the WayScript platform. Not only can you manipulate the data, you can also seamlessly integrate it with other modules to get the most functionality for you and your business.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/team/tutorials/N-G9lEDb"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>wayscript</category>
      <category>tutorial</category>
      <category>startup</category>
    </item>
    <item>
      <title>Using WayScript to Automatically Monitor Volatile Stocks</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Tue, 23 Feb 2021 15:06:17 +0000</pubDate>
      <link>https://forem.com/wayscript/using-wayscript-to-automatically-monitor-volatile-stocks-1262</link>
      <guid>https://forem.com/wayscript/using-wayscript-to-automatically-monitor-volatile-stocks-1262</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The stock market has become all the rage recently, so in this article we’re going to take a look at how to create an automated script that tracks volatile stocks and provides updates of their status. This is a pretty quick and easy script that could result in big returns. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;The first step in this script is adding a Time Trigger module. This module triggers the script to run at a specified time interval. We could set the interval to every minute, ten minutes, and so forth. Since we’re tracking volatile stocks, we’ll set the interval in this example to every minute.  &lt;/p&gt;

&lt;p&gt;Next, we’ll add a Python module and enter code that gathers information on our stock and passes it. You can find pre-written code on our GitHub for this example, or you can simply clone this script and use the code there. We’ll run through the lines of code so you can see what is occurring.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tGR9NMOE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/181/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tGR9NMOE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/181/1.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first three lines of code import the pandas and Alpha Vantage libraries; the Alpha Vantage library is where we’ll pull stock market information from. The next line provides the API code for Alpha Vantage (disclaimer: Alpha Vantage may shut down this API code if you overuse it, so you may need to get your own from their website). The next few lines of code perform some general calculations on the data. The last lines tell the script to create a variable when there’s a 0.5% change in the last minute.  &lt;/p&gt;

&lt;p&gt;Now that we have this code, when we run it the variable that we created will appear as a stored WayScript variable. We’ll then add a Gmail module. In this module, we’ll link our accounts and then drag this variable into the “Email Body” text box. Once we activate the Time Trigger, the script will send us an email every minute if the stock experiences a 0.5% change within the previous minute.  &lt;/p&gt;

&lt;p&gt;This is an easy script to make if you want to stay up to date on your stocks without constantly checking your market apps. By getting a notification every time something major happens, you can spend more time focusing on other things. Now, you’ll never miss an opportunity to make informed decisions on your volatile stocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/user/derricks/UqdwSSRD"&gt;here&lt;/a&gt;. To use the code for this script, find it &lt;a href="//github.com/wayscript/code_snippets/blob/master/Python%20Programming%20in%20the%20Cloud/GME_Alerter.py"&gt;here&lt;/a&gt; on our GitHub.&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Using Third Party Libraries with WayScript's Code Editors</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Mon, 22 Feb 2021 18:30:21 +0000</pubDate>
      <link>https://forem.com/wayscript/using-third-party-libraries-with-wayscript-s-code-editors-2eca</link>
      <guid>https://forem.com/wayscript/using-third-party-libraries-with-wayscript-s-code-editors-2eca</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today’s article, we are going to use WayScript to import libraries in different programming languages. In fact, it's about the requirements of each programming language. When you want to use each language, there are some specific libraries to be precise.&lt;br&gt;&lt;br&gt;
It's easy to reference it when you are programming normally. However, with WayScript, there is always a file somewhere you can put the name of the libraries as dependencies and WayScript will automatically download it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Here are some content you might find useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/javascript" rel="noopener noreferrer"&gt;Working with JavaScript&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/python" rel="noopener noreferrer"&gt;Working with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/java" rel="noopener noreferrer"&gt;Working with Java&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python, Java and JavaScript
&lt;/h2&gt;

&lt;p&gt;While working with WayScript and writing a script, you can have access to the current directory of the project.&lt;br&gt;&lt;br&gt;
WayScript provides JavaScript, Python, and Java modules to write scripts. Add all the modules and I’ll show you how to add dependencies for the scripts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F1.png" alt="Adding Scripts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After adding the modules, you can see the editors of each language. And if you look closely in the files system, you can see the files which we’ll use to write the dependencies of each project. If you want to add dependencies, these requirements as you would in a pip Requirements File, using the Requirements File Format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F2.png" alt="Adding Python Scripts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to add dependencies, you can use the format you would for an npm-install command. Just write the dependencies in the js.dependencies file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F3.png" alt="Adding JavaScript Scripts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WayScript uses Maven to install dependencies. Declare these dependencies as you would any mvn dependency, in the format of groupId:artifactId:version. You can add these dependencies in the java.dependencies file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F176%2F4.png" alt="Adding Java Scripts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;. We're always around to help. If you want to work with the full script template, just find it &lt;a href="https://wayscript.com/user/mangabo_kolawole/xWm7LlX3" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wayscript.com/user/mangabo_kolawole/xWm7LlX3" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>java</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Create and Execute Shell Scripts Automatically with WayScript</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Mon, 08 Feb 2021 15:25:23 +0000</pubDate>
      <link>https://forem.com/wayscript/how-to-create-and-execute-shell-scripts-automatically-with-wayscript-291e</link>
      <guid>https://forem.com/wayscript/how-to-create-and-execute-shell-scripts-automatically-with-wayscript-291e</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Today’s tutorial is an excellent example for those new to script building in WayScript, as we’ll be creating a Shell script from scratch. This process only takes a minute to do and it’s a great way to become familiar with some of the tools WayScript offers. Additionally, if you’d like to use this script as a base to build off of you can simply clone the script using the link at the end of this tutorial. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;First, we’ll need to create a new script. This can be done by clicking the “+ New Script” button in the top right corner.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7CP8Ssjs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7CP8Ssjs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/1.png" alt="Tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This brings up the script tree editor. Here we can add different modules, write our own code, and more. One great aspect of WayScript is its ease of use; to add modules or triggers, simply click on the “add” buttons on the tree.  &lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll automate a simple Shell script. To do this, add a Time Trigger module at the top of the tree.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B6_72xEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B6_72xEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/2.png" alt="Tutorial step #2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within this module we can customize when the program runs. A toolbar generates on the left side, and in here there are multiple options to choose from: when to run the script, what time, and the specific time zone. This creates an easy way to automate any script.  &lt;/p&gt;

&lt;p&gt;Next, we’ll add the Shell Script module to write our code into. Once this module is added, we can write the script in a couple different ways. One way is to click on the editor button, which brings up a full screen editor. The other option is to simply type the code in the text box inside the toolbar.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xNbCRp3c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xNbCRp3c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/3.png" alt="Tutorial step #3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll just write a text file using the Shell script: echo "some data for the file" &amp;gt;&amp;gt; sample.txt Run the script by clicking the play button on the Time Trigger module. This generates a new file of sample.txt that can be found in the file browser.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JWff8zOi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JWff8zOi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/167/4.png" alt="Tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, to automate the entire script, simply activate the switch on the Time Trigger module.  &lt;/p&gt;

&lt;p&gt;In 60 seconds, we’ve effectively created a script that runs automatically using WayScript’s intuitive drag-and-drop interface. Hopefully, this example was a great introduction into the world of WayScript. Keep watch for even more tutorials on how to create a wide variety of scripts and get your own superpowers in the process!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/user/derricks/HKo43bSE"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>shell</category>
      <category>serverless</category>
      <category>startup</category>
    </item>
    <item>
      <title>Programmatically Write CSV Files using Pandas, Python, and WayScript</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Wed, 03 Feb 2021 17:36:52 +0000</pubDate>
      <link>https://forem.com/wayscript/programmatically-write-csv-files-using-pandas-python-and-wayscript-5ca7</link>
      <guid>https://forem.com/wayscript/programmatically-write-csv-files-using-pandas-python-and-wayscript-5ca7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Working with WayScript helps you automate simple tasks while you can focus on the important work.&lt;br&gt;&lt;br&gt;
Today, we’ll learn to use Python to programmatically write CSV files with pandas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;No prerequisites but some content you might find helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/triggers/time-trigger" rel="noopener noreferrer"&gt;Working with Time Trigger&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/python" rel="noopener noreferrer"&gt;Working with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/requests" rel="noopener noreferrer"&gt;Working with Requests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Time Trigger
&lt;/h2&gt;

&lt;p&gt;To make the script running, we’ll simply use a Time Trigger.&lt;br&gt;&lt;br&gt;
Add it as a Trigger and choose whatever time suits you best.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F1.png" alt="Adding the Trigger"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Requests
&lt;/h2&gt;

&lt;p&gt;WayScript provides a Requests module to easily make requests without having to write a single line of code. Add it as a new step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F2.png" alt="Adding the module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’ll make requests to &lt;a href="https://swapi.dev/" rel="noopener noreferrer"&gt;Star Wars API&lt;/a&gt;. We’ll fetch all the planets of the Star Wars Universe using this endpoint. &lt;a href="https://swapi.dev/api/planets/" rel="noopener noreferrer"&gt;https://swapi.dev/api/planets/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F3.png" alt="Configuring the module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it’s done we can write the Python Script to write the JSON data into a CSV file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python
&lt;/h2&gt;

&lt;p&gt;WayScript also provides a Python module to execute python scripts in our workflow. Add it as a new step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F4.png" alt="Adding the Python module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it’s added, we can write the script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F5.png" alt="Writing the script"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you run the script, you’ll notice a new file in the project directory. Well, it’s our CSV file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F6.png" alt="File in the directory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, here’s the content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F168%2F7.png" alt="Content of the CSV file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;. We're always around to help. If you want to work with the full script template, just find it &lt;a href="https://wayscript.com/user/mangabo_kolawole/O-inFqKo" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wayscript.com/user/mangabo_kolawole/O-inFqKo" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>startup</category>
      <category>python</category>
      <category>tutorial</category>
      <category>serveress</category>
    </item>
    <item>
      <title>How to Convert your Python Scripts into Hosted Applications in Minutes</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Mon, 25 Jan 2021 14:12:07 +0000</pubDate>
      <link>https://forem.com/wayscript/how-to-convert-your-python-scripts-into-hosted-applications-in-minutes-2k9n</link>
      <guid>https://forem.com/wayscript/how-to-convert-your-python-scripts-into-hosted-applications-in-minutes-2k9n</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today’s tutorial we’ll look at how versatile the WayScript platform is, along with showing you how easy it is to execute a local Python script in a WayScript program. Specifically, we’ll be using a Python script with a command line function and converting it into a program that uses a Form Trigger module. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;To begin, we have a local Python script with a command line argument that passes a website – in this case, wayscript.com – to the script.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Eaa_Zmty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/171/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Eaa_Zmty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/171/1.png" alt="Tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we’ll convert this local script into a WayScript program. This example uses a Form Trigger module that collects information from a hosted URL. You can customize the title, description, and more for the module in the left screen toolbar. Once activated, the form can be viewed in a new tab. Anything that is submitted in the form then gets stored as a WayScript input that’ll be used later.  &lt;/p&gt;

&lt;p&gt;Next, we’ll add a Python module to host the Python script we’ve already created. Copy the script and paste it in the code editor. The pasted code looks like this.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ART1xN04--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/171/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ART1xN04--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/171/2.png" alt="Tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to get the code to work in WayScript, we’ll simply delete the highlighted code and tab the rest back over. Now, instead of using a command-line argument with the code &lt;/p&gt;

&lt;pre&gt;
url = sys.argv[i]&lt;/pre&gt; we’ll drag the input that was created from our earlier form submission after the “url =” portion of the code. With that, the local Python script is now hosted in WayScript.  
  
Now that the local script is hosted on the WayScript platform, there are many more options you could add to the program. For example, if you wanted to return a status code 200 back to the user after they submitted a form, you could do it by adding this line of code to create a WayScript variable: 
&lt;pre&gt;
variables[‘string’] = status&lt;/pre&gt;

&lt;p&gt;Then, by adding an HTTP Response module and dragging the newly created variable into the “Response Content” box, it would return a status code 200.  &lt;/p&gt;

&lt;p&gt;There are plenty of other modules you could also use in this program. This is only one example of WayScript’s unique versatility. Start creating your own programs today and see just how much you can do!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/user/derricks/xVBKNBas"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>serverless</category>
      <category>startup</category>
    </item>
    <item>
      <title>Automatically Write Excel files using Python, Pandas, and WayScript </title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Fri, 22 Jan 2021 16:13:15 +0000</pubDate>
      <link>https://forem.com/wayscript/automatically-write-excel-files-using-python-pandas-and-wayscript-2lfd</link>
      <guid>https://forem.com/wayscript/automatically-write-excel-files-using-python-pandas-and-wayscript-2lfd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Using Python, pandas, and wayscript, we can programmatically write excel files and automate the executions in just a few minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;No prerequisites but some content you might find helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/triggers/time-trigger"&gt;Working with Time Trigger&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/python"&gt;Working with Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://docs.wayscript.com/library/modules/weather-api"&gt;Working with Weather API&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Time Trigger
&lt;/h2&gt;

&lt;p&gt;For this tutorial, we’ll use the Time Trigger module. It allows us to execute the WayScript at a time we’ll define. Add it as a new trigger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ypg0zifl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ypg0zifl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/1.png" alt="Time Trigger"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we can configure the Trigger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cRnMkRD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cRnMkRD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/2.png" alt="Configuring the Trigger"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Weather Data
&lt;/h2&gt;

&lt;p&gt;WayScript provides a Weather module to integrate Open Weather Map's current weather and forecasts. Then, we’ll be able to make get weather data from any city without writing a line of code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZtK3UA5E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZtK3UA5E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/3.png" alt="Adding the module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’ll get data from New York. Make sure you have JSON_DATA selected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T3T8S98J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T3T8S98J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/4.png" alt="Configuring the module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing to Excel using Python
&lt;/h2&gt;

&lt;p&gt;With WayScipt, we can also execute scripts written in Python. Here, we’ll use the pandas Python library to normalize our JSON_DATA and save it in an excel file. Add it as a new step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nC_V6d6t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nC_V6d6t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/5.png" alt="Adding the module"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can now write and execute the Python script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FbSmo-oO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FbSmo-oO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/6.png" alt="Python Script"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you execute the script, you’ll notice a new file in the directory of your project. Here’s mine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C2CBOZFb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C2CBOZFb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/169/7.png" alt="File system"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can download it &lt;a href="https://wayscript.com/file?token=IjQ5NzItNjEzIg.L-Rf8bVa_ATXh6pvA_yKwaB5Jgo"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;Discord&lt;/a&gt;. We're always around to help. If you want to work with the full script template, just find it &lt;a href="https://wayscript.com/user/mangabo_kolawole/G4lD3GHG"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wayscript.com/user/mangabo_kolawole/G4lD3GHG"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>startup</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Conditionals and Looping Tutorial in WayScript</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Tue, 12 Jan 2021 16:25:20 +0000</pubDate>
      <link>https://forem.com/wayscript/conditionals-and-looping-tutorial-in-wayscript-277e</link>
      <guid>https://forem.com/wayscript/conditionals-and-looping-tutorial-in-wayscript-277e</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Two really powerful programming tools used when creating programs in WayScript are conditionals and looping. These give users the ability to execute specific tasks automatically by simply inputting a module instead of writing code. In today’s tutorial, we’re going to look at how these two tools can be used in a simple example script. Keep reading to follow along!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;For this example, we’ll use the HTTP Trigger module to create a sign-up page that uses e-mail. Using this module in the left screen toolbar, create a variable called “email” by typing it into the input box under “Outputs.” Next, the Google Sheets module is added so that the information from the HTTP sign-up page can be passed into it. In the toolbar choose which file to write the information into, and then add the “email” variable. To finish this step, add the HTTP Response module so that the program passes the results to the webpage.  &lt;/p&gt;

&lt;p&gt;Now, add a function to the script by clicking on the plus button in the upper left corner of the screen. Your tree should now look like this.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---E7_gkRp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/156/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---E7_gkRp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/156/1.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s say we want to send a user an e-mail based on how much time has passed since they signed up on our created webpage. First, the Time Trigger module is added to the function. Then, we’ll use the same Google Sheet from earlier by adding the Google Sheets module and selecting the appropriate file. Next, rename and import the column headers; this then stores them as WayScript variables to be used later.  &lt;/p&gt;

&lt;p&gt;To loop over these variables the process is pretty straightforward. Simply add a Loop tool and choose the variables created from the column headers from the drop-down menu. Conditional statements are just as easy. Add the If tool below the Loop; this is an example of what that would look like.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p19PjUjI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/156/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p19PjUjI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wayscript.com/blog_img/156/2.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the toolbar, select the appropriate variable that you want to loop. This example uses the “days since signup” and the “is the same as” comparison, setting it equal to 1. Then, by adding the Gmail module underneath the If tool in the tree, an e-mail can be sent to the user that meets those criteria. Else If statements can also be added the same way as the If tool, creating another set of criteria with an attached action.  &lt;/p&gt;

&lt;p&gt;The options for using loop and conditional tools are endless, and this tutorial just provides a simple example of this. WayScript has the tools and versatility to create almost any kind of script you need, all in an easy to use format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/user/derricks/RfrutZ5H"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Execute Python Weekly Automatically and Free!</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Fri, 08 Jan 2021 18:01:02 +0000</pubDate>
      <link>https://forem.com/wayscript/execute-python-weekly-automatically-and-free-2339</link>
      <guid>https://forem.com/wayscript/execute-python-weekly-automatically-and-free-2339</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;One of the easiest things to do with WayScript is setting a program to run daily, weekly, or even monthly. This is a great benefit when it comes to running a Python script since it uses a third party instead of potentially slowing down your computer. In this super quick and easy tutorial, we’ll show you exactly how to do this. Keep reading to follow along!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;In order to get the script to run on a specified cadence, the Time Trigger module is added. In the left screen toolbar, there are several options to determine how often to run the script, what time to run it, and even what time zone you’re using. We’ll select weekly for this script, but you can choose whatever option best fits your applications.  &lt;/p&gt;

&lt;p&gt;The next module to add is the Python module, where we’ll enter in the code. Click on “Enter Edit Code Mode” in the toolbar, where a code editor will appear. This editor that WayScript provides makes it easy to copy and paste your code or write it directly on the page. Click done in the top right corner once you’re done editing the code. Lastly, activate the Time Trigger by switching it to the on position to run the program.  &lt;/p&gt;

&lt;p&gt;WayScript’s platform gives users a great third party to run Python code and other programs at specified time intervals. As we’ve seen from this tutorial, it’s also efficient and only takes a minute to build. Let WayScript take care of your Python scripts and save computer space and time!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/shared/K7UIc8WP"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Execute WayScript Programs Via WayScript API</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Thu, 07 Jan 2021 15:39:47 +0000</pubDate>
      <link>https://forem.com/wayscript/execute-wayscript-via-api-call-using-the-wayscript-api-2cd4</link>
      <guid>https://forem.com/wayscript/execute-wayscript-via-api-call-using-the-wayscript-api-2cd4</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;One of the biggest benefits of WayScript is its versatility and seamless integration between different programs and platforms. In this tutorial, we’ll learn how to use these to our advantage by executing a program built in WayScript outside of the website. We can do this by writing our own Python code and utilizing the WayScript Python API. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;The example script we’ll use simply passes a query parameter using the HTTP Trigger module, formats it using the Python module, and then writes the values to an SQL table with the SQL module. If for some reason the user doesn’t want to visit the URL produced from the HTTP Trigger or run the program through WayScript, they have the ability to execute it using Python on their own computer.  &lt;/p&gt;

&lt;p&gt;The first step in executing this script through Python is installing the WayScript library using the pip installer. The code for this step is: pip3 install wayscript. Now, it’s time to import WayScript so that the user can gain access to the WayScript clients. The next line of code activates the client, so that Python can execute the specified WayScript program. So far, your code should look something like this.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F158%2F1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F158%2F1.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our example script we’ve included the query parameter “sample_list.” This query parameter can also be passed in the execution of the script through Python. For this line of code, “q” should be set equal to the query parameter and the expected values. Next, the program ID must be specified in the code. This ID can be found at the end of the WayScript URL for the script. Finally, to run the script simply use the wayscript.run and include the ID and parameters in parentheses. If this is a bit confusing, the below image shows the appropriate code for all of these steps.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F158%2F2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwayscript.com%2Fblog_img%2F158%2F2.png" alt="tutorial step #1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is only one simple function of using WayScript’s Python API, but it demonstrates the versatility of WayScript that can’t always be found with other sites. Our Python API has several other features, including the ability to execute programs with password protections and more. To see these, just visit the link at the end of this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj" rel="noopener noreferrer"&gt;discord&lt;/a&gt;. We're always around to help. To see the full API and its features, just find it &lt;a href="https://pypi.org/project/wayscript/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Integrate Google Sheets seamlessly to Other Services | WayScript Tutorial</title>
      <dc:creator>Derrick Sherrill</dc:creator>
      <pubDate>Tue, 05 Jan 2021 14:03:44 +0000</pubDate>
      <link>https://forem.com/wayscript/integrate-google-sheets-seamlessly-to-other-services-wayscript-tutorial-1e31</link>
      <guid>https://forem.com/wayscript/integrate-google-sheets-seamlessly-to-other-services-wayscript-tutorial-1e31</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In previous articles, we’ve discussed how to use Python and Google Sheets together to create a variety of programs. However, WayScript has just introduced a new spreadsheet editor that allows users to view and edit any Google Sheet in full screen mode. This is much easier to use and navigate than before, so in this article we’ll explore the feature and use it in a program that passes the information to Python. Keep reading to learn more!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building our Script
&lt;/h2&gt;

&lt;p&gt;This simple example uses the Google Sheets and Python modules. Beginning with Google Sheets, in the toolbar to the left there are options to read or write a file. Once you’ve chosen one of these options (we’ll read a file for this script), click on the “Setup” button below the drop-down menu. This brings up the full screen editor. This is much more user-friendly than before, where the data was shown inside the toolbar. Choose which file and sheet to read from the toolbar, and then import the columns at the top. These steps are similar to the previous format and create stored WayScript variables.  &lt;/p&gt;

&lt;p&gt;Clicking “Exit Read Setup” returns the user to the tree building view. The next step in this script is to add the Python module so that we can write code to perform a variety of functions. Clicking on “Enter Edit Code” in the toolbar brings up the code editor screen. There are several different bits of code that can be used here, but we’ll just use the “numpy” package to perform a few simple calculations on our data. The specific code used to do this is shown below.  &lt;/p&gt;

&lt;p&gt;Python code for the calculations:&lt;/p&gt;

&lt;pre&gt;
import numpy as np 
one = [float(i) for i in variables[‘values_one’]]
two = [float(i) for i in variables[‘values_two’]]
result = np.array(one) / np.array(two) 
variables[‘result’] = result.tolist()  
&lt;/pre&gt;
  

&lt;p&gt;The result of that code is now stored as a variable. From here, you could choose to send it as an e-mail, create a hosted dashboard, and more. You can see how to build some of those scripts in other articles, but for now we simply wanted to run through the application of the new spreadsheet editor. We’re always looking to improve the WayScript platform, and these new features are just a few ways we’re doing that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Questions about this script or anything else? Join our &lt;a href="https://discord.gg/VWbXSbj"&gt;discord&lt;/a&gt;. We're always around to help. If you want to work the full script template, just find it &lt;a href="https://wayscript.com/user/derricks/DgT_dc2u"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
