Skip to content

Code snippets in Python demonstrating how to use various modules of the MediaWiki Action API

License

Notifications You must be signed in to change notification settings

Abhishekism9450/MediaWiki-Action-API-Code-Samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

MediaWiki Action API Code Samples

Code snippets in Python demonstrating how to use various modules of the MediaWiki Action API

Authentication

Accounts and users

Page Operations

Search

Basics

Demo apps

  • Article suggestion: A sample app that uses MediaWiki Action API:Search allows you to pick a category and suggest articles to write on that don't yet exist on English Wikipedia. This app uses Flask and WTForms for rendering form.
  • Nearby places viewer: Demo of geo search for wiki pages near a location using the Geolocation API and MediaWiki Action API's Geosearch module.

Installation

$ git clone https://github.com/srish/MediaWiki_Action_API_Code_Samples
$ cd MediaWiki-Action-API-Code-Samples
Install the necessary python modules with pip
$ python3 name_of_the_file.py #Enter any credentials if required in the file

Contributing code samples

First, propose an idea for a code sample, demo app, etc. by creating an issue around it in the repository. After discussing your idea with the repo contributors, start working, and then send a pull request, when you've your changes ready to be accepted/ merged! You can autogenerate python files for GET Requests demos where feasible by following the instructions below:

$ cd MediaWiki-Action-API-Code-Samples
$ Add module information to `modules.json`
$ cd python
$ python autogenerator.py
$ Make desired changes to the newly generated file(s)

About

Code snippets in Python demonstrating how to use various modules of the MediaWiki Action API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.9%
  • HTML 9.9%
  • JavaScript 6.1%
  • CSS 4.1%