Skip to main content

A Python SDK for writing Airplane tasks

Project description

Airplane Python SDK PyPI PyPI - License Docs

An SDK for writing Airplane tasks in Python.

Usage

First, install the SDK:

pip install airplanesdk

Next, you can use the SDK to produce outputs which will be separated from your logs:

import airplane

airplane.write_output("Show me what you got")

# You can also separate outputs into groups by attaching names:
airplane.write_named_output("saying", "Show me what you got")
airplane.write_named_output("saying", "Welcome to the club, pal")
airplane.write_named_output("name", "Summer")

This SDK can be used to programmatically kick off tasks and fetch their output:

# You can get a task's ID from the URL bar, f.e.
# https://app.airplane.dev/tasks/1oMt2mZC1DjkOZXxHH8BV57xrmF
task_id = "..."
resp = airplane.run(task_id, {
  # Optionally provide parameters to your task, using the same name
  # as when templating a parameter into your task's CLI args.
  "DryRun": True,
})

# run() will return the run's status (Succeeded, Failed, Cancelled) and a
# dict of outputs, by name.
#
# Default outputs are available as `resp["outputs"]["output"]`.
print(resp["outputs"])

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.2.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

airplanesdk-0.2.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file airplanesdk-0.2.3.tar.gz.

File metadata

  • Download URL: airplanesdk-0.2.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.11.0-7620-generic

File hashes

Hashes for airplanesdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 36a065fc92d1d651d08d14bd068f1623c5cb76197a262f48a685f6c39608ccc9
MD5 f41e4eb05cdd09edf40a3a326d11cb25
BLAKE2b-256 52948c9a9e34c0ae09f7a3dd3311bb767eb0f9af991f5fda65a27dd972af40e4

See more details on using hashes here.

File details

Details for the file airplanesdk-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: airplanesdk-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.11.0-7620-generic

File hashes

Hashes for airplanesdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0183d7c45220adbde86d1aca39018e441b61ac5560f68dd20041db4908db129a
MD5 d98ba3d3618ea53f0d481f5ad4322e82
BLAKE2b-256 f35e0583b9c5f49da22fb9e8169c7c1363ace8b886b8d772c7b3ea9d5063c398

See more details on using hashes here.

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