Metadata-Version: 2.0
Name: pymediawiki
Version: 0.3.10
Summary: MediaWiki API for Python
Home-page: https://github.com/barrust/mediawiki
Author: Tyler Barrus
Author-email: barrust@gmail.com
License: MIT
Download-URL: https://github.com/barrust/mediawiki/tarball/v0.3.10
Keywords: python mediawiki wikipedia API
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: beautifulsoup4
Requires-Dist: requests (<3.0.0,>=2.0.0)

MediaWiki
=========
.. image:: https://badge.fury.io/py/pymediawiki.svg
    :target: https://badge.fury.io/py/pymediawiki
.. image:: https://travis-ci.org/barrust/mediawiki.svg?branch=master
    :target: https://travis-ci.org/barrust/mediawiki
    :alt: Build Status
.. image:: https://coveralls.io/repos/github/barrust/mediawiki/badge.svg?branch=master
    :target: https://coveralls.io/github/barrust/mediawiki?branch=master
    :alt: Test Coverage
.. image:: https://www.quantifiedcode.com/api/v1/project/91ebef7368ca4669aac81c45c48cc2a9/badge.svg
    :target: https://www.quantifiedcode.com/app/project/91ebef7368ca4669aac81c45c48cc2a9
    :alt: Code Issues
.. image:: https://api.codacy.com/project/badge/Grade/afa87d5f5b6e4e66b78e15dedbc097ec
    :target: https://www.codacy.com/app/barrust/mediawiki?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=barrust/mediawiki&amp;utm_campaign=Badge_Grade
    :alt: Codacy Review
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
    :target: https://opensource.org/licenses/MIT/
    :alt: License

**mediawiki** is a python wrapper for the MediaWiki API. The goal is to allow
users to quickly and efficiently pull data from the MediaWiki site of their
choice instead of worrying about dealing directly with the API. As such,
it does not force the use of a particular MediaWiki site. It defaults to
`Wikipedia <http://www.wikipedia.org>`__ but other MediaWiki sites can
also be used.

**Note:** this library was designed for ease of use and simplicity, not for
advanced use. If you plan on doing serious scraping or automated requests,
please use
`Pywikipediabot <http://www.mediawiki.org/wiki/Manual:Pywikipediabot>`__
(or one of the other more advanced `Python MediaWiki API wrappers
<http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#Python>`__),
which has a larger API, advanced rate limiting, and other features so we may
be considerate of the MediaWiki infrastructure.


Installation
------------------

Pip Installation:

::

    $ pip install pymediawiki

To install from source:

To install `mediawiki`, simply clone the `repository on GitHub
<https://github.com/barrust/mediawiki>`__, then run from the folder:

::

    $ python setup.py install

`mediawiki` supports python versions 2.7 and 3.3 - 3.6

Documentation
-------------

Documentation of the latest release is hosted on
`pythonhosted.org <https://pythonhosted.org/pymediawiki/>`__

To build the documentation yourself run:

::

    $ pip install sphinx
    $ cd docs/
    $ make html

Automated Tests
------------------

To run automated tests, one must simply run the following command from the
downloaded folder:

::

  $ python setup.py test


Quickstart
------------------

Import mediawiki and run a standard search against Wikipedia:

.. code:: python

    >>> from mediawiki import MediaWiki
    >>> wikipedia = MediaWiki()
    >>> wikipedia.search('washington')

Run more advanced searches:

.. code:: python

    >>> wikipedia.opensearch('washington')
    >>> wikipedia.geosearch(title='washington, d.c.')
    >>> wikipedia.geosearch(latitude='0.0', longitude='0.0')
    >>> wikipedia.prefixsearch('arm')
    >>> wikipedia.random(pages=10)

Pull a MediaWiki page and some of the page properties:

.. code:: python

    >>> p = wikipedia.page('Chess')
    >>> p.title
    >>> p.summary
    >>> p.categories
    >>> p.images
    >>> p.links

See the
`Documentation for more examples! <https://pythonhosted.org/pymediawiki/>`__



Changelog
------------------

Please see the `changelog
<https://github.com/barrust/mediawiki/blob/master/CHANGELOG.md>`__ for a list
of all changes.


License
-------

MIT licensed. See the `LICENSE file
<https://github.com/barrust/Wikipedia/blob/master/LICENSE>`__
for full details.


