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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kryten_moderator-0.3.4.tar.gz
Algorithm Hash digest
SHA256 96975adcb95ba2dab5276733ac62a2e1ad0b2c7495c38da28468e8c5801cf10f
MD5 ff70113b806e81926655395809690e8c
BLAKE2b-256 48b5b22e44eba508fd085fa17ab93f920d711a09843da4ab8c6252605cc737ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for kryten_moderator-0.3.4.tar.gz:

Publisher: python-publish.yml on grobertson/kryten-moderator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for kryten_moderator-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b4ec08320a6eb851348369e5737f631c79db371afa50656e16c3b0a3f532a213
MD5 c67051218b8c03465a1a36e9f3a1e530
BLAKE2b-256 73a7020a561c1ce517cc752d75945d72f360de0e3dca271c3082f40bcf0a8053

See more details on using hashes here.

Provenance

The following attestation bundles were made for kryten_moderator-0.3.4-py3-none-any.whl:

Publisher: python-publish.yml on grobertson/kryten-moderator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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