Swimlane Python v2.16¶
https://github.com/swimlane/swimlane-python
Python driver for the Swimlane API
Viewing docs for release v2.16.1
Installation¶
Pip¶
Recommended installation method is to install via pip.
Install latest release:
pip install swimlane
Install latest release for platform v2.x:
pip install "swimlane>=2,<3"
Git¶
Manually clone, checkout, and install specific branch or release:
git clone https://github.com/swimlane/swimlane-python
cd swimlane-python
git checkout <branch>
pip install .
Offline Installer¶
An installer including bundled dependencies is made available for easy offline installs
Download and run .pyz archive from Github releases page for the correct platform and python version:
wget https://github.com/swimlane/swimlane-python/releases/download/<release>/swimlane-python-offline-installer-<platform>-<python>.pyz
python ./swimlane-python-offline-installer-<platform>-<python>.pyz
Versioning¶
The Swimlane driver is versioned along with server, and will support all minor versions below installed version. The latest major release should always be installed matching the target server major version. Patch versions can float between server and driver, and may not always match.
Newer minor server releases will typically work as expected, but could have minor inconsistencies or missing features. A warning message will be logged when connecting to a newer minor server release than the current driver release, but will otherwise work as expected.
Warning
Major versions of driver and server are incompatible, and will NOT work together and will raise
swimlane.exceptions.InvalidServerVersion when attempting to connect.
For example, swimlane==2.15.0 will fully support platform versions 2.0.0 - 2.15.x, will warn and attempt to work when connecting to platform 2.16.0 - 2.y.z, and will fail when connecting to platform 3.0.0+.
Usage¶
All connection and interaction with Swimlane API is handled via the swimlane.Swimlane client.
Connection, authentication, and any additional requests will all be handled by the client class automatically throughout the rest of the examples in the documentation.
Quick Start¶
from swimlane import Swimlane
# Connect Swimlane client
swimlane = Swimlane('https://192.168.1.1', 'username', 'password')
# Retrieve App by name
app = swimlane.apps.get(name='Target App')
# Create new Record
new_record = app.records.create(**{
'Text Field': 'String',
'Numeric Field': 100,
'UserGroup Field': swimlane.user,
'ValuesList Field': ['Option 1', 'Option 2']
})
# Work with field values
assert new_record['Text Field'] == 'String'
new_record['Numeric Field'] += 100
assert new_record['Numeric Field'] == 200
assert new_record['UserGroup Field'].id == swimlane.user.id
Examples¶
Complete examples and descriptions of all driver functionality
Package Docs¶
Full API documentation for all package components
- swimlane package
- swimlane.core package
- swimlane.core.adapters package
- swimlane.core.fields package
- swimlane.core.fields.base package
- swimlane.core.fields.attachment module
- swimlane.core.fields.comment module
- swimlane.core.fields.datetime module
- swimlane.core.fields.history module
- swimlane.core.fields.number module
- swimlane.core.fields.reference module
- swimlane.core.fields.text module
- swimlane.core.fields.tracking module
- swimlane.core.fields.usergroup module
- swimlane.core.fields.valueslist module
- swimlane.core.resources package
- swimlane.core.client module
- swimlane.core.cursor module
- swimlane.core.resolver module
- swimlane.core.search module
- swimlane.utils package
- swimlane.exceptions module
- swimlane.core package