Skip to main content

Mountable FastAPI admin router for lattice-meetbot captures. Constructor-DI, MeetbotAdminRepo protocol, SQLite reference impl.

Project description

lattice-meetbot-admin

Mountable FastAPI admin router for lattice-meetbot captures.

Installation

pip install lattice-meetbot-admin

With dev server support:

pip install 'lattice-meetbot-admin[server]'

Optional extras for v0.2 features:

# Background workers (rq + redis) -- required for /webhooks/capture-complete + worker CLI
pip install 'lattice-meetbot-admin[queue]'

# Chat surface (anthropic SDK) -- required if you wire a real BrainClient that proxies to Claude
pip install 'lattice-meetbot-admin[chat]'

# All-in-one
pip install 'lattice-meetbot-admin[server,queue,chat]'

Quick Start

Mount into a FastAPI host

from fastapi import FastAPI
from lattice_meetbot_admin import create_router, MeetbotAdminConfig

config = MeetbotAdminConfig(
    db_url="sqlite:///./meetbot_admin.db",
    # auth_dependency=require_admin_auth,  # optional: your FastAPI auth callable
)

app = FastAPI()
app.include_router(create_router(config), prefix="/api/meetbot-admin")

Then hit http://localhost:8000/api/meetbot-admin/health to confirm it's live.

Dev server (standalone)

lattice-meetbot-admin dev-server --db-url sqlite:///./meetbot_admin.db
# API at http://127.0.0.1:5557/api/meetbot-admin/docs

Architecture

lattice-meetbot-admin is a constructor-DI package -- no global state. Pass your config once at mount time:

  • MeetbotAdminConfig -- Pydantic v2 settings model (env-var overrides via MEETBOT_ADMIN_* prefix)
  • MeetbotAdminRepo -- typing.Protocol; implement against your storage backend or use the bundled SqliteMeetbotAdminRepo
  • create_router(config, repo=...) -- returns an APIRouter; mount under any prefix
  • create_admin_app(config, repo=...) -- returns a FastAPI sub-application for app.mount()

REST API

Core (v0.1)

Method Path Description
GET /health Health check (returns version + 5 feature flags)
GET /meetings List meetings (paginated, filterable)
GET /meetings/{id} Meeting detail (segments + speakers)
GET /meetings/{id}/segments Transcript segments
GET /meetings/{id}/speakers Per-speaker stats
GET /personas List personas
GET /personas/autocomplete?q= Ranked autocomplete
GET /personas/{name} Persona detail
PATCH /personas/{name} Update persona fields
GET /voicenotes List voicenote profiles
GET /voicenotes/{persona_name} Voicenote profile
PUT /voicenotes/{persona_name} Upsert voicenote (idempotent)

v0.2 (Phase 1)

All v0.2 routes are gated behind feature flags + auth (same auth_dependency as core routes). A route returns 503 when its feature flag is off or its required collaborator (BrainClient, TaskQueue, ffmpeg) is missing.

Method Path Description 503 gate
POST /chat BrainClient proxy (retrieval + Q&A) enable_chat=False OR brain_client is None
POST /search FTS5 segment search (Sqlite) / linear scan (InMemory) enable_search=False
POST /clips Enqueue ffmpeg clip job enable_clip_export=False OR ffmpeg not on PATH
GET /clips/{id}/download Stream rendered clip (FileResponse) enable_clip_export=False
POST /webhooks/capture-complete Record + enqueue post-capture job enable_webhooks=False OR rq queue unreachable

Multi-tenant scope: every list/search/chat/webhook surface accepts owner_user_id and threads it into repo filters, BrainClient.retrieve scope, and TaskQueue job kwargs.

Configuration (v0.2)

MeetbotAdminConfig adds the following fields on top of v0.1:

Field Type Default Notes
enable_chat bool False Gates /chat.
enable_search bool False Gates /search.
enable_clip_export bool False Gates /clips + /clips/{id}/download.
enable_webhooks bool False Gates /webhooks/capture-complete.
anthropic_api_key SecretStr | None None Excluded from model dump; never appears in /health.
clip_storage_dir Path | None None Where rendered clips land.
brain_client BrainClient | None None Host-injected. Excluded from dump.
task_queue TaskQueue | None None Host-injected. Excluded from dump.
redis_url str | None None Used by RqTaskQueue + worker CLI.

Env-var loading uses the MEETBOT_ADMIN_* prefix (e.g. MEETBOT_ADMIN_ENABLE_CHAT=true).

Worker CLI (v0.2)

Background jobs (post-capture pipeline, clip render, etc.) run via rq. Start a worker with:

lattice-meetbot-admin worker --redis-url redis://localhost:6379/0 --queue meetbot

Optional --owner-user-id scopes the worker to a single tenant (useful for per-tenant capacity isolation).

Migrations

lattice-meetbot-admin migrate --db-url sqlite:///./meetbot_admin.db

Alembic 0002 (shipped in v0.2) adds the FTS5 segments_fts shadow table, capture_events, and the voicenotes.owner_user_id column.

Deferred (v0.3+)

  • Worker-side owner_user_id enforcement (v0.2 carries the id end-to-end; worker filtering is not yet wired).

License

Apache-2.0. Author: CodeWarrior4Life.

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

lattice_meetbot_admin-0.2.0.tar.gz (583.2 kB view details)

Uploaded Source

Built Distribution

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

lattice_meetbot_admin-0.2.0-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file lattice_meetbot_admin-0.2.0.tar.gz.

File metadata

  • Download URL: lattice_meetbot_admin-0.2.0.tar.gz
  • Upload date:
  • Size: 583.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for lattice_meetbot_admin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 88dde3cea6d41a1f674697dcbbc9acc9bd8283af7183d67a1928372862bf7106
MD5 39705f879d895ac2db2bfcf584f3eb84
BLAKE2b-256 923ff8ec5fdd29c7ca59de8405afea38a7937ef6fb1044982339fac0717a5fe5

See more details on using hashes here.

File details

Details for the file lattice_meetbot_admin-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lattice_meetbot_admin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f10968c90d11287b4c8a3ac9f2e871a65a3125e84a2b543bcbc83864afae75
MD5 f2e5e8baa174962f445a4aba9766a7c7
BLAKE2b-256 132ec92dea65b93cad54d1899662230fba643ca4f1cb0dc8a629e6e3480efb03

See more details on using hashes here.

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