{"id":15017751,"url":"https://github.com/kenny2github/mw-api-client","last_synced_at":"2025-08-31T12:36:04.418Z","repository":{"id":57444253,"uuid":"104206501","full_name":"Kenny2github/mw-api-client","owner":"Kenny2github","description":"A Pythonic way to access the MediaWiki API.","archived":false,"fork":false,"pushed_at":"2024-11-24T09:43:34.000Z","size":195,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-09T23:46:03.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kenny2github.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-20T11:25:10.000Z","updated_at":"2023-02-23T08:22:55.000Z","dependencies_parsed_at":"2024-09-16T09:30:40.387Z","dependency_job_id":"bcab41b4-a841-46f7-9184-f1038b295f64","html_url":"https://github.com/Kenny2github/mw-api-client","commit_stats":{"total_commits":98,"total_committers":6,"mean_commits":"16.333333333333332","dds":0.09183673469387754,"last_synced_commit":"b2775bb32c27835ebf0e39c30c937b3e506abe36"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenny2github%2Fmw-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenny2github%2Fmw-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenny2github%2Fmw-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenny2github%2Fmw-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kenny2github","download_url":"https://codeload.github.com/Kenny2github/mw-api-client/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248566578,"owners_count":21125690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:50:56.276Z","updated_at":"2025-04-12T12:32:04.534Z","avatar_url":"https://github.com/Kenny2github.png","language":"Python","readme":"\nA really simple MediaWiki API client.\n\nCan use most MediaWiki API modules.\n\nRequires the ``requests`` library.\n\nhttp://www.mediawiki.org/\n\nInstallation\n============\n\nTo install the latest stable version::\n\n    pip install -U mw-api-client\n\nTo install the latest development (likely unstable) version::\n\n    git clone https://github.com/Kenny2github/mw-api-client.git\n    cd mw-api-client\n    python setup.py install\n\nExample Usage\n=============\n\n.. code-block:: python\n\n    import mw_api_client as mw\n\nGet a page:\n\n.. code-block:: python\n\n    wp = mw.Wiki(\"https://en.wikipedia.org/w/api.php\", \"MyCoolBot/0.0.0\")\n\n    wp.login(\"kenny2wiki\", password)\n\n    sandbox = wp.page(\"User:Kenny2wiki/sandbox\")\n\nEdit page:\n\n.. code-block:: python\n\n    # Get the page\n    contents = sandbox.read()\n\n    # Change\n    contents += \"\\n This is a test!\"\n    summary = \"Made a test edit\"\n\n    # Submit\n    sandbox.edit(contents, summary)\n\nList pages in category:\n\n.. code-block:: python\n\n    for page in wp.category(\"Redirects\").categorymembers():\n        print(page.title)\n\nRemove all uses of a template:\n\n.. code-block:: python\n\n    stub = wp.template(\"Stub\")\n\n    # Pages that transclude stub, main namespace only\n    target_pages = list(stub.transclusions(namespace=0))\n\n    # Sort by title because it's prettier that way\n    target_pages.sort(key=lambda p: p.title)\n\n    for page in target_pages:\n        page.replace(\"{{stub}}\", \"\")\n\nPatrol all recent changes in the Help namespace:\n\n.. code-block:: python\n\n    rcs = wp.recentchanges(rcnamespace=12)\n\n    for rc in rcs:\n        rc.patrol()\n\n\nMade by Kenny2github, based off of ~blob8108's Scratch Wiki API client.\n\nMIT Licensed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenny2github%2Fmw-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenny2github%2Fmw-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenny2github%2Fmw-api-client/lists"}