Python SDK
Tickstem Python SDK — cron jobs, uptime, heartbeat, and email verification.
pip install tickstem — cron jobs, uptime monitoring, heartbeat checks and email verification for Python apps. One API key, Python 3.11+.
1
$ pip install tickstem
Requires Python 3.11+. Runtime dependency: httpx.
2
Get an API key
Sign in at app.tickstem.dev → API Keys → create a key. Store it as an environment variable:
$ export TICKSTEM_API_KEY=tsk_live_...
3
Add monitoring to your code
Cron jobs
import os
from tickstem import CronClient, CronRegisterParams
client = CronClient(os.environ["TICKSTEM_API_KEY"])
job = client.register(CronRegisterParams(
name="Send digest",
schedule="0 9 * * 1-5",
endpoint="https://yourapp.com/webhooks/digest",
))
# job.id, job.next_run_at
Uptime monitoring
import os
from tickstem import UptimeClient, UptimeCreateParams, Assertion
client = UptimeClient(os.environ["TICKSTEM_API_KEY"])
monitor = client.create(UptimeCreateParams(
name="Production API",
url="https://api.yourapp.com/health",
assertions=[Assertion(source="status_code", comparison="eq", target="200")],
))
# Tickstem checks every minute — alerts you when it goes down
Heartbeat monitoring
import os
from tickstem import HeartbeatClient, HeartbeatCreateParams
client = HeartbeatClient(os.environ["TICKSTEM_API_KEY"])
hb = client.create(HeartbeatCreateParams(
name="daily backup",
interval_secs=86400, # expect a ping every 24h
grace_secs=3600, # alert if 1h overdue
))
# Call this at the end of every successful run
client.ping(hb.token)
# If pings stop arriving, you receive an email alert
Email verification
import os
from tickstem import VerifyClient
client = VerifyClient(os.environ["TICKSTEM_API_KEY"])
result = client.verify("[email protected]")
if result.valid:
# proceed with signup
# result.disposable, result.role_based, result.reason