import pywikibot
    site = pywikibot.Site("test", "wikidata")

def create_item(site, label_dict):
    new_item = pywikibot.ItemPage(site)
    new_item.editLabels(labels=label_dict, summary="Setting labels")
    # Add description here or in another function
    return new_item.getID()

some_labels = {"en": "Hamburg Main Station", "de": "Hamburg Hauptbahnhof"}
new_item_id = create_item(site, some_labels)
import pywikibot
help( pywikibot.ItemPage)
Help on class ItemPage in module pywikibot.page:

class ItemPage(WikibasePage)
 |  Wikibase entity of type 'item'.
 |  
 |  A Wikibase item may be defined by either a 'Q' id (qid),
 |  or by a site & title.
 |  
 |  If an item is defined by site & title, once an item's qid has
 |  been looked up, the item is then defined by the qid.
 |  
 |  Method resolution order:
 |      ItemPage
 |      WikibasePage
 |      BasePage
 |      pywikibot.tools.UnicodeMixin
 |      pywikibot.tools.ComparableMixin
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  __init__(self, site, title=None, ns=None)
 |      Initializer.
 |      
 |      @param site: data repository
 |      @type site: pywikibot.site.DataSite
 |      @param title: id number of item, "Q###",
 |                    -1 or None for an empty item.
 |      @type title: str
 |      @type ns: namespace
 |      @type ns: Namespace instance, or int, or None
 |          for default item_namespace
 |  
 |  concept_uri(self)
 |      Return the full concept URI.
 |  
 |  concept_url = call(*a, **kw)
 |  
 |  get(self, force=False, get_redirect=False, *args, **kwargs)
 |      Fetch all item data, and cache it.
 |      
 |      @param force: override caching
 |      @type force: bool
 |      @param get_redirect: return the item content, do not follow the
 |                           redirect, do not raise an exception.
 |      @type get_redirect: bool
 |      @raise NotImplementedError: a value in args or kwargs
 |  
 |  getRedirectTarget(self)
 |      Return the redirect target for this page.
 |  
 |  getSitelink(self, site, force=False)
 |      Return the title for the specific site.
 |      
 |      If the item doesn't have that language, raise NoPage.
 |      
 |      @param site: Site to find the linked page of.
 |      @type site: pywikibot.Site or database name
 |      @param force: override caching
 |      
 |      @rtype: str
 |  
 |  isRedirectPage(self)
 |      Return True if item is a redirect, False if not or not existing.
 |  
 |  iterlinks(self, family=None)
 |      Iterate through all the sitelinks.
 |      
 |      @param family: string/Family object which represents what family of
 |                     links to iterate
 |      @type family: str|pywikibot.family.Family
 |      @return: iterator of pywikibot.Page objects
 |      @rtype: iterator
 |  
 |  mergeInto(self, item, **kwargs)
 |      Merge the item into another item.
 |      
 |      @param item: The item to merge into
 |      @type item: ItemPage
 |  
 |  removeSitelink(self, site, **kwargs)
 |      Remove a sitelink.
 |      
 |      A site can either be a Site object, or it can be a dbName.
 |  
 |  removeSitelinks(self, sites, **kwargs)
 |      Remove sitelinks.
 |      
 |      Sites should be a list, with values either
 |      being Site objects, or dbNames.
 |  
 |  setSitelink(self, sitelink, **kwargs)
 |      Set sitelinks. Calls setSitelinks().
 |      
 |      A sitelink can either be a Page object,
 |      or a {'site':dbname,'title':title} dictionary.
 |  
 |  setSitelinks(self, sitelinks, **kwargs)
 |      Set sitelinks.
 |      
 |      Sitelinks should be a list. Each item in the
 |      list can either be a Page object, or a dict
 |      with a value for 'site' and 'title'.
 |  
 |  set_redirect_target(self, target_page, create=False, force=False, keep_section=False, save=True, **kwargs)
 |      Make the item redirect to another item.
 |      
 |      You need to define an extra argument to make this work, like save=True
 |      
 |      @param target_page: target of the redirect, this argument is required.
 |      @type target_page: ItemPage or string
 |      @param force: if true, it sets the redirect target even the page
 |          is not redirect.
 |      @type force: bool
 |  
 |  title(self, **kwargs)
 |      Return ID as title of the ItemPage.
 |      
 |      If the ItemPage was lazy-loaded via ItemPage.fromPage, this method
 |      will fetch the wikibase item ID for the page, potentially raising
 |      NoPage with the page on the linked wiki if it does not exist, or
 |      does not have a corresponding wikibase item ID.
 |      
 |      This method also refreshes the title if the id property was set.
 |      i.e. item.id = 'Q60'
 |      
 |      All optional keyword parameters are passed to the superclass.
 |  
 |  toJSON(self, diffto=None)
 |      Create JSON suitable for Wikibase API.
 |      
 |      When diffto is provided, JSON representing differences
 |      to the provided data is created.
 |      
 |      @param diffto: JSON containing claim data
 |      @type diffto: dict
 |      
 |      @rtype: dict
 |  
 |  ----------------------------------------------------------------------
 |  Class methods defined here:
 |  
 |  fromPage(page, lazy_load=False) from builtins.type
 |      Get the ItemPage for a Page that links to it.
 |      
 |      @param page: Page to look for corresponding data item
 |      @type page: pywikibot.Page
 |      @param lazy_load: Do not raise NoPage if either page or corresponding
 |                        ItemPage does not exist.
 |      @type lazy_load: bool
 |      @rtype: ItemPage
 |      
 |      @raise NoPage: There is no corresponding ItemPage for the page
 |      @raise WikiBaseError: The site of the page has no data repository.
 |  
 |  from_entity_uri(site, uri, lazy_load=False) from builtins.type
 |      Get the ItemPage from its entity uri.
 |      
 |      @param site: The Wikibase site for the item.
 |      @type site: pywikibot.site.DataSite
 |      @param uri: Entity uri for the Wikibase item.
 |      @type uri: basestring
 |      @param lazy_load: Do not raise NoPage if ItemPage does not exist.
 |      @type lazy_load: bool
 |      @rtype: ItemPage
 |      
 |      @raise TypeError: Site is not a valid DataSite.
 |      @raise ValueError: Site does not match the base of the provided uri.
 |      @raise NoPage: Uri points to non-existent item.
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  entity_type = 'item'
 |  
 |  title_pattern = r'^(Q[1-9]\d*|-1)$'
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from WikibasePage:
 |  
 |  __delattr__(self, attr)
 |      Attribute deleter. Deprecates lastrevid.
 |  
 |  __getattribute__(self, name)
 |      Low-level attribute getter. Deprecates lastrevid.
 |  
 |  __setattr__(self, attr, value)
 |      Attribute setter. Deprecates lastrevid.
 |  
 |  addClaim(self, claim, bot=True, **kwargs)
 |      Add a claim to the entity.
 |      
 |      @param claim: The claim to add
 |      @type claim: Claim
 |      @param bot: Whether to flag as bot (if possible)
 |      @type bot: bool
 |      @keyword asynchronous: if True, launch a separate thread to add claim
 |          asynchronously
 |      @type asynchronous: bool
 |      @keyword callback: a callable object that will be called after the
 |          claim has been added. It must take two arguments:
 |          (1) a WikibasePage object, and (2) an exception instance,
 |          which will be None if the entity was saved successfully. This is
 |          intended for use by bots that need to keep track of which saves
 |          were successful.
 |      @type callback: callable
 |  
 |  botMayEdit(self)
 |      Return whether bots may edit this page.
 |      
 |      Because there is currently no system to mark a page that it shouldn't
 |      be edited by bots on Wikibase pages it always returns True. The content
 |      of the page is not text but a dict, the original way (to search for a
 |      template) doesn't apply.
 |      
 |      @return: True
 |      @rtype: bool
 |  
 |  editAliases(self, aliases, **kwargs)
 |      Edit entity aliases.
 |      
 |      Aliases should be a dict, with the key
 |      as a language or a site object. The
 |      value should be a list of strings.
 |  
 |  editDescriptions(self, descriptions, **kwargs)
 |      Edit entity descriptions.
 |      
 |      Descriptions should be a dict, with the key
 |      as a language or a site object. The
 |      value should be the string to set it to.
 |      You can set it to '' to remove the description.
 |  
 |  editEntity(self, data=None, **kwargs)
 |      Edit an entity using Wikibase wbeditentity API.
 |      
 |      This function is wrapped around by:
 |       - editLabels
 |       - editDescriptions
 |       - editAliases
 |       - ItemPage.setSitelinks
 |      
 |      @param data: Data to be saved
 |      @type data: dict, or None to save the current content of the entity.
 |      @keyword asynchronous: if True, launch a separate thread to edit
 |          asynchronously
 |      @type asynchronous: bool
 |      @keyword callback: a callable object that will be called after the
 |          entity has been updated. It must take two arguments: (1) a
 |          WikibasePage object, and (2) an exception instance, which will be
 |          None if the page was saved successfully. This is intended for use
 |          by bots that need to keep track of which saves were successful.
 |      @type callback: callable
 |  
 |  editLabels(self, labels, **kwargs)
 |      Edit entity labels.
 |      
 |      Labels should be a dict, with the key
 |      as a language or a site object. The
 |      value should be the string to set it to.
 |      You can set it to '' to remove the label.
 |  
 |  exists(self)
 |      Determine if an entity exists in the data repository.
 |      
 |      @rtype: bool
 |  
 |  getID(self, numeric=False, force=False)
 |      Get the entity identifier.
 |      
 |      @param numeric: Strip the first letter and return an int
 |      @type numeric: bool
 |      @param force: Force an update of new data
 |      @type force: bool
 |  
 |  getdbName(self, site)
 |      Helper function to obtain a dbName for a Site.
 |      
 |      @param site: The site to look up.
 |      @type site: Site
 |  
 |  namespace(self)
 |      Return the number of the namespace of the entity.
 |      
 |      @return: Namespace id
 |      @rtype: int
 |  
 |  removeClaims(self, claims, **kwargs)
 |      Remove the claims from the entity.
 |      
 |      @param claims: list of claims to be removed
 |      @type claims: list or pywikibot.Claim
 |  
 |  ----------------------------------------------------------------------
 |  Class methods inherited from WikibasePage:
 |  
 |  is_valid_id(entity_id) from builtins.type
 |      Whether the string can be a valid id of the entity type.
 |      
 |      @param entity_id: The ID to test.
 |      @type entity_id: basestring
 |      
 |      @rtype: bool
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from WikibasePage:
 |  
 |  latest_revision_id
 |      Get the revision identifier for the most recent revision of the entity.
 |      
 |      @rtype: long
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from BasePage:
 |  
 |  __hash__(self)
 |      A stable identifier to be used as a key in hash-tables.
 |      
 |      This relies on the fact that the string
 |      representation of an instance can not change after the construction.
 |  
 |  __repr__(self)
 |      Return a more complete string representation.
 |  
 |  __unicode__(self)
 |      Return a unicode string representation.
 |  
 |  applicable_protections(self)
 |      Return the protection types allowed for that page.
 |      
 |      If the page doesn't exists it only returns "create". Otherwise it
 |      returns all protection types provided by the site, except "create".
 |      It also removes "upload" if that page is not in the File namespace.
 |      
 |      It is possible, that it returns an empty set, but only if original
 |      protection types were removed.
 |      
 |      @return: set of unicode
 |      @rtype: set
 |  
 |  aslink(self, force_interwiki=False, textlink=False, no_interwiki=False, forceInterwiki='[deprecated name of force_interwiki]', noInterwiki='[deprecated name of no_interwiki]')
 |      DEPRECATED: use self.title(as_link=True) instead.
 |  
 |  autoFormat(self)
 |      Return L{date.getAutoFormat} dictName and value, if any.
 |      
 |      Value can be a year, date, etc., and dictName is 'YearBC',
 |      'Year_December', or another dictionary name. Please note that two
 |      entries may have exactly the same autoFormat, but be in two
 |      different namespaces, as some sites have categories with the
 |      same names. Regular titles return (None, None).
 |  
 |  backlinks(self, follow_redirects=True, filter_redirects=None, namespaces=None, total=None, content=False, step=NotImplemented, followRedirects='[deprecated name of follow_redirects]', filterRedirects='[deprecated name of filter_redirects]')
 |      Return an iterator for pages that link to this page.
 |      
 |      @param follow_redirects: if True, also iterate pages that link to a
 |          redirect pointing to the page.
 |      @param filter_redirects: if True, only iterate redirects; if False,
 |          omit redirects; if None, do not filter
 |      @param namespaces: only iterate pages in these namespaces
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each referring page (default False)
 |  
 |  canBeEdited(self)
 |      Determine whether the page may be edited.
 |      
 |      This returns True if and only if:
 |        - page is unprotected, and bot has an account for this site, or
 |        - page is protected, and bot has a sysop account for this site.
 |      
 |      @rtype: bool
 |  
 |  categories(self, with_sort_key=False, total=None, content=False, nofollow_redirects=NotImplemented, get_redirect=NotImplemented, step=NotImplemented, withSortKey='[deprecated name of with_sort_key]')
 |      Iterate categories that the article is in.
 |      
 |      @param with_sort_key: if True, include the sort key in each Category.
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each category description page (default False)
 |      @return: a generator that yields Category objects.
 |      @rtype: generator
 |  
 |  change_category(self, old_cat, new_cat, summary=None, sort_key=None, in_place=True, include=[], comment='[deprecated name of summary]', oldCat='[deprecated name of old_cat]', newCat='[deprecated name of new_cat]', sortKey='[deprecated name of sort_key]', inPlace='[deprecated name of in_place]')
 |      Remove page from oldCat and add it to newCat.
 |      
 |      @param old_cat: category to be removed
 |      @type old_cat: Category
 |      @param new_cat: category to be added, if any
 |      @type new_cat: Category or None
 |      
 |      @param summary: string to use as an edit summary
 |      
 |      @param sort_key: sortKey to use for the added category.
 |          Unused if newCat is None, or if inPlace=True
 |          If sortKey=True, the sortKey used for oldCat will be used.
 |      
 |      @param in_place: if True, change categories in place rather than
 |                    rearranging them.
 |      
 |      @param include: list of tags not to be disabled by default in relevant
 |          textlib functions, where CategoryLinks can be searched.
 |      @type include: list
 |      
 |      @return: True if page was saved changed, otherwise False.
 |      @rtype: bool
 |  
 |  clear_cache(self)
 |      Clear the cached attributes of the page.
 |  
 |  contributingUsers(self, total=None, step=NotImplemented)
 |      Deprecated; use contributors() instead.
 |      
 |      
 |      Return a set of usernames (or IPs) of users who edited this page.
 |      
 |      @param total: iterate no more than this number of revisions in total
 |      
 |      @rtype: set
 |  
 |  contributors(self, total=None, starttime=None, endtime=None, step=NotImplemented)
 |      Compile contributors of this page with edit counts.
 |      
 |      @param total: iterate no more than this number of revisions in total
 |      @param starttime: retrieve revisions starting at this Timestamp
 |      @param endtime: retrieve revisions ending at this Timestamp
 |      
 |      @return: number of edits for each username
 |      @rtype: L{collections.Counter}
 |  
 |  coordinates(self, primary_only=False)
 |      Return a list of Coordinate objects for points on the page.
 |      
 |      Uses the MediaWiki extension GeoData.
 |      
 |      @param primary_only: Only return the coordinate indicated to be primary
 |      @return: A list of Coordinate objects
 |      @rtype: list
 |  
 |  create_short_link(self, permalink=False, with_protocol=False)
 |      Return a shortened link that points to that page.
 |      
 |      If shared_urlshortner_wiki is defined in family config, it'll use
 |      that site to create the link instead of the current wiki.
 |      
 |      @param permalink: If true, the link will point to the actual revision
 |          of the page.
 |      @type permalink: bool
 |      @param with_protocol: If true, the link will have https propotol
 |          prepend.
 |      @type with_protocol: bool
 |      @return: The reduced link.
 |      @rtype: str
 |  
 |  data_item(self)
 |      Convenience function to get the Wikibase item of a page.
 |      
 |      @rtype: ItemPage
 |  
 |  defaultsort(self, force=False)
 |      Extract value of the {{DEFAULTSORT:}} magic word from the page.
 |      
 |      @param force: force updating from the live site
 |      
 |      @rtype: str or None
 |  
 |  delete(self, reason=None, prompt=True, mark=False, quit=False, throttle=NotImplemented)
 |      Delete the page from the wiki. Requires administrator status.
 |      
 |      @param reason: The edit summary for the deletion, or rationale
 |          for deletion if requesting. If None, ask for it.
 |      @param prompt: If true, prompt user for confirmation before deleting.
 |      @param mark: If true, and user does not have sysop rights, place a
 |          speedy-deletion request on the page instead. If false, non-sysops
 |          will be asked before marking pages for deletion.
 |      @param quit: show also the quit option, when asking for confirmation.
 |  
 |  editTime(self)
 |      Return timestamp of last revision to page.
 |      
 |      @rtype: pywikibot.Timestamp
 |  
 |  embeddedin(self, filter_redirects=None, namespaces=None, total=None, content=False, step=NotImplemented)
 |      Return an iterator for pages that embed this page as a template.
 |      
 |      @param filter_redirects: if True, only iterate redirects; if False,
 |          omit redirects; if None, do not filter
 |      @param namespaces: only iterate pages in these namespaces
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each embedding page (default False)
 |  
 |  encoding(self)
 |      DEPRECATED: use self.site.encoding instead.
 |  
 |  expand_text(self, force=False, includecomments=False, refresh='[deprecated name of force]')
 |      Return the page text with all templates and parser words expanded.
 |      
 |      @param force: force updating from the live site
 |      @param includecomments: Also strip comments if includecomments
 |          parameter is not True.
 |      
 |      @rtype unicode or None
 |  
 |  extlinks(self, total=None, step=NotImplemented)
 |      Iterate all external URLs (not interwiki links) from this page.
 |      
 |      @param total: iterate no more than this number of pages in total
 |      @return: a generator that yields unicode objects containing URLs.
 |      @rtype: generator
 |  
 |  fullVersionHistory(self, reverse=False, total=None, reverseOrder='[deprecated name of reverse]', rollback=NotImplemented, step=NotImplemented)
 |      Deprecated; use Page.revisions(content=True) instead.
 |      
 |      Iterate previous versions including wikitext.
 |      
 |              Takes same arguments as getVersionHistory.
 |  
 |  full_url(self)
 |      Return the full URL.
 |  
 |  getCategoryRedirectTarget(self)
 |      If this is a category redirect, return the target category title.
 |      
 |      @rtype: Category
 |  
 |  getCreator(self)
 |      Get the first revision of the page.
 |      
 |      DEPRECATED: Use Page.oldest_revision.
 |      
 |      @rtype: tuple(username, Timestamp)
 |  
 |  getDeletedRevision(self, timestamp, content=False, retrieveText='[deprecated name of content]')
 |      Return a particular deleted revision by timestamp.
 |      
 |      @return: a list of [date, editor, comment, text, restoration
 |          marker]. text will be None, unless content is True (or has
 |          been retrieved earlier). If timestamp is not found, returns
 |          None.
 |      @rtype: list
 |  
 |  getLatestEditors(self, total=1, limit='[deprecated name of total]')
 |      Get a list of revision information of the last total edits.
 |      
 |      DEPRECATED: Use Page.revisions.
 |      
 |      @param total: iterate no more than this number of revisions in total
 |      @return: list of dict, each dict containing the username and Timestamp
 |      @rtype: list
 |  
 |  getMovedTarget(self)
 |      Return a Page object for the target this Page was moved to.
 |      
 |      DEPRECATED: Use Page.moved_target().
 |      
 |      If this page was not moved, it will raise a NoPage exception.
 |      This method also works if the source was already deleted.
 |      
 |      @rtype: pywikibot.Page
 |      @raises NoPage: this page was not moved
 |  
 |  getOldVersion(self, oldid, force=False, get_redirect=False, sysop=False, throttle=NotImplemented, change_edit_time=NotImplemented)
 |      Return text of an old revision of this page; same options as get().
 |      
 |      @param oldid: The revid of the revision desired.
 |      @rtype: str
 |  
 |  getReferences(self, follow_redirects=True, with_template_inclusion=True, only_template_inclusion=False, filter_redirects=False, namespaces=None, total=None, content=False, step=NotImplemented, withTemplateInclusion='[deprecated name of with_template_inclusion]', onlyTemplateInclusion='[deprecated name of only_template_inclusion]', redirectsOnly='[deprecated name of filter_redirects]')
 |      Return an iterator all pages that refer to or embed the page.
 |      
 |      If you need a full list of referring pages, use
 |      C{pages = list(s.getReferences())}
 |      
 |      @param follow_redirects: if True, also iterate pages that link to a
 |          redirect pointing to the page.
 |      @param with_template_inclusion: if True, also iterate pages where self
 |          is used as a template.
 |      @param only_template_inclusion: if True, only iterate pages where self
 |          is used as a template.
 |      @param filter_redirects: if True, only iterate redirects to self.
 |      @param namespaces: only iterate pages in these namespaces
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each referring page (default False)
 |  
 |  getRestrictions(self)
 |      DEPRECATED. Use self.protection() instead.
 |  
 |  getTemplates(self, tllimit=NotImplemented)
 |      DEPRECATED. Use templates().
 |  
 |  getVersionHistory(self, reverse=False, total=None, forceReload=NotImplemented, revCount='[deprecated name of total]', step=NotImplemented, getAll=NotImplemented, reverseOrder='[deprecated name of reverse]')
 |      Deprecated; use Page.revisions() instead.
 |      
 |      
 |      Load the version history page and return history information.
 |      
 |      Return value is a list of tuples, where each tuple represents one
 |      edit and is built of revision id, edit date/time, user name, and
 |      edit summary. Starts with the most current revision, unless
 |      reverse is True.
 |      
 |      @param total: iterate no more than this number of revisions in total
 |  
 |  getVersionHistoryTable(self, reverse=False, total=None, forceReload=NotImplemented, reverseOrder='[deprecated name of reverse]', step=NotImplemented)
 |      Return the version history as a wiki table.
 |  
 |  imagelinks(self, total=None, content=False, followRedirects=NotImplemented, loose=NotImplemented, step=NotImplemented)
 |      Iterate FilePage objects for images displayed on this Page.
 |      
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each image description page (default False)
 |      @return: a generator that yields FilePage objects.
 |  
 |  interwiki(self, expand=True)
 |      Iterate interwiki links in the page text, excluding language links.
 |      
 |      @param expand: if True (default), include interwiki links found in
 |          templates transcluded onto this page; if False, only iterate
 |          interwiki links found in this page's own wikitext
 |      @type expand: bool
 |      
 |      @return: a generator that yields Link objects
 |      @rtype: generator
 |  
 |  isAutoTitle(self)
 |      Return True if title of this Page is in the autoFormat dict.
 |  
 |  isCategory(self)
 |      DEPRECATED: use is_categorypage instead.
 |  
 |  isCategoryRedirect(self)
 |      Return True if this is a category redirect page, False otherwise.
 |      
 |      @rtype: bool
 |  
 |  isDisambig(self)
 |      Return True if this is a disambiguation page, False otherwise.
 |      
 |      By default, it uses the the Disambiguator extension's result. The
 |      identification relies on the presence of the __DISAMBIG__ magic word
 |      which may also be transcluded.
 |      
 |      If the Disambiguator extension isn't activated for the given site,
 |      the identification relies on the presence of specific templates.
 |      First load a list of template names from the Family file;
 |      if the value in the Family file is None or no entry was made, look for
 |      the list on [[MediaWiki:Disambiguationspage]]. If this page does not
 |      exist, take the MediaWiki message. 'Template:Disambig' is always
 |      assumed to be default, and will be appended regardless of its
 |      existence.
 |      
 |      @rtype: bool
 |  
 |  isEmpty(self)
 |      Deprecated; use interwiki.page_empty_check(page) instead.
 |      
 |      
 |      Return True if the page text has less than 4 characters.
 |      
 |      Character count ignores language links and category links.
 |      Can raise the same exceptions as get().
 |      
 |      @rtype: bool
 |  
 |  isFlowPage(self)
 |      DEPRECATED: use self.is_flow_page instead.
 |  
 |  isImage(self)
 |      DEPRECATED: use is_filepage instead.
 |  
 |  isIpEdit(self)
 |      Return True if last editor was unregistered.
 |      
 |      @rtype: bool
 |  
 |  isStaticRedirect(self, force=False)
 |      Determine whether the page is a static redirect.
 |      
 |      A static redirect must be a valid redirect, and contain the magic word
 |      __STATICREDIRECT__.
 |      
 |      @param force: Bypass local caching
 |      @type force: bool
 |      
 |      @rtype: bool
 |  
 |  isTalkPage(self)
 |      Return True if this page is in any talk namespace.
 |  
 |  is_categorypage(self)
 |      Return True if the page is a Category, False otherwise.
 |  
 |  is_filepage(self)
 |      Return True if this is an file description page, False otherwise.
 |  
 |  is_flow_page(self)
 |      Whether a page is a Flow page.
 |      
 |      @rtype: bool
 |  
 |  iterlanglinks(self, total=None, include_obsolete=False, step=NotImplemented)
 |      Iterate all inter-language links on this page.
 |      
 |      @param total: iterate no more than this number of pages in total
 |      @param include_obsolete: if true, yield even Link object whose site
 |                               is obsolete
 |      @type include_obsolete: bool
 |      
 |      @return: a generator that yields Link objects.
 |      @rtype: generator
 |  
 |  itertemplates(self, total=None, content=False, step=NotImplemented)
 |      Iterate Page objects for templates used on this Page.
 |      
 |      Template parameters are ignored. This method only returns embedded
 |      templates, not template pages that happen to be referenced through
 |      a normal link.
 |      
 |      @param total: iterate no more than this number of pages in total
 |      @param content: if True, retrieve the content of the current version
 |          of each template (default False)
 |      @param content: bool
 |  
 |  langlinks(self, include_obsolete=False)
 |      Return a list of all inter-language Links on this page.
 |      
 |      @param include_obsolete: if true, return even Link objects whose site
 |                               is obsolete
 |      @type include_obsolete: bool
 |      
 |      @return: list of Link objects.
 |      @rtype: list
 |  
 |  lastNonBotUser(self)
 |      Return name or IP address of last human/non-bot user to edit page.
 |      
 |      Determine the most recent human editor out of the last revisions.
 |      If it was not able to retrieve a human user, returns None.
 |      
 |      If the edit was done by a bot which is no longer flagged as 'bot',
 |      i.e. which is not returned by Site.botusers(), it will be returned
 |      as a non-bot edit.
 |      
 |      @rtype: str
 |  
 |  latestRevision(self)
 |      Deprecated; use latest_revision_id instead.
 |      
 |      Return the current revision id for this page.
 |  
 |  linkedPages(self, namespaces=None, total=None, content=False, step=NotImplemented)
 |      Iterate Pages that this Page links to.
 |      
 |      Only returns pages from "normal" internal links. Image and category
 |      links are omitted unless prefixed with ":". Embedded templates are
 |      omitted (but links within them are returned). All interwiki and
 |      external links are omitted.
 |      
 |      @param namespaces: only iterate links in these namespaces
 |      @param namespaces: int, or list of ints
 |      @param total: iterate no more than this number of pages in total
 |      @type total: int
 |      @param content: if True, retrieve the content of the current version
 |          of each linked page (default False)
 |      @type content: bool
 |      
 |      @return: a generator that yields Page objects.
 |      @rtype: generator
 |  
 |  loadDeletedRevisions(self, total=None, step=NotImplemented)
 |      Retrieve deleted revisions for this Page.
 |      
 |      Stores all revisions' timestamps, dates, editors and comments in
 |      self._deletedRevs attribute.
 |      
 |      @return: iterator of timestamps (which can be used to retrieve
 |          revisions later on).
 |      @rtype: generator
 |  
 |  markDeletedRevision(self, timestamp, undelete=True)
 |      Mark the revision identified by timestamp for undeletion.
 |      
 |      @param undelete: if False, mark the revision to remain deleted.
 |      @type undelete: bool
 |  
 |  merge_history(self, dest, timestamp=None, reason=None)
 |      Merge revisions from this page into another page.
 |      
 |      See L{APISite.merge_history} for details.
 |      
 |      @param dest: Destination page to which revisions will be merged
 |      @type dest: pywikibot.Page
 |      @param timestamp: Revisions from this page dating up to this timestamp
 |          will be merged into the destination page (if not given or False,
 |          all revisions will be merged)
 |      @type timestamp: pywikibot.Timestamp
 |      @param reason: Optional reason for the history merge
 |      @type reason: str
 |  
 |  move(self, newtitle, reason=None, movetalk=True, sysop=False, noredirect=False, throttle=NotImplemented, deleteAndMove='[deprecated name of noredirect]', movetalkpage='[deprecated name of movetalk]')
 |      Move this page to a new title.
 |      
 |      @param newtitle: The new page title.
 |      @param reason: The edit summary for the move.
 |      @param movetalk: If true, move this page's talk page (if it exists)
 |      @param sysop: Try to move using sysop account, if available
 |      @param noredirect: if move succeeds, delete the old page
 |          (usually requires sysop privileges, depending on wiki settings)
 |  
 |  moved_target(self)
 |      Return a Page object for the target this Page was moved to.
 |      
 |      If this page was not moved, it will raise a NoMoveTarget exception.
 |      This method also works if the source was already deleted.
 |      
 |      @rtype: pywikibot.Page
 |      @raises NoMoveTarget: this page was not moved
 |  
 |  pageAPInfo(self)
 |      Deprecated; use latest_revision_id instead.
 |      
 |      Return the current revision id for this page.
 |  
 |  page_image(self)
 |      Return the most appropriate image on the page.
 |      
 |      Uses the MediaWiki extension PageImages.
 |      
 |      @return: A FilePage object
 |      @rtype: FilePage
 |  
 |  permalink(self, oldid=None, percent_encoded=True, with_protocol=False)
 |      Return the permalink URL of an old revision of this page.
 |      
 |      @param oldid: The revid of the revision desired.
 |      @param percent_encoded: if false, the link will be provided
 |          without title uncoded.
 |      @param with_protocol: if true, http or https prefixes will be
 |          included before the double slash.
 |      @rtype: str
 |  
 |  preloadText(self)
 |      The text returned by EditFormPreloadText.
 |      
 |      See API module "info".
 |      
 |      Application: on Wikisource wikis, text can be preloaded even if
 |      a page does not exist, if an Index page is present.
 |      
 |      @rtype: str
 |  
 |  previousRevision(self)
 |      Return the revision id for the previous revision.
 |      
 |      DEPRECATED: Use latest_revision.parent_id instead.
 |      
 |      @rtype: long
 |      
 |      @raise AssertionError: Use on MediaWiki prior to v1.16.
 |  
 |  properties(self, force=False)
 |      Return the properties of the page.
 |      
 |      @param force: force updating from the live site
 |      
 |      @rtype: dict
 |  
 |  protect(self, edit=False, move=False, create=None, upload=None, unprotect=False, reason=None, prompt=None, protections=None, **kwargs, throttle=NotImplemented)
 |      Protect or unprotect a wiki page. Requires administrator status.
 |      
 |      Valid protection levels (in MediaWiki 1.12) are '' (equivalent to
 |      'none'), 'autoconfirmed', and 'sysop'. If None is given, however,
 |      that protection will be skipped.
 |      
 |      @param protections: A dict mapping type of protection to protection
 |          level of that type.
 |      @type protections: dict
 |      @param reason: Reason for the action
 |      @type reason: basestring
 |      @param prompt: Whether to ask user for confirmation (deprecated).
 |                     Defaults to protections is None
 |      @type prompt: bool
 |  
 |  protection(self)
 |      Return a dictionary reflecting page protections.
 |      
 |      @rtype: dict
 |  
 |  purge(self, **kwargs)
 |      Purge the server's cache for this page.
 |      
 |      @rtype: bool
 |  
 |  put(self, newtext, summary=None, watch=None, minor=True, botflag=None, force=False, asynchronous=False, callback=None, **kwargs, comment='[deprecated name of summary]', watchArticle='[deprecated name of watch]', minorEdit='[deprecated name of minor]', async='[deprecated name of asynchronous]')
 |      Save the page with the contents of the first argument as the text.
 |      
 |      This method is maintained primarily for backwards-compatibility.
 |      For new code, using Page.save() is preferred. See save() method
 |      docs for all parameters not listed here.
 |      
 |      @param newtext: The complete text of the revised page.
 |      @type newtext: str
 |  
 |  put_async(self, newtext, summary=None, watch=None, minor=True, botflag=None, force=False, callback=None, **kwargs, comment='[deprecated name of summary]', watchArticle='[deprecated name of watch]', minorEdit='[deprecated name of minor]')
 |      Deprecated; use put(asynchronous=True) or save(asynchronous=True) instead.
 |      
 |      
 |      Put page on queue to be saved to wiki asynchronously.
 |      
 |      Asynchronous version of put (takes the same arguments), which places
 |      pages on a queue to be saved by a daemon thread. All arguments are
 |      the same as for .put(). This version is maintained solely for
 |      backwards-compatibility.
 |  
 |  revision_count(self, contributors=None)
 |      Determine number of edits from a set of contributors.
 |      
 |      @param contributors: contributor usernames
 |      @type contributors: iterable of str
 |      
 |      @return: number of edits for all provided usernames
 |      @rtype: int
 |  
 |  revisions(self, reverse=False, total=None, content=False, rollback=False, starttime=None, endtime=None, getText='[deprecated name of content]', reverseOrder='[deprecated name of reverse]', step=NotImplemented)
 |      Generator which loads the version history as Revision instances.
 |  
 |  save(self, summary=None, watch=None, minor=True, botflag=None, force=False, asynchronous=False, callback=None, apply_cosmetic_changes=None, quiet=False, **kwargs, comment='[deprecated name of summary]', sysop=NotImplemented, async='[deprecated name of asynchronous]')
 |      Save the current contents of page's text to the wiki.
 |      
 |      @param summary: The edit summary for the modification (optional, but
 |          most wikis strongly encourage its use)
 |      @type summary: str
 |      @param watch: Specify how the watchlist is affected by this edit, set
 |          to one of "watch", "unwatch", "preferences", "nochange":
 |          * watch: add the page to the watchlist
 |          * unwatch: remove the page from the watchlist
 |          * preferences: use the preference settings (Default)
 |          * nochange: don't change the watchlist
 |          If None (default), follow bot account's default settings
 |      
 |          For backward compatibility watch parameter may also be boolean:
 |          if True, add or if False, remove this Page to/from bot
 |          user's watchlist.
 |      @type watch: str, bool (deprecated) or None
 |      @param minor: if True, mark this edit as minor
 |      @type minor: bool
 |      @param botflag: if True, mark this edit as made by a bot (default:
 |          True if user has bot status, False if not)
 |      @param force: if True, ignore botMayEdit() setting
 |      @type force: bool
 |      @param asynchronous: if True, launch a separate thread to save
 |          asynchronously
 |      @param callback: a callable object that will be called after the
 |          page put operation. This object must take two arguments: (1) a
 |          Page object, and (2) an exception instance, which will be None
 |          if the page was saved successfully. The callback is intended for
 |          use by bots that need to keep track of which saves were
 |          successful.
 |      @param apply_cosmetic_changes: Overwrites the cosmetic_changes
 |          configuration value to this value unless it's None.
 |      @type apply_cosmetic_changes: bool or None
 |      @param quiet: enable/disable successful save operation message;
 |          defaults to False.
 |          In asynchronous mode, if True, it is up to the calling bot to
 |          manage the output e.g. via callback.
 |      @type quiet: bool
 |  
 |  section(self)
 |      Return the name of the section this Page refers to.
 |      
 |      The section is the part of the title following a '#' character, if
 |      any. If no section is present, return None.
 |      
 |      @rtype: str
 |  
 |  sectionFreeTitle(self, underscore=False)
 |      DEPRECATED: use self.title(with_section=False) instead.
 |  
 |  templates(self, content=False, get_redirect=NotImplemented)
 |      Return a list of Page objects for templates used on this Page.
 |      
 |      Template parameters are ignored. This method only returns embedded
 |      templates, not template pages that happen to be referenced through
 |      a normal link.
 |      
 |      @param content: if True, retrieve the content of the current version
 |          of each template (default False)
 |      @param content: bool
 |  
 |  titleForFilename(self)
 |      DEPRECATED: use self.title(as_filename=True) instead.
 |  
 |  titleWithoutNamespace(self, underscore=False)
 |      DEPRECATED: use self.title(with_ns=False) instead.
 |  
 |  toggleTalkPage(self)
 |      Return other member of the article-talk page pair for this Page.
 |      
 |      If self is a talk page, returns the associated content page;
 |      otherwise, returns the associated talk page. The returned page need
 |      not actually exist on the wiki.
 |      
 |      @return: Page or None if self is a special page.
 |      @rtype: Page or None
 |  
 |  touch(self, callback=None, botflag=False, **kwargs)
 |      Make a touch edit for this page.
 |      
 |      See save() method docs for all parameters.
 |      The following parameters will be overridden by this method:
 |      - summary, watch, minor, force, asynchronous
 |      
 |      Parameter botflag is False by default.
 |      
 |      minor and botflag parameters are set to False which prevents hiding
 |      the edit when it becomes a real edit due to a bug.
 |  
 |  undelete(self, reason=None, comment='[deprecated name of reason]', throttle=NotImplemented)
 |      Undelete revisions based on the markers set by previous calls.
 |      
 |      If no calls have been made since loadDeletedRevisions(), everything
 |      will be restored.
 |      
 |      Simplest case::
 |      
 |          Page(...).undelete('This will restore all revisions')
 |      
 |      More complex::
 |      
 |          pg = Page(...)
 |          revs = pg.loadDeletedRevisions()
 |          for rev in revs:
 |              if ... #decide whether to undelete a revision
 |                  pg.markDeletedRevision(rev) #mark for undeletion
 |          pg.undelete('This will restore only selected revisions.')
 |      
 |      @param reason: Reason for the action.
 |      @type reason: basestring
 |  
 |  urlname(self)
 |      Return the Page title encoded for use in an URL.
 |      
 |      DEPRECATED: use self.title(as_url=True) instead.
 |  
 |  userName(self)
 |      Return name or IP address of last user to edit page.
 |      
 |      @rtype: str
 |  
 |  version(self)
 |      Return MediaWiki version number of the page site.
 |      
 |      This is needed to use @need_version() decorator for methods of
 |      Page objects.
 |  
 |  watch(self, unwatch=False)
 |      Add or remove this page to/from bot account's watchlist.
 |      
 |      @param unwatch: True to unwatch, False (default) to watch.
 |      @type unwatch: bool
 |      
 |      @return: True if successful, False otherwise.
 |      @rtype: bool
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from BasePage:
 |  
 |  content_model
 |      Return the content model for this page.
 |      
 |      If it cannot be reliably determined via the API,
 |      None is returned.
 |  
 |  data_repository
 |      Return the Site object for the data repository.
 |  
 |  depth
 |      Return the depth/subpage level of the page.
 |  
 |  image_repository
 |      Return the Site object for the image repository.
 |  
 |  latest_revision
 |      Return the current revision for this page.
 |  
 |  oldest_revision
 |      Return the first revision of this page.
 |      
 |      @rtype: L{Revision}
 |  
 |  pageid
 |      Return pageid of the page.
 |      
 |      @return: pageid or 0 if page does not exist
 |      @rtype: int
 |  
 |  previous_revision_id
 |      Deprecated; use latest_revision.parent_id (0 instead of -1 when no parent) instead.
 |      
 |      
 |      Return the revision id for the previous revision of this Page.
 |      
 |      If the page has only one revision, it shall return -1.
 |      
 |      @rtype: long
 |      
 |      @raise AssertionError: Use on MediaWiki prior to v1.16.
 |  
 |  site
 |      Return the Site object for the wiki on which this Page resides.
 |      
 |      @rtype: pywikibot.Site
 |  
 |  text
 |      Return the current (edited) wikitext, loading it if necessary.
 |      
 |      @return: text of the page
 |      @rtype: str
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from pywikibot.tools.UnicodeMixin:
 |  
 |  __str__(self)
 |      Return the unicode representation as the str representation.
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from pywikibot.tools.UnicodeMixin:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from pywikibot.tools.ComparableMixin:
 |  
 |  __eq__(self, other)
 |      Compare if self is equal to other.
 |  
 |  __ge__(self, other)
 |      Compare if self is greater equals other.
 |  
 |  __gt__(self, other)
 |      Compare if self is greater than other.
 |  
 |  __le__(self, other)
 |      Compare if self is less equals other.
 |  
 |  __lt__(self, other)
 |      Compare if self is less than other.
 |  
 |  __ne__(self, other)
 |      Compare if self is not equal to other.