Overview
Framework support is intentionally layered on the official JavaScript and Python SDKs.
JavaScript server frameworks use pulsegrid.
Frontend frameworks use pulsegrid/client.
Python web frameworks use the Python pulsegrid package.
This keeps behavior consistent and prevents documentation from duplicating the same API for every framework.
Setup
Express / Node backend:
Create one server-side PulseGrid client and reuse it in routes/services.
Next.js:
Use pulsegrid only in server routes, server actions or other server-only modules. Use pulsegrid/client in client components with a token fetched from your server.
React / Vue / Angular / Vite:
Use pulsegrid/client only. Obtain short-lived tokens from your backend.
Django / FastAPI / Flask:
Create PulseGrid from environment variables inside trusted server code. Use it in views/routes/services/tasks.
React Native / Expo:
Use the client-token approach. Do not place the project secret in the distributed app.
Code example
import { createPulseGrid } from "pulsegrid";
const pg = createPulseGrid();
import { connect } from "pulsegrid/client";
const room = await connect({
projectId: PROJECT_ID,
channel: "support",
getToken: () => fetch("/api/pulsegrid-token").then(r => r.json()),
});
from pulsegrid import PulseGrid
pg = PulseGrid()
# Example server action
pg.channel("support").publish(
"Agent joined",
identifier_id="support_backend",
identifier_label="Support Backend",
)
Notes
Do not call a framework an official standalone PulseGrid SDK unless a dedicated package actually exists.
Today the official language packages are JavaScript/TypeScript and Python. Frameworks listed here are integration environments using those packages.