ws.client.site module

class ws.client.site.Site(api)

Bases: ws.client.meta.Meta

The Site class holds information about the wiki site.

Valid properties are listed in the properties attribute, which is accessed by the __getattr__ method. The representation these automatic properties is the same as returned by the MediaWiki API, unless it is overridden by an explicit method of the same name in this class.

All properties are evaluated lazily and cached. The cache is never automatically invalidated, you should create a new instance for this.

module = 'siteinfo'
properties = {'dbrepllag', 'defaultoptions', 'extensions', 'extensiontags', 'fileextensions', 'functionhooks', 'general', 'interwikimap', 'languages', 'languagevariants', 'libraries', 'magicwords', 'namespacealiases', 'namespaces', 'protocols', 'restrictions', 'rightsinfo', 'showhooks', 'skins', 'specialpagealiases', 'statistics', 'uploaddialog', 'usergroups', 'variables'}
property interwikimap

Interwiki prefixes on the wiki, represented as a dictionary where keys are the available prefixes and additional information (as returned by the siteinfo/interwikimap API query).

property interlanguagemap

Interlanguage prefixes on the wiki, filtered from the general interwikimap property.

property namespaces

Namespaces represented as a mapping (dictionary) of namespace IDs to dictionaries with information returned by the API.

property namespacealiases

Namespace aliases represented as a mapping (dictionary) of namespace names to dictionaries with information returned by the API.

property namespacenames

Mapping of all valid namespace names, including canonical names and aliases, to the corresponding namespace ID.

property tags

A list of all change tags available on the wiki.