Simple HTTP client for Orkera distributed task runner
Project description
Orkera SDK
Simple Python SDK for the Orkera's task scheduler.
🚀 Quick Start
To use the SDK, you need an API key. You can get one by signing up at https://orkera.com.
from orkera import OrkeraClient
from datetime import datetime, timedelta
# Initialize client (API URL is automatically set to https://api.orkera.com)
client = OrkeraClient(
api_key="your_api_key"
)
# Schedule a task
task_id = client.schedule_task(
task_name="calculate_sum",
task_kwargs={"a": 10, "b": 20},
schedule_time=datetime.now() + timedelta(seconds=10),
callback_url="https://your-callback-url.com/"
)
print(f"Task scheduled: {task_id}")
# List only scheduled tasks
scheduled_tasks = client.list_scheduled_tasks()
print(f"Scheduled tasks: {len(scheduled_tasks)}")
# Get specific task
task = client.get_task(task_id)
print(f"Task status: {task.status}")
📋 API Methods
schedule_task(task_name, callback_url, task_args=None, task_kwargs=None, schedule_time=None)- Schedule a tasklist_tasks()- List all tasks for the userlist_scheduled_tasks()- List only scheduled tasksget_task(task_id)- Get details of a specific task
🔄 What's New in v0.4.0
- Breaking Change:
callback_urlis now required when scheduling tasks - New Method: Added
list_scheduled_tasks()to list only scheduled tasks - Security: Enhanced server-side validation for callback URLs to prevent SSRF attacks
- Bug Fix: Fixed import issues in the SDK
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
orkera-0.4.0.tar.gz
(4.3 kB
view details)
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 orkera-0.4.0.tar.gz.
File metadata
- Download URL: orkera-0.4.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8246a93198d130fcad8194325243d5e4ac26e38cc4f06ebdf869f0b43a57cfbb
|
|
| MD5 |
0e413a428b935527039ecb131d3c98f0
|
|
| BLAKE2b-256 |
cc57a95026864f8fa467a89c40d6b61d30c5bc853047bb44a94aa02932a4bbbb
|
File details
Details for the file orkera-0.4.0-py3-none-any.whl.
File metadata
- Download URL: orkera-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a31bcdd53cdd8865adbc999d7ba272ea308090f2ae0c391ba9bd1f3620cfd139
|
|
| MD5 |
e6d03938ac28fdcfa33ab156e3b8d33d
|
|
| BLAKE2b-256 |
1d99253ad7679970b54b701692925c9d24a9ece36f94b9b32bfb6a12d7f34fcf
|