-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27a3864
commit c82bc2a
Showing
198 changed files
with
392 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import abstra.forms as af | ||
import abstra.workflows as aw | ||
|
||
""" | ||
Abstra forms are the simplest way to build user interfaces for your workflows. | ||
""" | ||
# With Abstra Forms, it's easy to build user interfaces | ||
name = af.read("👋 Hello there! What is your name?") | ||
|
||
name = af.read("Hello there! What is your name?") | ||
af.display(f"Hello {name}!") | ||
# You can store data in the current thread, | ||
# so it will be available in the next stages | ||
aw.set_data("name", name) | ||
|
||
# Different kinds of input and output widgets are available | ||
af.display(f"🎉 Welcome, {name}!") | ||
|
||
ans = af.read_multiple_choice("Are you familiar with Abstra?", ["Yes", "No"]) | ||
|
||
if ans == "Yes": | ||
af.display("Great! Have fun!") | ||
else: | ||
af.display_link( | ||
"https://docs.abstra.io/forms/overview", link_text="Check out the docs!" | ||
) | ||
af.display_markdown("Check out our [docs](https://docs.abstra.io/forms/overview) 📚") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import abstra.hooks as ah | ||
import abstra.workflows as aw | ||
|
||
""" | ||
Abstra hooks are the simplest way to build endpoints for your workflows. | ||
""" | ||
|
||
# Use Abstra Hooks to create Python endpoints | ||
body, query, headers = ah.get_request() | ||
|
||
print("Hook ran!") | ||
print("Received request body:", body) | ||
print("⚙️ Hook is running... received body:", body) | ||
|
||
# You can store data in the current thread, | ||
# so it will be available in the next stages | ||
aw.set_data("hook_data", body) | ||
|
||
ah.send_json({"message": "Hello world!"}) | ||
# You can send a response back to the client after doing some processing | ||
ah.send_json({"message": "A message from the hook!"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
""" | ||
Abstra jobs are the simplest way to build repetitive tasks for your workflows. Just schedule a job and let Abstra do the rest. | ||
""" | ||
import abstra.workflows as aw | ||
|
||
print("Hello world!") | ||
# Abstra Jobs are a simple way to schedule Python recurring tasks | ||
# Setup the Schedule at the "Settings" tab | ||
|
||
print("🕒 Job is running...") | ||
|
||
# You can store data in the current thread, | ||
# so it will be available in the next stages | ||
aw.set_data("job_output", "Some data from the job!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
""" | ||
Abstra scripts are the simplest way to run code in your workflows. | ||
""" | ||
import abstra.workflows as aw | ||
|
||
# Use Scripts to run Python code after any workflow Stage | ||
|
||
def sum(a, b): | ||
return a, b | ||
|
||
|
||
print(f"Script ran!") | ||
# You can store data in the current thread, | ||
# so it will be available in the next stages | ||
aw.set_data("script_output", "Some data from the script!") |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
abstra_statics/dist/assets/Base.2c96e441.js → abstra_statics/dist/assets/Base.dfcc101c.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.