Skip to main content

wikimedia-abusefilter-accounts

Find abuse filter accounts across Wikimedia wikis. This can be useful for reports and scripts that need to work with local sysop accounts without counting these accounts as regular admins.

Install

python3 -m pip install wikimedia-abusefilter-accounts

Usage

Get the accounts from one wiki:

from abusefilter_accounts import get_abuse_filter_accounts

accounts = get_abuse_filter_accounts("enwiki")["enwiki"]

Get them from all open Wikimedia wikis:

from abusefilter_accounts import get_abuse_filter_accounts

accounts = get_abuse_filter_accounts()

A wiki can be given as a database name, hostname, or full URL:

get_abuse_filter_accounts("enwiki")
get_abuse_filter_accounts("en.wikipedia.org")
get_abuse_filter_accounts("https://en.wikipedia.org")

You can also pass several wikis:

accounts = get_abuse_filter_accounts([
    "enwiki",
    "de.wikipedia.org",
    "https://fr.wikipedia.org",
])

To use a specific MySQL option file:

accounts = get_abuse_filter_accounts(
    "enwiki",
    cnf_file="/path/to/my.cnf",
)

Result

The result is a dictionary keyed by wiki database name:

{
    "enwiki": ["Example Account"],
    "dewiki": [],
}

Usernames are returned as strings, with underscores replaced by spaces.

When no wikis are provided, the package checks the open wikis listed in meta_p.wiki. When wikis are provided, only those wikis are checked.

Credentials

By default, the package uses the MySQL configuration available to Toolforge.

When cnf_file is provided, that file is used instead. Otherwise, the package checks ~/replica.my.cnf first and then ~/.my.cnf.

How it works

For each wiki, the package finds active local sysop accounts with no recorded revisions. These are the accounts returned as abuse filter accounts.

Limitations

This package needs access to Wikimedia replica databases, so it only works in Wikimedia environments such as Toolforge, PAWS, or Cloud VPS.

Documentation

Full documentation is available at:

https://wikimedia-abusefilter-accounts.readthedocs.io/

Metadata

Release files for wikimedia-abusefilter-accounts 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wikimedia-abusefilter-accounts 0.1.2
File Size Uploaded Provenance Actions
wikimedia_abusefilter_accounts-0.1.2.tar.gz 5.9 kB Without provenance Details for wikimedia_abusefilter_accounts-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wikimedia-abusefilter-accounts 0.1.2
File Interpreter ABI Platform Actions
wikimedia_abusefilter_accounts-0.1.2-py3-none-any.whl Python 3 none any Details for wikimedia_abusefilter_accounts-0.1.2-py3-none-any.whl

Total release size: 10.4 kB

Release files / wikimedia_abusefilter_accounts-0.1.2.tar.gz

Download URL wikimedia_abusefilter_accounts-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c40dc9a71ff41718d1351defa28ed9478e6d134ee207457f41a5581004e968aa
BLAKE2b-256 checksum
How to use checksums
440dd74711489a688995641eb604e0ac6b94b786f086198d6f3fd94c5dace1c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / wikimedia_abusefilter_accounts-0.1.2-py3-none-any.whl

Download URL wikimedia_abusefilter_accounts-0.1.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
912e3e533e94b2546c3bc5d9357757e471ff6e48f7d523e49958a6f66e82787b
BLAKE2b-256 checksum
How to use checksums
a538f455b36a7897dc2274981a6e7184652c67a26a79857ee36144839735454f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for wikimedia-abusefilter-accounts 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page