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.1.1.tar.gz (5.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.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kryten_moderator-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 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.1.1.tar.gz
Algorithm Hash digest
SHA256 c6acf4cb0b240007015c7a03c652a3632c5c6dc3545f1b1ad43f813e70cb84f0
MD5 fa016704f875382c77f0d67759692db0
BLAKE2b-256 3c950a19abfd2cdcdc471b786218493ac741e0cdf166105dc7fe29ca0bcbadb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for kryten_moderator-0.1.1.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.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kryten_moderator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6e18a3eeedfb17696b5062ca9f1119859a9e7738ca6a0f880e99f6fdb690022
MD5 355097f93476f52bebb1aca00f9e8def
BLAKE2b-256 205ed98d7eeecc9f69b51e67a9940406a15913664703d1473c89003d1ab1ee67

See more details on using hashes here.

Provenance

The following attestation bundles were made for kryten_moderator-0.1.1-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