SDK
Python SDK
Unified SDK for Python — one install covers features, paywall, auth, and monitor.
Install
pip install git+https://github.com/onelo-tools/onelo-python-staging.gitInitialize
import os
from onelo import Onelo
# Initialize once at app startup (sync API — no await needed).
# This is a BACKEND SDK, so authenticate with your SERVER SECRET key
# (onelo_sk_live_*) — NOT a publishable key (those are public client-app
# identifiers). Create it in the Onelo dashboard → API Keys → Secret keys and
# read it from the environment; never hard-code a secret in source.
# ONELO_SECRET_KEY REQUIRED onelo_sk_live_...
onelo = Onelo(
secret_key=os.environ["ONELO_SECRET_KEY"],
api_url="https://st.backend.onelo.tools",
)
# Identify the user for per-user/per-plan targeting
onelo.identify(user_id)Usage
# Features — sync check, .is_enabled is a property (no parens)
if onelo.features.feature("export-button").is_enabled:
# allow access
pass
# Status helpers on a Feature:
# .is_enabled, .is_visible, .is_greyed, .is_new, .is_beta, .is_coming_soon, .is_upsell
# .upgrade_hint → plan label to render for a locked feature (e.g. "Pro"), or None
# .status → "enabled" | "new" | "beta" | "coming_soon" | "greyed" | "upsell" | "hidden"
# Note: forms and waitlist are website embeds, not SDK modules. This SDK
# provides backend feature gating (paywall plan checks planned for v1.x).Install from GitHub: pip install git+https://github.com/onelo-tools/onelo-python
Your publishable key
Replace onelo_pk_live_YOUR_KEY with your key from the dashboard → SDK tab.