CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-slacker

Slack API client providing comprehensive Python interface for messaging, file sharing, user management, and team communication features.

Pending
Overview
Eval results
Files

search.mddocs/

Search & Discovery

Search across messages, files, and other content within your Slack workspace.

Capabilities

Universal Search

Search across all content types in your workspace.

def all(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None):
    """
    Search all content (messages and files) in workspace.
    
    Args:
        query (str): Search query string
        sort (str, optional): Sort order ('score', 'timestamp')
        sort_dir (str, optional): Sort direction ('asc', 'desc')
        highlight (bool, optional): Highlight search terms in results
        count (int, optional): Number of results per page
        page (int, optional): Page number
    
    Returns:
        Response: Combined search results including messages and files
    """

Message Search

Search specifically within messages and conversations.

def messages(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None):
    """
    Search messages in workspace.
    
    Args:
        query (str): Search query string
        sort (str, optional): Sort order ('score', 'timestamp')
        sort_dir (str, optional): Sort direction ('asc', 'desc')
        highlight (bool, optional): Highlight search terms in results
        count (int, optional): Number of results per page
        page (int, optional): Page number
    
    Returns:
        Response: Message search results with context and metadata
    """

File Search

Search specifically within files uploaded to your workspace.

def files(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None):
    """
    Search files in workspace.
    
    Args:
        query (str): Search query string
        sort (str, optional): Sort order ('score', 'timestamp')
        sort_dir (str, optional): Sort direction ('asc', 'desc')
        highlight (bool, optional): Highlight search terms in results
        count (int, optional): Number of results per page
        page (int, optional): Page number
    
    Returns:
        Response: File search results with metadata and snippets
    """

Usage:

# Search all content
results = slack.search.all('project update')

# Search only messages
messages = slack.search.messages('from:@john deadline', sort='timestamp', sort_dir='desc')

# Search only files with highlighting
files = slack.search.files('budget spreadsheet', highlight=True)

# Paginated search
first_page = slack.search.all('quarterly report', count=10, page=1)
second_page = slack.search.all('quarterly report', count=10, page=2)

Search Query Syntax

Slack search supports various query operators:

  • Basic text: project update
  • User filter: from:@username or from:me
  • Channel filter: in:#channel-name
  • Date filters: after:2023-01-01, before:2023-12-31, on:2023-06-15
  • File type: type:pdf, type:image
  • Exact phrases: "exact phrase"
  • Boolean operators: AND, OR, NOT

Types

class Search(BaseAPI):
    """Search functionality for workspace content."""
    def all(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None): ...
    def files(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None): ...
    def messages(self, query, sort=None, sort_dir=None, highlight=None, count=None, page=None): ...

Install with Tessl CLI

npx tessl i tessl/pypi-slacker

docs

advanced.md

auth.md

channels.md

chat.md

files.md

index.md

interactive.md

rtm.md

search.md

users.md

tile.json