Skip to main content
Version: 0.6.0

What is an application

This document describes the function of applications in the Seaplane platform and how to use them. The application, sometimes called pipeline, forms the heart of any data science or machine learning project deployed on Seaplane.

Apps are created by initializing a new App() instance in your main.py file. Once deployed the application sets up all the required infrastructure such as API gateways, streams between components, compute containers and everything else that is required to run an app.

Apps contain DAGs (directed acyclic graphs) which in turn contain tasks. DAGs define the flow of the data, and tasks are the compute units inside our application. To learn more about DAGs head over to our DAGs documentation. To learn more about tasks head over to our tasks documentation. By default, all applications are accessible through the HTTP entry point. More entry points are coming soon. To learn more about entry points check out our entry point documentation. Independent of your entry point of choice the input is available through app.input()

The example below shows a simple application with a single DAG and a single task.

from seaplane.apps import App

# create a new app instance
app = App("my-application-name")

# create a new dag instance
dag = app.dag('my-dag')

# add a new task to the dag
output = dag.task(demo_task, [app.input()], instance_name='demo-task')

# set the output of our application to the output of the task
app.respond(output)

# tell seaplane to run the app
app.run()

This application takes the input from the HTTP entry point POST request and runs it through a single task. The output is available through a GET request. The application can be visualized as follows.