Skip to main content

A simple, ready-to-use client for testing the SmallWebRTCTransport.

Project description

SmallWebRTC Prebuilt

A simple, ready-to-use client for testing the SmallWebRTCTransport.

This prebuilt client provides basic WebRTC functionality and serves as a lightweight tool to quickly verify transport behavior without needing a custom implementation.

Ideal for development, debugging, and quick prototyping.


📦 Installation & Usage

If you just want to use the prebuilt WebRTC client in your own Python project:

✅ Install from PyPI

pip install pipecat-ai-small-webrtc-prebuilt

🧰 Example Usage

from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI

app = FastAPI()

# Mount the frontend at /prebuilt
app.mount("/prebuilt", SmallWebRTCPrebuiltUI)

@app.get("/", include_in_schema=False)
async def root_redirect():
    return RedirectResponse(url="/prebuilt/")

🧪 Try a Sample App

Want to see it in action? Check out our sample app demonstrating how to use this module:

⌨ Development Quick Start

If you want to work on the prebuilt client itself or use it locally in development:

📋 Prerequisites

  • Node.js (for building the client)
  • uv (recommended for Python dependency management)

🔧 Set Up the Environment

  1. Clone the Repository
git clone https://github.com/your-org/small-webrtc-prebuilt.git
cd small-webrtc-prebuilt
  1. Build the Client

The Python package serves a built React client, so you need to build it first:

cd client
npm install
npm run build
cd ..

This creates the client/dist/ directory that the Python package will serve.

  1. Try the Sample App

Now you can test the local package with the sample app:

cd test
uv sync  # Installs dependencies and the local package in editable mode
uv run bot.py

Then open http://localhost:7860 in your browser.

🚀 Publishing

Publishing is automated via GitHub Actions using trusted publishing (no API tokens needed).

Prerequisites

  1. Update the version in pyproject.toml:

    version = "2.0.3"
    
  2. Create a git tag:

    git tag -m v2.0.3 v2.0.3
    git push --tags origin
    

Publishing Process

  1. Go to GitHub Actions in your repository
  2. Select the "publish" workflow
  3. Click "Run workflow"
  4. Enter the git tag (e.g., v2.0.2)
  5. Click "Run workflow"

The workflow will:

  • Build the client (React/Vite)
  • Bundle it into the Python package
  • Build the Python package with version from pyproject.toml
  • Publish to both Test PyPI and PyPI

Testing Before Production

To test publishing without creating a release:

  1. Use the publish-test workflow (publishes to Test PyPI only):

    • Go to GitHub Actions → "publish-test" workflow
    • Click "Run workflow"
    • No git tag needed!
  2. Install from Test PyPI:

    pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pipecat-ai-small-webrtc-prebuilt
    
  3. Test your changes, then use the regular publish workflow for production

Local Build Testing

To test the build locally before publishing:

# Build the client
cd client
npm install
npm run build
cd ..

# Copy client to package
mkdir -p pipecat_ai_small_webrtc_prebuilt/client
cp -r client/dist pipecat_ai_small_webrtc_prebuilt/client/

# Build the package
uv build

# Clean up
rm -rf pipecat_ai_small_webrtc_prebuilt/client

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipecat_ai_small_webrtc_prebuilt-2.0.4.tar.gz (585.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipecat_ai_small_webrtc_prebuilt-2.0.4-py3-none-any.whl (585.6 kB view details)

Uploaded Python 3

File details

Details for the file pipecat_ai_small_webrtc_prebuilt-2.0.4.tar.gz.

File metadata

File hashes

Hashes for pipecat_ai_small_webrtc_prebuilt-2.0.4.tar.gz
Algorithm Hash digest
SHA256 3c3447679007ea937c760223bb66579f2605cf94628a68c9da1d66787a96caad
MD5 e030f086917a3228c0938ab108cb2e2b
BLAKE2b-256 2e8857b26547ec45623718f1d5beb9e004dba55b7ab548a3b48748466e3e1769

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipecat_ai_small_webrtc_prebuilt-2.0.4.tar.gz:

Publisher: publish.yml on pipecat-ai/small-webrtc-prebuilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipecat_ai_small_webrtc_prebuilt-2.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pipecat_ai_small_webrtc_prebuilt-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 054b3cee843fe69191859dbb0693560d9ca08f7d57a9ff0457d0bc741f36f4df
MD5 21cc6d35322e14afdde2b1b02f2dd47b
BLAKE2b-256 9c6e332b78d1c7888ff426bd528b150aad0da05024f4f91e56502c359726c07b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipecat_ai_small_webrtc_prebuilt-2.0.4-py3-none-any.whl:

Publisher: publish.yml on pipecat-ai/small-webrtc-prebuilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page