Skip to main content

Swimlane Core

The swimlane-core is a Python package that provides an easy-to-use interface for users to communicate with Turbine. With this package, users can effortlessly interact with Turbine without dealing with the complexities of handling arguments, inputs, outputs and files.

Features

  • Fetch inputs from the standard input.
  • Handle file descriptors and downloads.
  • Set outputs and errors in a standardized format.
  • Retrieve asset details, command-line arguments, asset schema, action schema, and proxy.

Usage

Simple examples

from swimlane_core import (get_action_schema, get_arguments, get_asset,
                           get_asset_schema, get_inputs, get_proxy,
                           process_inputs, process_outputs, get_error,
                           get_output)


args = get_arguments()
inputs = get_inputs()
inputs = process_inputs(inputs)
asset = get_asset()
asset_schema = get_asset_schema()
action_schema = get_action_schema()
http_proxy = get_proxy()
resp = process_outputs(resp)
output = get_output(resp)
print(output, sep="")
error_output = get_error(req_err, is_http_error=True)
print(error_output, file=sys.stderr)
from swimlane_core import process_inputs


raw_inputs = {
    "file": "an id",
    "file_name": "sample.txt"
}

processed_inputs = process_inputs(raw_inputs)
print(processed_inputs)

raw_inputs = {
    "file": "a base64",
    "file_name": "sample.txt"
}
from swimlane_core import process_outputs


raw_outputs = {
    "file": b"file content",
    "file_name": "sample.txt"
}

processed_outputs = process_outputs(raw_outputs)
print(processed_outputs)

raw_inputs = {
    "file": "a file id",
    "file_name": "sample.txt"
}

Advanced

The package provides a simple facade, you can access the underling classes for complex workflows or modifying the behavior of the package.

from swimlane_core import FileDescriptor, InputHandler, OutputHandler

Metadata

Release files for swimlane_core 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swimlane_core 1.1.1
File Size Uploaded
swimlane_core-1.1.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swimlane_core 1.1.1
File Interpreter ABI Platform
swimlane_core-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / swimlane_core-1.1.1.tar.gz

Download URL swimlane_core-1.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18f5da19b8370bfdb4f035eeb449cdc6f3df371d0d76561bfa86ff535e352ada
BLAKE2b-256 checksum
How to use checksums
0f41b3c8822c397c5cf61fe20ffe3f708fb62f73a90ae6e5f75eef19530ba2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.2 Linux/6.2.0-1018-azure

Release files / swimlane_core-1.1.1-py3-none-any.whl

Download URL swimlane_core-1.1.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3892d92330f88365c019624faf439c15acbf96ca3bd2bfc7f8c7a82a4a3ade2
BLAKE2b-256 checksum
How to use checksums
ce1d40ec513f23f9e8ee5d6bdf623e2d686f263bb96dc63c676bf0294bb84893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.2 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page