************************
Alfredo is a simple, extensible gtalk bot. It's capable of doing any kind of tasks, implemented as separated commands.
Here is a typical session: ::
you: inv some text
alfredo: called inv some text -> txet emos
Implementing a new command
**************************
Commands are implemented as Plugins (more at plugnplay <https://github.com/daltonmatos/plugnplay>). Just create a new class:
from alfredo import Plugin, ICommand
class SomeCommand(Plugin):
implements = [ICommand]
def help(self):
return ('short help', 'long help')
def name(self):
return 'mycommand'
def match_name(self, command):
return 'mycommand' == command
def run(self, user, *args)
# process some logic
return result
In this case we create a new command named 'mycommand'. If we send this message to alfredo:
mycommand p1 p2 p3
the ``run()`` method would be called like this: ``run('user@domain.com', 'p1', 'p2', 'p3')``. This method must return a string, that will be sent back to the original user.
How to use it
*************
To start talking to a running instance of alfredo just add ``alfredo@daltonmatos.com`` to your gtalk conacts list and you are done!
Or try out your own commands from the example code.
Dependencies
************
Alfredo's core components only needs:
* plugnplay - https://github.com/daltonmatos/plugnplay
* xmpppy - http://xmpppy.sourceforge.net/
The included commands needs:
* BeautifulSoup - http://www.crummy.com/software/BeautifulSoup/
* requests - https://github.com/kennethreitz/requests
* simplejson - http://code.google.com/p/simplejson/
You can even run the requirements file to get up your environment::
pip install -r requirements.txt
--
Dalton barreto
daltonmatos@gmail.com
Metadata
Release files for alfredo 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alfredo-0.2.tar.gz | 6.7 kB | Without provenance | Details for alfredo-0.2.tar.gz |
Release files / alfredo-0.2.tar.gz
| Download URL | alfredo-0.2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
961f4a5223d7c263df3cb83f14025cc63269e30b1a315f3a277e8ad71b6c1287
|
|
BLAKE2b-256 checksum How to use checksums |
60cc1ad51749985f6a2c274c13a6e6d82533c21a117df56acfb65bc19160c57f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for alfredo 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.