Tickstem Python SDK — cron jobs, uptime monitoring, heartbeat checks, email verification
Project description
tickstem-python
Python SDK for Tickstem — cron jobs, uptime monitoring, heartbeat checks, and email verification under a single API key.
pip install tickstem
Requires Python 3.11+.
Cron jobs
Schedule HTTP endpoints on a cron expression. Works on Vercel, Railway, Render, and Fly.io — no background processes required.
from tickstem import CronClient, CronRegisterParams
client = CronClient("tsk_your_api_key")
job = client.register(CronRegisterParams(
name="Send digest",
schedule="0 9 * * 1-5", # 9am weekdays
endpoint="https://yourapp.com/webhooks/digest",
method="POST",
))
print(job.id, job.next_run_at)
# List jobs and executions
jobs = client.list()
executions = client.executions(job.id)
# Pause / resume / delete
client.pause(job.id)
client.resume(job.id)
client.delete(job.id)
Uptime monitoring
Poll HTTP endpoints and get alerted by email on failure, recovery, and SSL expiry.
from tickstem import UptimeClient, UptimeCreateParams, Assertion
client = UptimeClient("tsk_your_api_key")
monitor = client.create(UptimeCreateParams(
name="Production API",
url="https://api.yourapp.com/health",
interval_secs=60,
assertions=[
Assertion(source="status_code", comparison="eq", target="200"),
Assertion(source="response_time", comparison="lt", target="2000"),
Assertion(source="body", comparison="contains", target='"status":"ok"'),
],
))
# Check history
checks = client.checks(monitor.id, limit=50)
for check in checks:
print(check.status, check.duration_ms, "ms")
# Pause / resume / delete
client.update(monitor.id, UptimeUpdateParams(status="paused"))
client.delete(monitor.id)
Heartbeat monitoring
Dead man's switch for scheduled jobs. Ping after each successful run — get alerted if pings stop arriving.
from tickstem import HeartbeatClient, HeartbeatCreateParams
client = HeartbeatClient("tsk_your_api_key")
# Create once — save the token
hb = client.create(HeartbeatCreateParams(
name="daily backup",
interval_secs=86400, # expect a ping every 24h
grace_secs=3600, # 1h grace before alerting
))
# At the end of every successful job run — no API key needed
status = client.ping(hb.token)
print(status) # "ok" or "paused"
# Pause / resume
client.pause(hb.id)
client.resume(hb.id)
Email verification
Check syntax, MX records, disposable domains, and role-based prefixes before storing an address.
from tickstem import VerifyClient
client = VerifyClient("tsk_your_api_key")
result = client.verify("user@example.com")
print(result.valid) # True
print(result.disposable) # False
print(result.role_based) # False
print(result.reason) # "" (empty when valid)
# Verification history
history = client.history(limit=20)
Error handling
from tickstem import CronClient, APIError, is_unauthorized, is_quota_exceeded
client = CronClient("tsk_your_api_key")
try:
jobs = client.list()
except APIError as err:
if is_unauthorized(err):
print("invalid API key")
elif is_quota_exceeded(err):
print("plan limit reached")
else:
print(f"error {err.status}: {err.message}")
Custom base URL / HTTP client
import httpx
from tickstem import CronClient
# Override base URL (e.g. for testing)
client = CronClient("tsk_test", base_url="http://localhost:8080/v1")
# Bring your own httpx.Client (timeouts, proxies, etc.)
http = httpx.Client(timeout=30.0)
client = CronClient("tsk_your_api_key", http_client=http)
# Use as a context manager to ensure the connection is closed
with CronClient("tsk_your_api_key") as client:
jobs = client.list()
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tickstem-1.0.0.tar.gz.
File metadata
- Download URL: tickstem-1.0.0.tar.gz
- Upload date:
- Size: 25.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd7c524abecb96f52de9845920c57da933625041b2a7bb80665fc91907e32c1
|
|
| MD5 |
0b2d90775492c95509cbce80439a49ec
|
|
| BLAKE2b-256 |
315b2a1ffbb17626e0d819fbdf4ecd5a411fef5ec96897a1df33459c9038dc2f
|
Provenance
The following attestation bundles were made for tickstem-1.0.0.tar.gz:
Publisher:
release.yml on tickstem/python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tickstem-1.0.0.tar.gz -
Subject digest:
6fd7c524abecb96f52de9845920c57da933625041b2a7bb80665fc91907e32c1 - Sigstore transparency entry: 1508080525
- Sigstore integration time:
-
Permalink:
tickstem/python@e29cc3f1646e6ec15ff1dc75ac946f7d5669b4de -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tickstem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e29cc3f1646e6ec15ff1dc75ac946f7d5669b4de -
Trigger Event:
push
-
Statement type:
File details
Details for the file tickstem-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tickstem-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8b381b2b0e20c7cd4dae478691d670c8a9cb7fa17c4d402cad0591669649422
|
|
| MD5 |
6ba65dd29143f849f10c6707c983fac8
|
|
| BLAKE2b-256 |
00e091fda6d2895f6aca9161b7a3fe3a3978e52535a2fd1b925e9505d17202f6
|
Provenance
The following attestation bundles were made for tickstem-1.0.0-py3-none-any.whl:
Publisher:
release.yml on tickstem/python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tickstem-1.0.0-py3-none-any.whl -
Subject digest:
b8b381b2b0e20c7cd4dae478691d670c8a9cb7fa17c4d402cad0591669649422 - Sigstore transparency entry: 1508080744
- Sigstore integration time:
-
Permalink:
tickstem/python@e29cc3f1646e6ec15ff1dc75ac946f7d5669b4de -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tickstem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e29cc3f1646e6ec15ff1dc75ac946f7d5669b4de -
Trigger Event:
push
-
Statement type: