Skip to main content

Simple library for creating bots

Project description

python-droit

Droit is a simple library for creating bots - view on GitHub

Features

  • Advanced definition of question-to-answer rules using Droit Database Script
  • Multiple users supported
  • Integrated history functionallity to understand references to previous inputs
  • Extendable: create your own sub-rules ("plugins")

Learn

What's new about Droit v1.1?

1. Database object

A new object called Database will be now the core of python-droit. It combines the functionallity of __init__.py, tools.py, loader.py and dumper.py from Droit v1.0. You can use it to parse and dump a Database, you can load plugins into it and run useRules() and formatOut() from it. It replaces rpack as it also stores cache and history objects. The settings object was removed and replaced by so called sessions.

2. Plugins

Restructuring droit of caurse has an effect on the plugins. There are minimal adjustments that have to be done to make v1.0 plugins work with v1.1. The biggest change is that there are now two types of output plugins. On the one hand there are still those that are called using EVAL. The folder they are stored in is from now on called eval.pluginName. The new type of output plugins is similar to input plugins. Those plugins use a block() function. The TEXT and VAR blocks are no longer part of the core source code but plugins.

3. DroitIO

DroitIO will be removed as it is the task of the person who writes the bot to implement a solution for input and output. Probably there will be a ready-to-use bot based on python-droit soon that can be configured easily similar to what DroitIO offered.

4. Sessions

Droit v1.1 is the first version to support multiple users. Therefore so called sessions can be created. The Database object stores a DroitMultiSession object in it's parameter sessions. Using this object you can load and save sessions and switch between users. Plugins can access sessions and store data separately for each user.

License

This library is published under the terms of the GNU LESSER GENERAL PUBLIC LICENSE. Please see LICENSE for more information.
Copyright 2019-2020 Jakob Stolze

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

droit-1.1.0b9.tar.gz (26.3 kB view hashes)

Uploaded Source

Built Distribution

droit-1.1.0b9-py3-none-any.whl (26.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page