Skip to main content

A Python SDK for writing Airplane tasks

Project description

Airplane Python SDK PyPI PyPI - License Docs

SDK for writing Airplane tasks in Python.

Getting started

pip install airplanesdk

Usage

To write a Python task in Airplane, create a .py file and export a function like so:

import airplane

def main(params):
  return f"Hello, {params['name']}"

You can configure the parameters that your task will receive in the Airplane UI. They'll be passed through the params argument to your function as a dictionary keyed by the slugs you see in the UI.

To execute your task, first install the Airplane CLI.

Once installed, execute your task locally:

airplane dev ./path/to/file.py -- --name=World

If that looks good, deploy your task to Airplane and give it a run in the UI!

airplane deploy ./path/to/file.py

Project details


Download files

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

Source Distribution

airplanesdk-0.3.4.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

airplanesdk-0.3.4-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page