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.3.2.tar.gz (21.7 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.3.2-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kryten_moderator-0.3.2.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for kryten_moderator-0.3.2.tar.gz
Algorithm Hash digest
SHA256 a6bebb4016cd9b226bff0e76991f424eef35c10f69567d48056534f38370141e
MD5 f660ea106170cb05c642540288463145
BLAKE2b-256 800b5df48a01a744e127867c5749f1ab678fa023bc1e85edb816a2b075d6d577

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kryten_moderator-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8de1192cf3a579400cab1da86cf387c633375fd48e81b03cdd17573dab9c339f
MD5 1dcc571ac122a5c6da286f7165b79587
BLAKE2b-256 c19b4407beceffe90932f5f719802f31cad278cd929add829cb39d2e1d6a49b9

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