Skip to main content

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


Download files

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

Source Distribution

mechanical_bull-0.0.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

mechanical_bull-0.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mechanical_bull-0.0.4.tar.gz.

File metadata

  • Download URL: mechanical_bull-0.0.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.10.0-21-amd64

File hashes

Hashes for mechanical_bull-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0e9cbacda64d0bc515dfaaf6f91256fcd3086d5e01f2d9a439cfc8877099dde0
MD5 558c7bcfc53f40d94c2c2fe8ca500690
BLAKE2b-256 450de9dc83590f54c8aa8e6cd2d2625864b1d7ea3e00e343d53e3173bb0a6ab1

See more details on using hashes here.

File details

Details for the file mechanical_bull-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mechanical_bull-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.10.0-21-amd64

File hashes

Hashes for mechanical_bull-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4f20896e1c96f160dad49ff76589909fe3dfc4ece29c4077df24cf3a0931ea61
MD5 bb6cc4967232b0c36a54b76ab437373e
BLAKE2b-256 3ead843a5d89650c9652b3b5712deb33d12f7d74fa6126d6d5cf5590d11ab42e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page