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.2.tar.gz (167.1 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.2-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kryten_moderator-0.7.2.tar.gz
  • Upload date:
  • Size: 167.1 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.2.tar.gz
Algorithm Hash digest
SHA256 1b22ce0157bdf22de0347082ad0e916b266e30d0b5e2f703ccded1f480cf8d95
MD5 a3a79d2127ca73ca5eb35a3357bb7625
BLAKE2b-256 1c1864e369a8b0e2a4fd5795ebf0b86840827df0a2c203a7c694db4f3efe4bce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kryten_moderator-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c805535335b1cf93397cee19be04b21d5f5fa2d8507704d298f46cf3d70a2921
MD5 2af5a1d0383c1ebad99c5fe78b882d2d
BLAKE2b-256 fb809e19b102569169451152168b3eba4a0946ea330faafc0437f9d4a18cba92

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