Skip to main content

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

Project description

Nexora Tasks 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 nexora_tasks_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 tasks-platform
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 nexora_tasks_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.2.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.2-py3-none-any.whl (648.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexora_tasks_server-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bf0a9dcd9e35cb63fba56a56cc4910943b79b70d95f5dcb26060172bfc7065fe
MD5 e35ecf2e2bb11dd33bca9bdf105bad55
BLAKE2b-256 b5cdc8041c9cb64f06d110df831f0518550501eea85316627ab3bcb0073b90c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nexora_tasks_server-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 648.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ba880961f34b08a09404ebe7f559874d07c7d059fa333159b528c2842d5828e9
MD5 439d4e71bd4c32416a2ec9d00c30a725
BLAKE2b-256 efb32d22bfcf30c37499e1c950733c4962b49ebb8b46dceed86c2925fd6e7fd6

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