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 airplane
Next, you can use the SDK to produce outputs which will be separated from your logs:
import airplane
airplane.writeOutput("Show me what you got")
# You can also separate outputs into groups by attaching names:
airplane.writeNamedOutput("saying", "Show me what you got")
airplane.writeNamedOutput("saying", "Welcome to the club, pal")
airplane.writeNamedOutput("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
taskId = "..."
runOutput = airplane.run(taskId, {
# 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 `runOutput.output`.
print(runOutput)
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.2.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file airplanesdk-0.1.2.tar.gz
.
File metadata
- Download URL: airplanesdk-0.1.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ad27dd89ec40b824024241324780dfbbb7ae87a7da50c25c62ada0d4194f897 |
|
MD5 | a06d42e12e4098aaa9d1756fac675a30 |
|
BLAKE2b-256 | 152b375953b53198ceee66e0e1f8b69aafd8b3952e05ec58c19a5df03bb2c2d1 |
File details
Details for the file airplanesdk-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: airplanesdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.1 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 | 45493db8e04eb38ce5bd097666b43410ac8307a6c2509dbdc02e2cd85eda962f |
|
MD5 | f7553475ef82b05574bdb6f230e4a0b8 |
|
BLAKE2b-256 | e5c2f070bf4c24bd5855d9bd5654e6082eb30dea2dd9bf09a821ed3e332fd6ea |