swimlane package¶
Swimlane Python API driver
-
class
swimlane.Swimlane(host, username, password, verify_ssl=True, default_timeout=60, verify_server_version=True)[source]¶ Bases:
objectSwimlane API client
Core class used throughout library for all API requests and server interactions
Parameters: - host (str) – Full RFC-1738 URL pointing to Swimlane host. Defaults will be provided for all parts
- username (str) – Authentication username
- password (str) – Authentication password
- verify_ssl (bool) – Verify SSL (ignored on HTTP). Disable to use self-signed certificates
- default_timeout (int) – Default request connect and read timeout in seconds for all requests
- verify_version (bool) – Verify server version has same major version as client package. May require additional requests, set False to disable check
-
host¶ pyuri.URI – Full RFC-1738 URL pointing to Swimlane host
-
apps¶ AppAdapter –
AppAdapterconfigured for current Swimlane instance
-
users¶ UserAdapter –
UserAdapterconfigured for current Swimlane instance
-
groups¶ GroupAdapter –
GroupAdapterconfigured for current Swimlane instance
Examples
# Establish connection swimlane = Swimlane( 'https://192.168.1.1', 'username', 'password', verify_ssl=False ) # Retrieve an app app = swimlane.apps.get(name='Target App')
-
request(method, api_endpoint, **kwargs)[source]¶ Wrapper for underlying
requests.SessionHandles generating full API URL, session reuse and auth, request defaults, and invalid response status codes
Used throughout library as the core underlying request/response method for all interactions with server
Parameters: Notes
All other provided kwargs are passed to underlying
requests.Session.request()callRaises: swimlane.exceptions.SwimlaneHTTP400Error– On 400 responses with additional context about the exceptionrequests.HTTPError– Any other 4xx/5xx HTTP responses
Returns: Successful response instances
Return type: Examples
Request and parse server settings endpoint response
>>> server_settings = swimlane.request('get', 'settings').json()
-
settings¶ Retrieve and cache settings from server
-
user¶ User record instance for authenticated user
-
version¶ Server API version
Subpackages¶
- swimlane.core package
- Subpackages
- swimlane.core.adapters package
- swimlane.core.fields package
- Subpackages
- Submodules
- 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
- Submodules
- Subpackages
- swimlane.utils package