A framework to automate reacting to ActivityStreams events.
Project description
Mechanical Bull
Mechanical Bull is an ActivityPub Client application build based on bovine. It's main goal is to provide a platform for automating activities undertaking in the FediVerse. Furthermore, it serves as a demonstration how ActivityPub Clients can be build with bovine.
Installation
One can simply install mechanical_bull with pip via
pip install mechanical-bull
Once can then add a new user by running
python -m mechanical_bull.add_user
This will then ask you to enter a name, the hostname, your ActivityPub Actor lives on, then prompt you to add a new did:key to your ActivityPub Actor. This did:key will be used to authenticate mechanical_bull against your server. Once you have added the key, press enter, and mechanical_bull is running. This method of authentication is called Moo-Auth-1 and described here.
The configuration is saved in config.toml
. bovine also supports authentication through private keys and HTTP signatures. For the details on how to configure this, please consult bovine. You can add further automations there.
Then you should be able to run mechanical bull via
python -m mechanical_bull.run
Writing automations
The examples of mechanical_bull.actions.handle_follow_request
and mechanical_bull.actions.log_to_file
should show how to write a new automation. The basic idea is that each file contains a function handle with signature
async def handle(client: BovineClient, data: dict, **kwargs):
return
here the kwargs are the dict given by the definiton in the handler block, i.e.
[user.handlers]
"my.package" = { arg1 = "value1", arg2 = "value2 }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mechanical_bull-0.0.3.tar.gz
.
File metadata
- Download URL: mechanical_bull-0.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-69-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7de5f58d6a59e62ca55f516cf2999014d64b9ba8f2a540bcf84490fb3de28f6a |
|
MD5 | cb4a3d377e58240550d6a7a9f5f4bab6 |
|
BLAKE2b-256 | f647a262bb66685ab3029009b9df9973544c05826ff39c2e54dc8cecfaf0fd1e |
File details
Details for the file mechanical_bull-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mechanical_bull-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-69-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91326bc7ebfd098a11b09e366914de580296cae6e9715355159965bd8066cad6 |
|
MD5 | 0cec57ef3adcd419bba54409308206e6 |
|
BLAKE2b-256 | 8f4a1d43065dce9e0dea546e67b053cb015c5efa8300710d87ad1c9cf1a10fb7 |