Skip to main content

Kryten moderation service - handles chat moderation and filtering

Project description

"# Kryten Moderator

Kryten moderation service - handles chat moderation and filtering for CyTube.

Features

  • Real-time chat message monitoring
  • User tracking and management
  • Event-driven architecture using NATS
  • Extensible moderation rules

Installation

Prerequisites

  • Python 3.10 or higher
  • Poetry
  • NATS server running
  • kryten-py library

Setup

  1. Install dependencies:
uv sync
  1. Copy the example configuration:
cp config.example.json config.json
  1. Edit config.json with your settings:
{
  "nats_url": "nats://localhost:4222",
  "nats_subject_prefix": "kryten",
  "service_name": "moderator"
}

Usage

Running the Service

Using Poetry:

uv run kryten-moderator --config config.json

Using the startup script (PowerShell):

.\start-moderator.ps1

Using the startup script (Bash):

./start-moderator.sh

Command Line Options

  • --config PATH: Path to configuration file (default: /etc/kryten/moderator/config.json)
  • --log-level LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)

Event Handling

The service currently listens for:

  • chatMsg: Chat messages from users
  • addUser: User join events

Development

Running Tests

uv run pytest

Linting

uv run ruff check .

Formatting

uv run black .

License

MIT License - see LICENSE file for details "

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

kryten_moderator-0.7.7.tar.gz (169.4 kB view details)

Uploaded Source

Built Distribution

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

kryten_moderator-0.7.7-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file kryten_moderator-0.7.7.tar.gz.

File metadata

  • Download URL: kryten_moderator-0.7.7.tar.gz
  • Upload date:
  • Size: 169.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kryten_moderator-0.7.7.tar.gz
Algorithm Hash digest
SHA256 ace439c16af411d57cb858d72c5cec5595500841d6bb03e7bffc3d1565a8449c
MD5 bcf43015b91525859ad6258ab9b8bd09
BLAKE2b-256 5219c199ca245b2f8e388f213232bb30dd2bdee8544e8bfe3e7cee35227baddb

See more details on using hashes here.

File details

Details for the file kryten_moderator-0.7.7-py3-none-any.whl.

File metadata

File hashes

Hashes for kryten_moderator-0.7.7-py3-none-any.whl
Algorithm Hash digest
SHA256 230dfd89d6284b6894fd531a7261499a1b2c2af6569ff84d15762fe66ad16661
MD5 33a51bb7ae3a02ac93a8caaa18c78423
BLAKE2b-256 aa041f531029c7c96271ac74c9b4faaac637b406b5bfc078d8c1994a745e8db8

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