Run Example
This document provides instructions for running the Smart Search SDK example script (simple.py).
How to Run
Clone the Smart Search SDK repository:
git clone https://github.com/GDP-ADMIN/smart-search-sdk.gitNavigate to the examples directory:
cd python/examplesRun the script:
make runExpected Results
When you run the script, you'll see an interactive menu with the following options:
Options:
1. Get authentication emails
2. Search
3. Sonar Deep Research (POST)
4. Sonar Deep Research (WebSocket)
5. assafelovic Deep Research (POST)
6. assafelovic Deep Research (WebSocket)
7. ExitExample Usage
Get Authentication Emails (Option 1)
Enter page number (default: 1)
Enter items per page (default: 10)
The script will display authentication emails in JSON format
Search (Option 2)
Enter search_profile_names (default: 'general')
Enter search query (default: 'Time Tracking Report for monitoring presence records')
Enter items per page (default: 10)
Enter additional parameters (optional)
The script will display search results in JSON format
Deep Research Options (4-6)
Enter search query
The script will perform deep research and display results
WebSocket options will show real-time updates
Notes
The script requires valid credentials in the
.envfileAll responses are formatted in JSON for easy reading
Error handling is implemented for invalid inputs and API errors
Troubleshooting
If you encounter any issues:
Verify your
.envfile configurationCheck your network connection to the Smart Search API
Verify your authentication token is valid
For more detailed information about the SDK's capabilities, refer to the main documentation.
Last updated
