taruvi-functions

Installation
SKILL.md

Taruvi functions (Python SDK)

Write Python code that runs inside Taruvi's serverless function runtime. This skill covers the function signature, the SDK module surface, the immutable auth pattern, runtime detection, and the execution model (sync vs async).

This skill is for the body of a deployed function. If you're registering a function's metadata (name, description, environment), switch to taruvi-backend-provisioning and use manage_function. If you're building the frontend that triggers the function, switch to taruvi-refine-frontend.

Core principles

  1. The function signature is fixed. Always def main(params, user_data, sdk_client). Don't rename parameters; the runtime binds them positionally.
  2. sdk_client is already authenticated with the calling user's context. Do not re-authenticate for the common case. Only call signInWithToken when you need to act as a different principal.
  3. Immutable auth. signInWithToken() returns a new client. Reassigning the variable is mandatory. Mutating operations on the original client won't reflect the new auth.
  4. Use log(), not print(). log() routes to Taruvi's structured logging and shows up in the function's invocation record. print() goes to stdout, which is harder to surface.
  5. Prefer sync in function bodies. The runtime auto-detects mode; async is only worth it when you're fanning out concurrent I/O. Sync is simpler and faster for the common case.

Function signature

Related skills

More from taruvi-ai/skills

Installs
2
First Seen
Apr 17, 2026