Skip to main content

A Python SDK for writing Airplane tasks

Project description

Airplane Python SDK PyPI PyPI - License

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 = "..."
run_output = 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 a dict of outputs, by name.
# Default outputs are available as `run_output.output`.
print(run_output)

Contributing

Deployment

To deploy a new version of this SDK:

  1. Bump the version number in pyproject.toml and airplane/__init__.py
  2. Run the following to build and publish to PyPI:
poetry publish --build --username=airplane

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

Uploaded Source

Built Distribution

airplanesdk-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: airplanesdk-0.1.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/20.1.0

File hashes

Hashes for airplanesdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8d6307e57fcf8fc4fc8c3fc5d750cc78d31b53e2c930dcb0b1b19c8fc965fa60
MD5 0b9915d1f00d2220dea1ab6c7873a8c3
BLAKE2b-256 afcb52ced5e61bfd7e7a44680dade047c6d05d8c87e012deee6ad47b31b20d81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: airplanesdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/20.1.0

File hashes

Hashes for airplanesdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d24dd332f01aafcc1892d9bf5565f207782a02e1c816e3242412107bdd5514
MD5 b6bf1efa9b21eb8c5c133608fb59c687
BLAKE2b-256 1785dc8173b7e55640a744370ac91ca00c2d8729b83e56c56bfdb5efd48ad67a

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