Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple Gitter chatbot.

Project Description
=============
Hadroid Bot
=============

Installation
============
Hadroid is on PyPI:

.. code-block:: console

$ pip install hadroid

Configuration
=============
Copy the default configuration file:

.. code-block:: console

$ cp hadroid/config.py myconfig.py

Edit the ``myconfig.py`` and set the ``GITTER_PERSONAL_ACCESS_TOKEN`` to your
Gitter API token.

Point to your config with environmental variable:

.. code-block:: console

$ export HADROID_CONFIG=myconfig.py

Usage
=====
The bot is run using the ``hadroid`` command,
which allows for launching bot threads that can listen
on the Gitter channels for incoming commands or execute periodic tasks.

Run the bot on Gitter
~~~~~~~~~~~~~~~~~~~~
Bot will listen for messages and reply back on a single channel.
This can be either an orgazation channel, repository or a private one-on-one
chat with a user. The bot needs to be already in the room, or at least one
private message needs to be send to the bot.

First, run the main bot "server" application:

.. code-block:: console

$ hadroid run

Keep this session alive an in another session have the bot join some channels:

.. code-block:: console

$ hadroid --help

For CRON commands, run a CRON daemon in a separate shell:

.. code-block:: console

$ hadroid start stream <your_github_username>
$ hadroid start cron <your_github_username>

Deployment
==========
To deploy Hadroid you can use the provided `fabile.py
<http://docs.fabfile.org/en/latest/>`_ (tested on commonly used VPS vanilla
instances of Ubuntu 16.04 and Debian 8) in the following manner:

.. code-block:: console

$ # fabtools is a helper library for Fabric
$ pip2 install --user fabric fabtools

$ # "bootstrap" has to run once for each machine you plan to deploy
$ fab -U root -H my-server.xyz bootstrap

$ # You should run "deploy" everytime you change the config as well
$ fab -U root -H my-server.xyz deploy:config_path=/path/to/your/config.py

$ # To manage the bot you can use the "start/stop/restart" commands:
$ fab -U root -H my-server.xyz start

Take a look and modify the fabfile if your remote machine doesn't play well.


Release History

Release History

This version
History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hadroid-0.1.11-py2.py3-none-any.whl (21.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 17, 2017
hadroid-0.1.11.tar.gz (15.3 kB) Copy SHA256 Checksum SHA256 Source Sep 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting