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.3.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.3-py3-none-any.whl (648.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexora_tasks_server-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 1536f7fc5421cb8726ef3278569674807415df572765f7cdbcc14edb46688ca5
MD5 a3f47267bb2db783ef2983b2be781bef
BLAKE2b-256 7d9fab609c10cd65b6a7c022bbd8276fe0bf18072182a120803274b4790c4716

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nexora_tasks_server-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6ca9a895c78b94e29d8ef2fe598f45750274704b7c36081ca3d4e9011f8302b
MD5 115fc8af49247d015caa612e13af5e5d
BLAKE2b-256 faa99fe29dea1a42c1b00ac027b921598a5ce2b9d9471ea094f07566cba52328

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