You can also invoke Narada through our Python SDK, which provides a more streamlined and programmatic approach to browser automation. The SDK eliminates many of the manual setup steps by automatically handling browser initialization, extension activation, and session management. This is particularly useful for developers who want to integrate Narada into larger automation workflows or prefer a code-first approach to browser automation.

How to Use the Python SDK

1

Install the SDK

Install the Narada Python SDK using pip:

pip install narada
2

Initialize Narada Client

Create a Python script and initialize the Narada client:

import asyncio
from Narada import Narada

async def main() -> None:
    narada = Narada()
    session = await narada.launch_browser_and_initialize()
    print("Narada session ID:", session.id) # Narada session ID: sess_abc123def456

if __name__ == "__main__":
    asyncio.run(main())

This will open a new Chrome browser, open the extension side panel, and automatically retrieve the session ID for subsequent API requests.

3

Use the Session ID

After running the script above, you can use the retrieved session ID for your remote dispatch requests.

Continue with the Making Your First API Call guide to learn how to use this session ID with the remote dispatch API.

Benefits of the Python SDK

Automated Browser Setup

Automatically opens a Chrome browser and activates the Narada extension without manual intervention.

Session Management

Handles session ID retrieval and management, eliminating the need to manually navigate to the session page.

Simplified Integration

Reduces setup complexity from multiple manual steps to just a few lines of code.

Playwright Integration

Built with Playwright for reliable browser automation and extension interaction.

Next Steps

Now that you’ve installed Narada’s Python SDK to streamline the process of opening a Chrome browser, initializing Narada by opening the extension sidepanel and retrieving the session ID, you can:

  1. Learn how to make API requests using your session ID
  2. Explore the API Reference for detailed endpoint documentation

The Python SDK is particularly useful for automated workflows where you need to programmatically set up browser sessions for Narada automation tasks.