Skip to main content

Sync client

from vela import VelaManagementClient

with VelaManagementClient(os.environ["VELA_CLIENT_SECRET"]) as client:
    apps = client.apps.list()
    app_res = client.for_app(apps[0].slug)
    schemas = app_res.schemas.list()

Async client

from vela import AsyncVelaManagementClient

async with AsyncVelaManagementClient(os.environ["VELA_CLIENT_SECRET"]) as client:
    apps = await client.apps.list()

Constructor

VelaManagementClient(
    client_secret: str,
    *,
    base_url: str = "https://api.vela.dev",
    timeout: float = 30.0,
)

App-scoped resources

Use for_app() to get scoped resource handles:
app_res = client.for_app("order-service")  # UUID or slug

schemas = app_res.schemas.list()
rules = app_res.notification_rules.list()
events = app_res.events.list()
ResourceDescription
app_res.schemasEvent schemas
app_res.notification_rulesNotification rules
app_res.eventsEvent listing