A Python SDK for writing Airplane tasks
Project description
Airplane Python SDK
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:
- Bump the version number in
pyproject.toml
andairplane/__init__.py
- Run the following to build and publish to PyPI:
poetry publish --build --username=airplane
Project details
Release history Release notifications | RSS feed
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.5.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file airplanesdk-0.1.5.tar.gz
.
File metadata
- Download URL: airplanesdk-0.1.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/20.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26632f289439d6b3cfdd8ab7afb74ed3cad2264cf3682d6520506cc41591a6ce |
|
MD5 | 59121f8246dad43c0d6fec49c7af5e5c |
|
BLAKE2b-256 | d106aeed580fe11dd64cd342b0fc917598becf015bfa48842207674b03d574e8 |
File details
Details for the file airplanesdk-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: airplanesdk-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1138aa7e9f4a849807a5bbf5f1684f6f370d08ad6e484a64ecfe7b50b0d0bd48 |
|
MD5 | c40932bec8f7ad39ac8dce22023f0398 |
|
BLAKE2b-256 | cf172c852e1dcc5afcaa28f84920941d053b705f9338597b82f2d854edf56067 |