Skip to main content

An automatic follow request rejector for Mastodon

Project description

autoreject

a tool to automatically reject follow requests for mastodon accounts

criteria:

  • account age
  • whether a bio has been set
  • whether an account is a bot
  • no profile picture set
  • min/max followers count
  • min/max follow count
  • min/max post count

important to note: this tool will never accept a follow request. only reject based on these criteria.

current working level

you can define criteria and reject via the API

installing

python3 -m pip install mastodon-autoreject

here's the pypi page

defining criteria

when providing criteria to the functions that accept it, you provide a dict with the criteria to reject on.

If you don't want to reject based on a certain criteria, simply exclude it from the dict.

key value type description
min_follows integer reject accounts who have fewer than this number of follows
min_followers integer reject accounts who have fewer than this number of followers
max_follows integer reject accounts who have more than this number of follows
max_followers integer reject accounts who have more than this number of followers
has_bio boolean if True, reject accounts if they do not have a bio defined. If False, reject accounts that do have a bio defined.
has_avatar boolean if True, reject accounts if they have a default avatar. If False, reject accounts that have a custom avatar set.
min_posts integer reject accounts with fewer than this number of statuses/posts/toots/whatever
max_posts integer reject accounts with more than this number of statuses/posts/toots/whatever
min_age datetime.timedelta reject accounts that are younger than the given timedelta duration
no_bots boolean if True, rejects accounts if they have the bot flag set. If False, reject accounts that are not bots.

here's an example

criteria = {
    "min_follows": 10,
    "min_followers": 10,
    "max_follows": 100,
    "max_followers": 100,
    "has_bio": True,
    "has_avatar": True,
    "min_posts": 10,
    "max_posts": 100,
    "min_age": timedelta(days=7),
    "no_bots": True
}

# masto is a logged in instance of Mastodon.py, see here: https://mastodonpy.readthedocs.io/en/stable/#module-mastodon
masto = ... 

autoreject.reject_follows(masto, criteria) # will return a list of accounts that were rejected along with the reasons why

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

mastodon-autoreject-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

mastodon_autoreject-0.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file mastodon-autoreject-0.0.2.tar.gz.

File metadata

  • Download URL: mastodon-autoreject-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for mastodon-autoreject-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8eda3a4e08d830e1219b74466065aa807350632fa256b6746238a065c9574fbc
MD5 4e1f6b29cccf0b2783b9914ac9d7f936
BLAKE2b-256 d19ce570e77379a693779c90d044a290e0bd805b4d51d4ac7fdf2158c95ec42f

See more details on using hashes here.

File details

Details for the file mastodon_autoreject-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mastodon_autoreject-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for mastodon_autoreject-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1534688d07293adae4e9ed64519bbfad7cedfca41b0f0e32dd7fea2f9ba5066
MD5 0d95867b00bc021784742b0a3fb3bfc1
BLAKE2b-256 c50b41732c5db579e44c63a03e64ce893476704bb1e0736354eda190858456f0

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