Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

OB - Framework to program bots

Project description

[‘OB is pure python3 framework you can use if you want to program bots.n’, ‘It uses JSON as the storage backend and provides persistence in timestamped files.n’, ‘OB allows programming of own modules, commands, callbacks, db backends, own classes, etc.n’, ‘n’, ‘OB has a “no-clause MIT license” that should be the most liberal license you can get at the year 2018.n’, ‘n’, ‘source code is available with:n’, ‘n’, ‘::n’, ‘n’, ‘ hg clone’, ‘n’, ‘OB is on pypi:n’, ‘n’, ‘::n’, ‘n’, ‘ see’, ‘n’, ‘you can install it with:n’, ‘n’, ‘::n’, ‘n’, ‘ pip3 install obn’, ‘n’, ‘programsn’, ‘========n’, ‘n’, ‘the OB package provides these programs:n’, ‘n’, ‘::n’, ‘n’, ‘ ob tt- the OB program.n’, ‘ ob-do tt- create a distribution.n’, ‘ ob-docs t- create documentationn’, ‘ ob-sed t- sed programn’, ‘ ob-test t- test programn’, ‘n’, ‘to start an IRC bot use these options:n’, ‘n’, ‘::n’, ‘n’, ‘ ob -i irc -c localhost -j \#obbot -n obbot n’, ‘n’, ‘ connected localhostn’, ‘ > psn’, ‘ 0 4s CLI.dispatchn’, ‘ 1 4s CLI.loopn’, ‘ 2 4s IRC.loopn’, ‘n’, ‘optionsn’, ‘=======n’, ‘n’, ‘Usage: ob [options]n’, ‘n’, ‘Options:n’, ” –version show program’s version number and exitn”, ‘ -h, –help show this help message and exitn’, ‘ -a, –all load all modules.n’, ‘ -c SERVER, –connect=SERVERn’, ‘ server to connect to.n’, ‘ -d, –daemon enable daemon mode.n’, ‘ -i INIT, –init=INIT comma seperated init script names.n’, ‘ -j CHANNEL, –join=CHANNELn’, ‘ channel/room to join.n’, ‘ -l LEVEL, –level=LEVELn’, ‘ loglevel.n’, ‘ -m MODULES, –modules=MODULESn’, ‘ comma seperated list of modules.n’, ‘ -n NICK, –nick=NICK nick to use when joining a room.n’, ‘ -p PORT, –port=PORT server port to connect to.n’, ‘ -v, –verbose enable verbose mode.n’, ‘ -w WORKDIR, –workdir=WORKDIRn’, ‘ set working directory.n’, ‘ -u USER, –user=USER jabber user (JID) to connect with.n’, ‘ -z, –shell enable shell.n’, ‘ –ipv6 enable ipv6.n’, ‘ –license show license.n’, ‘ –resume flag set by the bot when rebooting.n’, ‘ –wait wait for bot to finish.n’, ‘ –password password to connect with.n’, ‘ –prompted use prompt.n’, ‘ –ssl enable ssln’, ‘n’, ‘n’, ‘configurationn’, ‘=============n’, ‘n’, ‘to edit config options use the ed command:n’, ‘n’, ‘::n’, ‘n’, ‘ ob ed ob.irc.Cfg channel \#obbotn’, ‘ ok channel=”#obbot”n’, ‘n’, ‘ ob ed ob.irc.Cfg n’, ‘ {n’, ‘ “channel”: “#obbot”,n’, ‘ “encoding”: “utf-8”,n’, ‘ “kind”: “irc”,n’, ‘ “level”: “error”,n’, ‘ “nick”: “obbot”,n’, ‘ “port”: “6667”,n’, ‘ “server”: “localhost”,n’, ‘ “ssl”: falsen’, ‘ }n’, ‘n’, ‘commandsn’, ‘========n’, ‘n’, ‘OB shell has the following commands:n’, ‘n’, ‘::n’, ‘n’, ‘ begintt- start a egg timer.n’, ‘ cfgtt- show config files.n’, ‘ cmdstt- show list of commands.n’, ‘ correspondence - show email conversations.n’, ‘ deletedt- show deleted records.n’, ‘ edtt- edit saved json objects.n’, ‘ endtt- stop the timer, show elapsed time.n’, ‘ exittt- stop the program.n’, ‘ fetchert- collect rss feeds.n’, ‘ findtt- find objects in the datastore.n’, ‘ fleettt- show list of registered bots.n’, ‘ fridaytt- set todo item for friday.n’, ‘ holiday - set todo item for the holidays.n’, ‘ housett- remember things todo around the house.n’, ‘ killtt- stop a thread.n’, ‘ lasttt- show last record of a object type.n’, ‘ loadtt- load a module.n’, ‘ logtt- log some text.n’, ‘ lstt- list subdirectories in the workdir.n’, ‘ mboxtt- scan a mbox/maildir and convert items to OB objects.n’, ‘ meettt- add a usern’, ‘ mondaytt- log a todo item on mondayn’, ‘ permtt- change permissions of a user.n’, ‘ pstt- show running threads.n’, ‘ quittt- quit the IRC server.n’, ‘ reboottt- reboot the bot.n’, ‘ rmtt- set the deleted flag on an object.n’, ‘ rmpermtt- remove permissions.n’, ” rsstt- add a RSS feed’s url.n”, ‘ saturdayt- log todo for saturday.n’, ‘ shoptt- add to shopping list.n’, ” sundaytt- sunday’s todo list.n”, ‘ testtt- echo test response.n’, ‘ todott- store a todo item.n’, ‘ timertt- echo text on a certain time.n’, ‘ thursdayt- thursday events.n’, ” tuesdayt- tuesday’s things todo.n”, ‘ unloadtt- unload a module.n’, ‘ uptime t- show uptime.n’, ‘ usertt- user lookup.n’, ‘ versiont- show OB version.n’, ‘ wednesdayt- thing todo on a wednesdayn’, ‘n’, ‘programmingn’, ‘===========n’, ‘n’, ‘Programming your own commands is easy, your can load your own module with the -m option.n’, ‘A command is simple a function with one argument, the event the was generated on the bot.n’, ‘n’, ‘::n’, ‘n’, ‘ def mycommand(event):n’, ‘n’, ‘ <<< your code here >>>n’, ‘n’, ‘You can use even.reply() to send response back to the user.n’, ‘n’, ‘modulesn’, ‘=======n’, ‘n’, ‘The following modules can be loaded from the ob package space:n’, ‘n’, ‘::n’, ‘n’, ‘ obtt- the ob package containing the Object class providing load/save to JSON functionality.n’, ‘ anytpett- contain any type constructable.n’, ‘ bottt- bot module for the Bot class, contains the basic Bot to inherit from.n’, ‘ clitt- the command line interface bot giving access to the bot from the shell.n’, ‘ clocktt- time, clock and repeater functions and classes.n’, ‘ cmdstt- commands subpackage containing the above listed commands.n’, ‘ dbtt- database functionality that can search through objects stored on disk.n’, ‘ dcctt- direct chat to chat bot.n’, ‘ emailtt- email scanning and analysing.n’, ‘ entrytt- enter logs, todoos and shop items etc.n’, ‘ eventtt- the Event class generated on bots when data is read from the socket.n’, ‘ fleettt- list of registered bots managed in the Fleet class.n’, ‘ handlert- the event handler of the bot.n’, ‘ inittt- start/stop scripts.n’, ‘ irctt- IRC bot.n’, ‘ loadertt- Loader class to load modules from ob space into the program.n’, ‘ objtt- the “dotted access dict” class allowing attribute access to dicts.n’, ‘ resttt- a REST server to share objects over HTTP.n’, ‘ rsstt- feed pollers that can echo feeds to the IRC channel (needs feedparser).n’, ‘ shelltt- shell related startup, cli arguments parsing and logging.n’, ‘ testtt- test code.n’, ‘ thrtt- thread module to launch, kill threads.n’, ‘ tracett- get tracedumps in a single string format.n’, ‘ udptt- udp to IRC channel server, tail -f your log files to a channel.n’, ‘ userstt- user management module.n’, ‘ utilstt- utility sub pakcage.n’, ‘ xmpptt- contains the XMPP bot (needs sleekxmpp)n’]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ob, version 14
Filename, size File type Python version Upload date Hashes
Filename, size ob-14.tar.gz (32.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page