{"id":6242,"library":"slacker","title":"Slacker","description":"Slacker is a full-featured Python interface for the Slack API. The project is no longer actively maintained since July 2020, with version 0.14.0 being the last release. Users are advised to migrate to the official Slack Python SDK.","status":"abandoned","version":"0.14.0","language":"en","source_language":"en","source_url":"https://github.com/os/slacker/","tags":["slack","api","client","abandoned"],"install":[{"cmd":"pip install slacker","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"Slacker","correct":"from slacker import Slacker"}],"quickstart":{"code":"import os\nfrom slacker import Slacker\n\n# Get your Slack API token from an environment variable\nslack_token = os.environ.get('SLACK_API_TOKEN', 'YOUR_SLACK_API_TOKEN')\n\nif not slack_token or slack_token == 'YOUR_SLACK_API_TOKEN':\n    print(\"Error: SLACK_API_TOKEN environment variable not set or is default. Please set it.\")\nelse:\n    try:\n        slack = Slacker(slack_token)\n\n        # Test API connection\n        response = slack.api.test()\n        if response.successful:\n            print(f\"Successfully connected to Slack API (Team: {slack.team.info().body['team']['name']}).\")\n            \n            # Send a message to a channel (replace '#general' with your target channel)\n            channel = os.environ.get('SLACK_CHANNEL', '#general')\n            message = \"Hello from Slacker! This library is no longer maintained, consider migrating to the official Slack SDK.\"\n            post_response = slack.chat.post_message(channel, message)\n            if post_response.successful:\n                print(f\"Message sent to {channel}.\")\n            else:\n                print(f\"Failed to send message: {post_response.error}\")\n\n            # Get users list example\n            users_response = slack.users.list()\n            if users_response.successful:\n                print(f\"Found {len(users_response.body['members'])} users.\")\n            else:\n                print(f\"Failed to retrieve users: {users_response.error}\")\n\n        else:\n            print(f\"Failed to connect to Slack API: {response.error}\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize `Slacker` with an API token from an environment variable, test the API connection, and send a simple message to a Slack channel. It also includes an example of fetching user lists. Ensure you set the `SLACK_API_TOKEN` environment variable with your workspace token and optionally `SLACK_CHANNEL` for message posting."},"warnings":[{"fix":"Migrate to Slack's official Python SDK (e.g., `slack_sdk`) for continued support and access to new Slack API features.","message":"The `os/slacker` GitHub repository has been archived since July 2020, and the project is no longer actively maintained. No further updates or bug fixes will be provided.","severity":"breaking","affected_versions":"0.14.0 and older"},{"message":"Version 0.13.0 dropped support for Python 2.6. Future versions (though none are expected) would likely continue to drop older Python 2.x versions. [from release notes]","severity":"breaking"},{"fix":"Update imports from `from slacker.utils import ...` to `from slacker.utilities import ...`.","message":"In version 0.13.0, the `utils` module was renamed to `utilities`. Code importing `slacker.utils` will break. [from release notes]","severity":"gotcha","affected_versions":">=0.13.0"},{"fix":"Always use environment variables (e.g., `os.environ.get('SLACK_API_TOKEN')`) or a secure configuration management system to store and access API tokens.","message":"Exposing API tokens directly in code is a security risk. Slack API tokens can be automatically revoked if exposed in public repositories.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider migrating to the official Slack Python SDK which is actively maintained and kept up-to-date with Slack's platform changes.","message":"Due to the library being unmaintained, it may not be compatible with newer Slack API features, changes in API endpoints, or updated security requirements from Slack. You might encounter unexpected errors or limitations with current Slack functionalities.","severity":"gotcha","affected_versions":"0.14.0 and older"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}