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.6.5.tar.gz (154.9 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.6.5-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kryten_moderator-0.6.5.tar.gz
  • Upload date:
  • Size: 154.9 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.6.5.tar.gz
Algorithm Hash digest
SHA256 6b1f380fe66bed349e1b385d22a1b0a90d918eae90fca79fe12231711740df6c
MD5 a31f6471d7e69c5df14d31979ecf39b4
BLAKE2b-256 28a67f249a2ffa75814ff76d633d3b20997d27fbe6b979a4f8ba6dab73dc0766

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kryten_moderator-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c442c7c9ed30802d5cdd2713d5e587357f8d2f2aeb55fdf1a23a3f8e002fdea
MD5 ebe5a9991332228548b617a4dc7b3cfd
BLAKE2b-256 aedc6dcfd99f38aab1639cd07e9148b34d284bcbfe82bcbb2894585ad925aeb5

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