Skip to main content

Video calls (rooms, lobby admission, recording-egress seam) for the Stapel framework

Project description

stapel-video

Video calls for the Stapel framework — a thin, provider-agnostic library over a real-time video backend (LiveKit by default).

  • Rooms with human-shareable join codes (abc-defg-hij).
  • Admission modelpublic (anyone with the code joins), scope_trusted (members of the room's scope join instantly, others wait), restricted (everyone but the host waits in a lobby).
  • Realtime lobby over WebSockets (Channels) — waiting / admitted / denied, authenticated by the same Stapel JWT stack HTTP uses.
  • Host controls — admit / deny waiting guests.
  • Provider seam — one VideoProvider ABC (mint join token, create room, start/stop recording egress, verify webhook). Swap vendors without forking.
  • Recording is a seam, not a pipeline: start/stop_egress proxy the provider and a video.egress_ended comm event carries the storage key to stapel-recordings — by event, never by import.

Alpha (0.1.0). See MODULE.md for the agent-facing map of seams.

Install

pip install stapel-video            # core library
pip install 'stapel-video[livekit]' # + the default LiveKit backend
pip install 'stapel-video[channels]'# + the realtime lobby (WebSockets)

Mount

# urls.py
path("video/", include("stapel_video.urls"))

# asgi.py (realtime lobby)
from channels.routing import ProtocolTypeRouter, URLRouter
from stapel_core.django.jwt.channels import JWTAuthMiddlewareStack
from stapel_video.routing import websocket_urlpatterns

application = ProtocolTypeRouter({
    "http": django_asgi_app,
    "websocket": JWTAuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
})

API

Method Path What
POST /video/api/rooms Create a room (creator auto-admitted host, with a token)
GET /video/api/rooms/{join_code} Room info
POST /video/api/rooms/{join_code}/join Join → admitted / waiting / denied
GET /video/api/rooms/{join_code}/participants Participants (anchor-paginated)
POST /video/api/rooms/{join_code}/lobby/admit Admit a waiting guest (host-only)
POST /video/api/rooms/{join_code}/lobby/deny Deny a waiting guest (host-only)
POST /video/api/webhook Provider webhook ingress (signed, unauthenticated)

Configuration (STAPEL_VIDEO)

Key Default What
VIDEO_PROVIDER …livekit.LiveKitProvider Video backend (dotted path)
SCOPE_PROVIDER …scope.DefaultScopeProvider scope_key resolution + membership
DEFAULT_ACCESS_LEVEL restricted Access level for a room created without one
DEFAULT_ADMIT_REQUIRED True Whether new rooms start with the lobby on
LIVEKIT_URL / LIVEKIT_API_KEY / LIVEKIT_API_SECRET "" Default-provider credentials

VIDEO_PROVIDER, DEFAULT_ACCESS_LEVEL and DEFAULT_ADMIT_REQUIRED are the three CTO-facing config axes surfaced in docs/capabilities.json.

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

stapel_video-0.2.4.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

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

stapel_video-0.2.4-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

Details for the file stapel_video-0.2.4.tar.gz.

File metadata

  • Download URL: stapel_video-0.2.4.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for stapel_video-0.2.4.tar.gz
Algorithm Hash digest
SHA256 9240eb9035e8a9772d26c6dcf5ab05ea4feffce2d93b8aa3883e4a26d061c8df
MD5 3c9aba5a54317392025ae4ef37989fe1
BLAKE2b-256 7ca0d4c235544485d6963f40d5a11aae4ac7d52c4934f493849ed88c40c1ad1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_video-0.2.4.tar.gz:

Publisher: publish.yml on usestapel/stapel-video

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

File details

Details for the file stapel_video-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: stapel_video-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for stapel_video-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 23e3db4a21576a9196b132391c79bc50be7af01d7c02ac5f2f60edfd966fb1c6
MD5 243656c0805b25692e42620eecbac025
BLAKE2b-256 4688e1dbef3423c4cd31e6f84ef386c3bd8ad0ed07c01f540d8d91b30f9d10c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_video-0.2.4-py3-none-any.whl:

Publisher: publish.yml on usestapel/stapel-video

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