Skip to main content

A small bot based on twisted

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

This a bot based on twisted, mostly a python learning project

Consumers

  • flowdock: read message from flow dock stream API

Responders

  • face

  • whois

  • math

  • wat

  • xkcd

  • ascii

  • 9gag

Installation

Install dependencies:

pip install twisted
pip install twistedhttpstream
pip install requests
pip install sympy
pip install mocker
pip install pyopenssl
pip install python-flowdock
pip install markdown
pip install paramiko
pip install pyyaml
pip install ioc

Running Tests

python tests.py # run all tests python -m unittest responders.xkcd # run one test

Usage

# vim: set fileencoding=utf-8 :

import twistedhttpstream, yaml, sys, logging
from twisted.internet import reactor
import ioc

logging.basicConfig(level=logging.DEBUG)

container = ioc.build([
    'config.yml',
])

if __name__ == "__main__":

    for flow in container.parameters['consumers']:
        twistedhttpstream.stream(
            reactor,
            "https://stream.flowdock.com/flows/%s/%s" % (container.parameters["flowdock.%s.organisation" % flow], flow),
            container.get("consumer.%s.flowdock" % flow),
            username=container.parameters["flowdock.%s.user.token" % flow],
            password=""
        )


    reactor.run()

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

shirka-0.0.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shirka-0.0.2.macosx-10.8-x86_64.exe (77.0 kB view details)

Uploaded Source

File details

Details for the file shirka-0.0.2.tar.gz.

File metadata

  • Download URL: shirka-0.0.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shirka-0.0.2.tar.gz
Algorithm Hash digest
SHA256 63e8ec54bf5155aaa0931075876d5a157b1b752f5f5271968aba5e6a27b432d3
MD5 942b66f9ad929a172fa7fa4b57860de6
BLAKE2b-256 00a1f7f52fa951c9c9a6f2a79a040d43912072a31f47ed2f79ec1c1554b36019

See more details on using hashes here.

File details

Details for the file shirka-0.0.2.macosx-10.8-x86_64.exe.

File metadata

File hashes

Hashes for shirka-0.0.2.macosx-10.8-x86_64.exe
Algorithm Hash digest
SHA256 843e963c6bffc62343054c36fc566036926e1b6a5defbe25ecc354f5850697b0
MD5 13b58e8053946bb47a44aac7ec63ccbc
BLAKE2b-256 984db23c1635f80ea37f3ee635f21028458d4e4092a2431a09a6dc66c38bc649

See more details on using hashes here.

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