Skip to main content

Framewise Meet Client

A Python client library for building interactive applications with the Framewise API.

Table of Contents

Installation

Install the package using pip:

pip install framewise-meet-client

Quick Start

from framewise_meet_client import App
from framewise_meet_client.models.inbound import TranscriptMessage

# Create an app instance with your API key
app = App(api_key="your_api_key_here", host="backendapi.framewise.ai", port=443)

# Join a meeting
app.join_meeting("your_meeting_id")

# Handle transcript events
@app.on_transcript()
def handle_transcript(message: TranscriptMessage):
    print(f"Received transcript: {message.content.text}")
    if message.content.is_final:
        print("This is a final transcript")

# Run the app
if __name__ == "__main__":
    app.run()

Core Features

Authentication

The client supports API key authentication:

# Initialize with API key
app = App(api_key="your_api_key_here", host="backendapi.framewise.ai", port=443)

# Or set API key later
app = App(host="backendapi.framewise.ai", port=443)
app.set_api_key("your_api_key_here")

Event Handlers

Register handlers for different event types using the decorator pattern:

Typed Event Handlers

# Transcript events
@app.on_transcript()
def handle_transcript(message: TranscriptMessage):
    print(f"Transcript: {message.content.text}")

# Join events
@app.on_join()
def handle_join(message: JoinMessage):
    print(f"User joined: {message.content.user.name}")

# Exit events
@app.on_exit()
def handle_exit(message: ExitMessage):
    print(f"User left: {message.content.user.name}")

# MCQ selection events
@app.on_mcq_selection()
def handle_selection(message: MCQSelectionMessage):
    print(f"Selected option: {message.content.selectedOption}")

Generic Event Handlers

# Using string event type
@app.on("transcript")
def handle_any_transcript(message):
    print(f"Generic handler: {message.content.text}")

# Using invoke for final transcripts
@app.invoke
def process_command(message: TranscriptMessage):
    if message.content.is_final:
        print(f"Processing command: {message.content.text}")
        app.send_text(f"Received command: {message.content.text}")

Sending Responses

The client provides several methods to send different types of content:

# Send plain text
app.send_text("Hello world!")

# Send generated text with streaming support
app.send_generated_text("Starting to generate content...", is_generation_end=False)
app.send_generated_text("Here's the complete response!", is_generation_end=True)

# Send notifications with different levels
app.send_notification("Operation completed", level="info", duration=5000)

# Send custom UI elements
app.send_custom_ui_element("card", {
    "title": "Important Information",
    "content": "This is a custom card element",
    "buttons": ["OK", "Cancel"]
})

Multiple-Choice Questions (MCQs)

Create interactive polls and quizzes:

# Send an MCQ question
app.send_mcq_question(
    question_id="quiz-1",
    question="What is the capital of France?",
    options=["Paris", "London", "Berlin", "Madrid"]
)

# Handle MCQ responses
@app.on_mcq_selection()
def handle_mcq_response(message):
    question_id = message.content.questionId
    selected_option = message.content.selectedOption
    selected_index = message.content.selectedIndex
    user = message.content.user
    
    print(f"User {user.name} selected {selected_option} (index: {selected_index}) for question {question_id}")
    
    # Send acknowledgment
    if selected_option == "Paris":
        app.send_text("Correct!")
    else:
        app.send_text("Incorrect. The answer is Paris.")

Custom UI Elements

Display custom interface components:

# Send a custom card element
app.send_custom_ui_element("card", {
    "title": "Weather Forecast",
    "content": "Today will be sunny with a high of 75°F",
    "image": "https://example.com/weather.png",
    "buttons": ["View Details", "Dismiss"]
})

# Handle UI element interactions
@app.on_custom_ui()
def handle_ui_interaction(message):
    ui_type = message.content.uiType
    action = message.content.action
    data = message.content.data
    
    print(f"UI interaction: type={ui_type}, action={action}, data={data}")

Specific UI Element Handlers

# Handle specific UI element types
@app.on_custom_ui(ui_type="card")
def handle_card_interaction(message):
    print(f"Card interaction: {message.content.action}")
    
    if message.content.action == "button_click" and message.content.data["button"] == "View Details":
        app.send_text("Showing detailed weather forecast...")

Advanced Features

Meeting Management

Create and manage meetings programmatically:

# Create a new meeting
meeting_data = app.create_meeting(
    meeting_id="team_meeting_123",
    start_time_utc="2023-08-15T14:00:00Z",
    end_time_utc="2023-08-15T15:00:00Z"
)

# Join the newly created meeting
app.join_meeting(meeting_id=meeting_data["meeting_id"])

Logging Configuration

Configure logging when running the app:

# Set logging level
app.run(log_level="DEBUG")  # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL

# Configure auto-reconnect behavior
app.run(auto_reconnect=True, reconnect_delay=5)

API Reference

For complete API documentation, visit https://docs.framewise.ai/docs/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for framewise-meet-client 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for framewise-meet-client 0.1.7
File Size Uploaded
framewise_meet_client-0.1.7.tar.gz 98.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for framewise-meet-client 0.1.7
File Interpreter ABI Platform
framewise_meet_client-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 156.5 kB

Release files / framewise_meet_client-0.1.7.tar.gz

Download URL framewise_meet_client-0.1.7.tar.gz
Size 98.7 kB
Tags Source
SHA-256 checksum
How to use checksums
51b22c28597ca2a3c79bda6bda89d11dc9b96ca89792e09f89265b3b8f15884a
BLAKE2b-256 checksum
How to use checksums
93579f6903a03811fcd5d4144bc44cd83e37beb3ea4cb138b5773e6c047484cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2025.

Transparency log

Release files / framewise_meet_client-0.1.7-py3-none-any.whl

Download URL framewise_meet_client-0.1.7-py3-none-any.whl
Size 57.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7171db52ab00afb6759006ea036f9e898103dad36d6c11a4364b784ee720a79
BLAKE2b-256 checksum
How to use checksums
a852173ec947eb8a32b84e8544a831b9ef4b85835b46ad847503798781ed8c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page