Skip to main content

Nexora Tasks server — deploy, schedule, and manage task workflows with a web UI, webhooks, and REST API

Project description

Task Framework Server

Production-grade task execution server with web UI, webhooks, scheduling, and multi-task support.

Installation

pip install nexora-tasks-server

Quick Start

Start the server

task-server --port 3000 --base-path ./data

Or use environment variables:

export PORT=3000
export BASE_PATH=/var/lib/task-server
export API_KEYS=your-api-key
export ADMIN_API_KEYS=your-admin-key
python -m task_framework_server.server

Access

Endpoint Description
http://localhost:3000/ui Web Dashboard
http://localhost:3000/docs OpenAPI Documentation
http://localhost:3000/health Health Check
http://localhost:3000/metrics Prometheus Metrics

Configuration

Environment Variables

Variable Default Description
PORT 3000 Server port
BASE_PATH ./data Base path for data storage
API_KEYS Comma-separated API keys for client auth
ADMIN_API_KEYS Comma-separated admin API keys
STORAGE_TYPE file Record/database backend: file or elasticsearch
FILE_STORAGE_TYPE local File storage backend: local or s3
LOG_LEVEL INFO Logging level

S3 Storage (optional)

export FILE_STORAGE_TYPE=s3
export S3_BUCKET=my-task-artifacts
export S3_REGION=eu-west-1
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

Elasticsearch (optional)

export STORAGE_TYPE=elasticsearch
export ELASTICSEARCH_HOSTS=http://localhost:9200

Deployment

Docker

docker build -t task-server .
docker run -p 3000:3000 \
  -e API_KEYS=your-key \
  -e ADMIN_API_KEYS=your-admin-key \
  -v ./data:/data \
  task-server

Docker Compose

docker-compose up -d

Pre-configured variants:

  • docker-compose.yml — Basic setup
  • docker-compose.elasticsearch.yml — With Elasticsearch
  • docker-compose.cloud.yml — Cloud-ready with S3
  • docker-compose.standalone.yml — Standalone mode

API Overview

Task Management (Admin)

# Deploy a task
curl -X POST http://localhost:3000/admin/tasks \
  -H "X-Admin-API-Key: your-admin-key" \
  -F "file=@my-task-1.0.0.zip"

# List deployed tasks
curl http://localhost:3000/admin/tasks \
  -H "X-Admin-API-Key: your-admin-key"

Thread Execution

# Create and run a thread
curl -X POST http://localhost:3000/threads \
  -H "X-API-Key: your-key" \
  -H "X-App-Id: my-app" \
  -H "X-User-Id: user-1" \
  -H "Content-Type: application/json" \
  -d '{"mode": "sync", "inputs": [{"kind": "text", "text": "Hello"}]}'

# Get thread status
curl http://localhost:3000/threads/{thread_id} \
  -H "X-API-Key: your-key"

# Pause/Resume
curl -X POST http://localhost:3000/threads/{thread_id}:pause \
  -H "X-API-Key: your-key"
curl -X POST http://localhost:3000/threads/{thread_id}:resume \
  -H "X-API-Key: your-key"

Webhooks

# Create a webhook
curl -X POST http://localhost:3000/webhooks \
  -H "X-Admin-API-Key: your-admin-key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/task-events",
    "events": ["thread.succeeded", "thread.failed"],
    "secret": "webhook-signing-secret"
  }'

Schedules

# Create a schedule
curl -X POST http://localhost:3000/schedules \
  -H "X-Admin-API-Key: your-admin-key" \
  -H "Content-Type: application/json" \
  -d '{
    "task_id": "my-task",
    "cron": "0 8 * * MON",
    "timezone": "Europe/Paris",
    "inputs": [{"kind": "text", "text": "Weekly run"}]
  }'

Features

  • Multi-task deployment with isolated code + venv per task
  • Worker subprocess isolation with JSON Lines IPC
  • Progress, pause, resume, cancel — cooperative task control
  • Python & Node.js task runtimes
  • Web Dashboard — full CRUD for all resources
  • Webhook system — HMAC-signed, scoped, with delivery tracking
  • Cron scheduling — with concurrency policies
  • Artifact management — local or S3 storage
  • Credential vault — AES-encrypted secret storage
  • Proxy mode — route to multiple task servers
  • Prometheus metrics — request counts, durations, thread states
  • Idempotency — duplicate request detection

Development

# Clone and setup
git clone https://github.com/Tessi-Wekey/tasks-platform.git
cd task-framework
uv sync

# Run server tests
uv run --package nexora-tasks-server pytest packages/server/tests/ -v

# Start dev server
uv run --package nexora-tasks-server python -m task_framework_server.server

License

MIT

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

nexora_tasks_server-1.0.0.tar.gz (516.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexora_tasks_server-1.0.0-py3-none-any.whl (648.8 kB view details)

Uploaded Python 3

File details

Details for the file nexora_tasks_server-1.0.0.tar.gz.

File metadata

  • Download URL: nexora_tasks_server-1.0.0.tar.gz
  • Upload date:
  • Size: 516.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nexora_tasks_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3ceb06485408492fdc955d273300c9a6160a0e49e97b34058124e71d9127518d
MD5 4c9ec081cb6d42f0d3d0046aaff05309
BLAKE2b-256 9b65712783d6f375ad1ea5765aa2cdd61200f0fa936c4b10dde26d7c05b88c65

See more details on using hashes here.

File details

Details for the file nexora_tasks_server-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nexora_tasks_server-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 648.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nexora_tasks_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d14fabb6626b2818c8939857f6787cb238d2f2c57d238ffb7474e43a131066f3
MD5 07b8fff81330aab300c0591699eb2717
BLAKE2b-256 c990e6c4817614a08b4abb7b6581f628956f3306daee4683e5cf9db3327ac993

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page