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:
poetry install
  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:

poetry 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

poetry run pytest

Linting

poetry run ruff check .

Formatting

poetry 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.2.1.tar.gz (10.0 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.2.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kryten_moderator-0.2.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.11 Windows/11

File hashes

Hashes for kryten_moderator-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c05187558c58ce52d8fb57385165a9664192ba78daccf81f7351a226b0825159
MD5 11422df9c50121ef83770fad48ce4d75
BLAKE2b-256 a9f87a133e5f1df8df482fd94c6c68348f918a394cb219d6a0e1ae2a754bd551

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kryten_moderator-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.11 Windows/11

File hashes

Hashes for kryten_moderator-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3793a8f7bddcdecf1c45f9761b4c4ef162fd70f6279abedb31e2577963129860
MD5 f1c1f295e9c82b23d249b449b9ada6aa
BLAKE2b-256 3e1b81589ee82031d3e1a054120c84f29241942fcf00f54e7a6b97cc5e9bf610

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