jobcelis
Official Python SDK for the Jobcelis Event Infrastructure Platform.
All API calls go to https://jobcelis.com by default — you only need your API key to get started.
Installation
pip install jobcelis
Quick Start
from jobcelis import JobcelisClient
# Only your API key is required — connects to https://jobcelis.com automatically
client = JobcelisClient(api_key="your_api_key")
Custom URL: If you're self-hosting Jobcelis, you can override the base URL:
client = JobcelisClient(api_key="your_api_key", base_url="https://your-instance.example.com")
Authentication
Two credentials exist:
- API key (
api_key, sent asX-Api-Key): events, webhooks, jobs, pipelines, project settings... - User JWT (
auth_token, sent asAuthorization: Bearer): the account routes/projects*,/projects/:id/members*,/invitations*and/me/*(GDPR). With only an API key they return 401.
The auth methods do not require an API key, and they store the returned JWT on the client.
from jobcelis import JobcelisClient
client = JobcelisClient() # or JobcelisClient(api_key="...", auth_token="eyJ...")
# Register a new account
user = client.register("alice@example.com", "SecurePass123!", name="Alice")
# Log in — returns {"user", "token"} (stored), or an MFA challenge
session = client.login("alice@example.com", "SecurePass123!")
if session.get("mfa_required"):
client.verify_mfa(session["mfa_token"], "123456") # TOTP code
projects = client.list_projects() # uses the stored JWT
# Refresh before it expires (defaults to the stored token)
client.refresh_token()
# Or set a JWT you already have (None clears it)
client.set_auth_token("eyJ...")
Events
# Send a single event
event = client.send_event("order.created", {"order_id": "123", "amount": 99.99})
# Send batch events (up to 1000)
batch = client.send_events([
{"topic": "order.created", "payload": {"order_id": "1"}},
{"topic": "order.created", "payload": {"order_id": "2"}},
])
# List events with pagination
events = client.list_events(limit=25)
next_page = client.list_events(limit=25, cursor=events["cursor"])
# Get / delete a single event
event = client.get_event("evt_abc123")
client.delete_event("evt_abc123")
Webhooks
# Create a webhook
webhook = client.create_webhook(
url="https://example.com/webhook",
topics=["order.*"],
)
# List, get, update, delete
webhooks = client.list_webhooks()
wh = client.get_webhook("wh_abc123")
client.update_webhook("wh_abc123", url="https://new-url.com/hook")
client.delete_webhook("wh_abc123")
# Health and templates
health = client.webhook_health("wh_abc123")
templates = client.webhook_templates()
Deliveries
deliveries = client.list_deliveries(limit=20, status="failed")
client.retry_delivery("del_abc123")
Dead Letters
dead_letters = client.list_dead_letters()
dl = client.get_dead_letter("dlq_abc123")
client.retry_dead_letter("dlq_abc123")
client.resolve_dead_letter("dlq_abc123")
Replays
replay = client.create_replay(
topic="order.created",
from_date="2026-01-01T00:00:00Z",
to_date="2026-01-31T23:59:59Z",
webhook_id="wh_abc123", # optional
)
replays = client.list_replays()
r = client.get_replay("rpl_abc123")
client.cancel_replay("rpl_abc123")
Scheduled Jobs
# Create a job
# Emit an event on a cron schedule ("daily", "weekly" and "monthly" also work)
job = client.create_job(
name="daily-report",
cron_expression="0 9 * * *",
topic="report.generate",
payload={"type": "daily"},
)
# Or POST to a URL
client.create_job(name="ping", cron_expression="daily", url="https://example.com/ping")
# CRUD
jobs = client.list_jobs(limit=10)
job = client.get_job("job_abc123")
client.update_job("job_abc123", cron_expression="0 10 * * *")
client.delete_job("job_abc123")
# List runs for a job
runs = client.list_job_runs("job_abc123", limit=20)
# Preview cron schedule
preview = client.cron_preview("0 9 * * *", count=10)
Pipelines
pipeline = client.create_pipeline(
name="order-processing",
topics=["order.created"],
webhook_id="wh_abc123", # required: where the processed events are delivered
steps=[
{"type": "filter", "field": "amount", "operator": "gt", "value": 100},
{"type": "transform", "operation": "set", "values": {"priority": "high"}},
{"type": "delay", "seconds": 60},
],
)["data"]
pipelines = client.list_pipelines()
p = client.get_pipeline("pipe_abc123")
client.update_pipeline("pipe_abc123", name="order-processing-v2")
client.delete_pipeline("pipe_abc123")
# Test a pipeline with a sample payload
result = client.test_pipeline("pipe_abc123", {"amount": 150}) # sent as {"payload": {...}}
Step types are filter, transform and delay. Transform steps need an operation: pick / remove
(fields), rename (mapping), set (values), template (template) or flatten.
Invitations
# List pending invitations
invitations = client.list_pending_invitations()
# Accept or reject
client.accept_invitation("inv_abc123")
client.reject_invitation("inv_def456")
Event Schemas
schema = client.create_event_schema(
topic="order.created",
schema={
"type": "object",
"properties": {
"order_id": {"type": "string"},
"amount": {"type": "number"},
},
"required": ["order_id", "amount"],
},
)
schemas = client.list_event_schemas()
s = client.get_event_schema("sch_abc123")
client.update_event_schema("sch_abc123", schema={"type": "object"})
client.delete_event_schema("sch_abc123")
# Validate a payload against a topic's schema
result = client.validate_payload("order.created", {"order_id": "123", "amount": 50})
Sandbox
# Create a temporary endpoint for testing
endpoint = client.create_sandbox_endpoint(name="my-test")
endpoints = client.list_sandbox_endpoints()
# Inspect received requests
requests = client.list_sandbox_requests("sbx_abc123", limit=20)
client.delete_sandbox_endpoint("sbx_abc123")
Analytics
events_chart = client.events_per_day(days=30)
deliveries_chart = client.deliveries_per_day(days=7)
topics = client.top_topics(limit=5)
stats = client.webhook_stats()
Project and Token Management
# Current project
project = client.get_project()
client.update_project(name="My Project v2")
# Topics
topics = client.list_topics()
# API token
token = client.get_token()
new_token = client.regenerate_token()
# Limit the token to scopes and client IPs (empty allowed_ips = any IP)
client.update_token_restrictions(scopes=["events:read", "events:write"], allowed_ips=["203.0.113.10"])
Multi-Project Management
Requires a user JWT (see Authentication).
projects = client.list_projects()
new_project = client.create_project("staging-env")
p = client.get_project_by_id("proj_abc123")
client.update_project_by_id("proj_abc123", name="production-env")
client.set_default_project("proj_abc123")
client.delete_project("proj_abc123")
Team Members
members = client.list_members("proj_abc123")
# Requires a user JWT. Roles: "viewer" (default) or "editor"
member = client.add_member("proj_abc123", "alice@example.com", role="editor")
client.update_member("proj_abc123", "mem_abc123", role="viewer")
client.remove_member("proj_abc123", "mem_abc123")
Audit Logs
logs = client.list_audit_logs(limit=100)
next_page = client.list_audit_logs(cursor=logs["cursor"])
Data Export
Export methods return raw bytes (CSV or JSON).
# Export as CSV
csv_data = client.export_events(format="csv")
with open("events.csv", "wb") as f:
f.write(csv_data)
# Export as JSON
json_data = client.export_deliveries(format="json")
# Other exports
client.export_jobs(format="csv")
client.export_audit_log(format="csv")
Simulate
# Dry-run an event to see which webhooks would fire
result = client.simulate_event("order.created", {"order_id": "test"})
GDPR / Privacy
Requires a user JWT (see Authentication).
# Consent management
consents = client.get_consents()
client.accept_consent("marketing")
# Data portability
my_data = client.export_my_data()
# Processing restrictions
client.restrict_processing(password="your_password")
client.lift_restriction()
# Right to object
client.object_to_processing()
client.restore_consent()
Health Check
health = client.health()
status = client.status() # alias of health(): GET /health
Retention & Purge
policy = client.get_retention_policy()
client.update_retention_policy({"events_days": 30, "deliveries_days": 30}) # sent as {"retention_policy": {...}}
client.preview_purge({"type": "events", "older_than": "2026-01-01"})
client.purge_data({"type": "events", "older_than": "2026-01-01"})
Retries
The client retries requests that fail during a brief outage (for example while the platform is being deployed):
- network errors (connection refused or reset, DNS, TLS, timeouts) and HTTP
429,502,503,504 - up to 6 retries with exponential backoff (1 s, 2 s, 4 s, 8 s, 16 s, 30 s, about 60 s in total, with jitter);
a
Retry-Afterheader is honoured (capped at 60 s) - a
POSTwithout an idempotency key is retried only on429and503(the server did not act on it); after a network error, timeout,502or504it may have, so it is not retried and a retry never creates a resource twice.send_eventsends anX-Idempotency-Keyheader (youridempotency_key, or a generated UUID) andsend_eventsadds anidempotency_keyto every event that has none, so retried events are never duplicated.
Other errors (400, 401, 404, 500, ...) are raised at once; after the last retry the error is the same
one you would get without retries.
# Change the number of retries
client = JobcelisClient(api_key="your_api_key", max_retries=3)
# Disable retries
client = JobcelisClient(api_key="your_api_key", max_retries=0)
Error Handling
from jobcelis import JobcelisClient, JobcelisError
client = JobcelisClient(api_key="your_api_key")
try:
event = client.get_event("nonexistent")
except JobcelisError as e:
print(f"Status: {e.status}") # 404
print(f"Detail: {e.detail}") # {"message": "Not found"}
Webhook Signature Verification
from jobcelis import verify_webhook_signature
# Flask example
@app.route('/webhook', methods=['POST'])
def handle_webhook():
is_valid = verify_webhook_signature(
secret='your_webhook_secret',
body=request.get_data(), # raw bytes (str also works)
signature=request.headers.get('X-Signature', '')
)
if not is_valid:
return 'Invalid signature', 401
event = request.get_json()
print(f"Received: {event['topic']}")
return 'OK', 200
License
BSL-1.1 (Business Source License)
Metadata
Release files for jobcelis 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jobcelis-1.8.0.tar.gz | 19.5 kB | Without provenance | Details for jobcelis-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jobcelis-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for jobcelis-1.8.0-py3-none-any.whl |
Total release size: 32.9 kB
Release files / jobcelis-1.8.0.tar.gz
| Download URL | jobcelis-1.8.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cf297caf5f40013231846bf944b646b6f541c635b95deb50354f4beb57ea3bc
|
|
BLAKE2b-256 checksum How to use checksums |
64f04ed0ad68065d16432d7b3086cda264652366d67dffd752b9f3efe8c8cc9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / jobcelis-1.8.0-py3-none-any.whl
| Download URL | jobcelis-1.8.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ab9a90461c7a47ab1933cf59fb95ec4321155da8095bb0d227e7246879239fb
|
|
BLAKE2b-256 checksum How to use checksums |
8b737daeb93db0abe0f50d8f7b2e1402884766649c022a952484c43bc59602f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for jobcelis 1.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.