{"id":24677,"library":"swimlane","title":"Swimlane Python SDK","description":"Official Python driver for the Swimlane SOAR API. Provides programmatic access to Swimlane instances for managing records, applications, alerts, and other entities. Current version 10.19.1, supports Python >=3.6, released irregularly with security and feature updates.","status":"active","version":"10.19.1","language":"python","source_language":"en","source_url":"https://github.com/swimlane/swimlane-python","tags":["soar","swimlane","api","security-orchestration"],"install":[{"cmd":"pip install swimlane","lang":"bash","label":"Latest stable"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Python 2/3 compatibility","package":"six","optional":false},{"reason":"Crypto for authentication tokens","package":"pycryptodome","optional":false}],"imports":[{"note":"Common outdated import from old docs","wrong":"from swimlane.app import SwimlaneInstance","symbol":"SwimlaneInstance","correct":"from swimlane import SwimlaneInstance"},{"note":"Old module path deprecated in v10","wrong":"from swimlane.models import Record","symbol":"Record","correct":"from swimlane.core.resources.record import Record"}],"quickstart":{"code":"from swimlane import SwimlaneInstance\nimport os\n\nsw = SwimlaneInstance(\n    hostname=os.environ.get('SWIMLANE_HOST', ''),\n    username=os.environ.get('SWIMLANE_USER', ''),\n    password=os.environ.get('SWIMLANE_PASS', '')\n)\n# List applications\napps = sw.apps.list()\nprint(apps)","lang":"python","description":"Create a Swimlane instance and list available applications."},"warnings":[{"fix":"Ensure hostname is 'https://your-instance.swimlane.com' (including https://, no trailing slash).","message":"The library uses `requests` and may throw `requests.exceptions.ConnectionError` without clear messages if the hostname is unreachable or has SSL issues. Always verify `SWIMLANE_HOST` includes the protocol (https://) and no trailing slash.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `api_key='xyz'` with `username='user', password='pass'`.","message":"In v10.0+, the `SwimlaneInstance` no longer accepts `api_key` parameter for authentication; use `username` and `password` instead. API keys were removed.","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Use `app = sw.apps.get(id='...')` or list with `sw.apps.list()`.","message":"Using `from swimlane import App` is deprecated since v10. Use `from swimlane.core.resources.app import App` or access via `sw.apps` methods.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Always use dictionary-style access: `value = my_record['Field Name']`.","message":"Record field access may raise `KeyError` if field names contain spaces or special characters. Use `record['field_name']` always, not `record.field_name`, as attribute access may fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade to latest: `pip install --upgrade swimlane` and verify import: `from swimlane import SwimlaneInstance`.","cause":"Installed an older version (<10.0.0) that used a different class name or structure.","error":"AttributeError: module 'swimlane' has no attribute 'SwimlaneInstance'"},{"fix":"Ensure hostname includes protocol: `'https://your-instance.swimlane.com'` and no trailing slash. Check network/firewall.","cause":"Hostname is unreachable, possibly missing https:// or incorrect URL.","error":"requests.exceptions.ConnectionError: HTTPSConnectionPool(host='...', port=443): Max retries exceeded with url"},{"fix":"Verify credentials in environment variables. Ensure the user has API access enabled in Swimlane.","cause":"Invalid username/password, or account locked.","error":"swimlane.exceptions.AuthenticationError: Authentication failed"},{"fix":"Use `username` and `password` instead: `SwimlaneInstance(hostname, username=..., password=...)`.","cause":"Using `api_key` which was removed in v10.0.0.","error":"TypeError: __init__() got an unexpected keyword argument 'api_key'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}