Deutsch English Français Italiano |
<mailman.142.1742553443.2912.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: Schimon Jehudah <sch@fedora.email> Newsgroups: comp.lang.python Subject: Re: Creating a framework for bots Date: Fri, 21 Mar 2025 12:37:02 +0200 Lines: 55 Message-ID: <mailman.142.1742553443.2912.python-list@python.org> References: <20250318082301.0077ef3e@workstation.localdomain> <20250321123702.702b2b4f@workstation.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de jMFEUGt0myoxQ1DK0XBulgJ3F2lNn+tUlQmipWiRpclQ== Cancel-Lock: sha1:jzXVDXb8NrWY7MlPFAVol4yTc4Q= sha256:usowExck85R+rwNleU1vVzgNp6uiQrH7DpPCHliYKlw= Return-Path: <sch@fedora.email> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="1024-bit key; unprotected key" header.d=fedora.email header.i=@fedora.email header.b=nT15M25S; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'def': 0.04; 'yet.': 0.04; 'mar': 0.07; 'received:205': 0.07; '+0200': 0.09; 'advise.': 0.09; 'example:': 0.09; 'received:email': 0.09; 'url:eu': 0.09; 'import': 0.15; 'possible,': 0.15; '2025': 0.16; 'bots': 0.16; 'irc': 0.16; 'templates,': 0.16; 'url-ip:213.136/16': 0.16; 'url- ip:5/8': 0.16; 'url:sch': 0.16; 'wrote:': 0.16; 'instead': 0.17; 'to:addr:python-list': 0.20; 'skip:_ 10': 0.22; 'code': 0.23; 'depends': 0.25; 'framework': 0.26; 'so.': 0.26; 'visual': 0.26; 'creating': 0.27; 'function': 0.27; 'thinking': 0.28; 'event.': 0.28; 'ideas': 0.28; 'think': 0.29; 'attempt': 0.31; 'module': 0.31; 'tue,': 0.31; 'python-list': 0.32; 'structure': 0.32; 'subject:for': 0.32; 'header:In-Reply-To:1': 0.34; 'functions': 0.36; 'class': 0.37; 'file': 0.38; 'use': 0.39; 'match': 0.40; 'want': 0.40; 'should': 0.40; 'event': 0.40; 'including': 0.60; 'chat': 0.61; 'skip:h 10': 0.61; 'copy': 0.63; 'upon': 0.65; 'url:net': 0.67; 'attached': 0.68; 'content-type:multipart/mixed': 0.68; 'day.': 0.68; 'skip:x 30': 0.69; 'contact': 0.70; 'received:185': 0.71; 'skip:f 20': 0.75; 'received:localdomain': 0.81; 'contacts': 0.82; 'password,': 0.84; 'provides.': 0.84; 'subject:Creating': 0.84; 'url:st': 0.84; 'day!': 0.85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fedora.email; q=dns/txt; s=aug2020; bh=nADXw6lPLcS6hLZpudoBohG/FivhWTNEn6fChiRos14=; h=from:subject:date:message-id:to:mime-version:content-type:in-reply-to:references; b=nT15M25S+lQTFckT2jR4njIIfaWFLaGfvYiykujD5U29nu1sGy+O/UuXDsc0Jl21b7ZVu8RYv unbe1f3o6LubSoNWowjobPXkbTYpsDBRSJKfFFxB5oO5O4BAqCJe0C+6c7aS+8EvFK2P2eD+fyx r/L5SnC5E2DXbGh8GC5GXOA= X-Zone-Loop: 80e095ad221303d2d425b3ba733b441122a6629cfbcb X-Originating-IP: [185.220.100.254] In-Reply-To: <20250318082301.0077ef3e@workstation.localdomain> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.48; x86_64-pc-linux-gnu) Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <20250321123702.702b2b4f@workstation.localdomain> X-Mailman-Original-References: <20250318082301.0077ef3e@workstation.localdomain> Bytes: 5544 Good day. I am studynig decorators, and I am yet to understand how to create a dcorator for a function which is invoked upon an event. That is, the function depends upon an event from the event system of Slixmpp, and the external decorator should be invoked by it. gemini://woodpeckersnest.space/~schapps/journal/2025-03-19-designing-a-fram= ework-for-xmpp-chat-bots.gmi =46rom the frameworks of Flask, and FastAPI, I suppose that it should be possible, and I do not understand that system yet to do so. In the attached file you would see what I think that I want to do for some of the functions that Slixmpp provides. https://bpa.st/PDNA. Please advise. Regards, Schimon On Tue, 18 Mar 2025 08:24:29 +0200 Schimon Jehudah via Python-list <python-list@python.org> wrote: > Good day! >=20 > My name is Schimon, and I create software in a form of XMPP contacts > (i.e. bots) with chat and visual interfaces. >=20 > https://git.xmpp-it.net/sch >=20 > I already have three bots, and several ideas for other bots, including > BitTorrent, MPD, and even Chess. >=20 > gemini://woodpeckersnest.space/~schapps/journal/2024-05-23-slixfeed-news-= bot.gmi >=20 > https://schapps.woodpeckersnest.eu/journal/2024-05-23-slixfeed-news-bot/#= preview >=20 > The basic structure of all of the bots is almost identical. >=20 > Instead of repeating code and copy and paste my own templates, I was > thinking of creating a framework for creating XMPP bots, based on the > module Slixmpp, and perhaps also for IRC and MQTT. >=20 > I do not know how to design a framework yet. >=20 > I would appreciate guidance. >=20 > Kind regards, > Schimon