Skip to main content

Wikia API for Python

Project description

Wikia
=========

**Wikia** is a Python library that makes it easy to access and parse
data from any `wikia website <https://www.wikia.com>`

Search a wikia, get article summaries, get data like links and images
from a page, and more. Wikipedia wraps the `Wikia API
<http://api.wikia.com/wiki/Wikia_API_Wiki>`__ so you can focus on using
wikia data, not getting it.



.. code:: python

>>> import wikia
>>> wikia.set_wiki("Runescape")
>>> print wikia.summary("Banshee")
# Banshees are Slayer monsters that require level 15 Slayer to kill. They frequently drop 13 noted pure essence, making them an alternative source of essence. Additionally, banshees tend to frequently drop many different types of herbs. Mighty banshees are a higher-levelled alternative, if this is given as your Slayer assignment.

>>> wikia.search("Forest")
# [u'Forest', u'Forester', u'Freaky Forester', u'Forester\'s Arms', u'Talking Forest', u'Jungle Forester', u'Dense forest', u'Forester hat', u'Ogre forester hat', u'Forester (Burgh de Rott Ramble)']

>>> drakan = wikia.page("Castle Drakan")
>>> drakan.title
# u'Castle Drakan'
>>> drakan.url
# u'http://runescape.wikia.com/wiki/Castle_Drakan'
>>> drakan.content
# u'Castle Drakan is the home of Lord Drakan, the vampyre lord of Morytania. Found just north of Meiyerditch, it looms over the Sanguinesti region'...
>>> drakan.links[0]
# u'Lord Drakan'

>>> wikia.set_lang("nl") # Dutch
>>> wikipedia.summary("Runes", sentences=1)
# Runes, of Magische runes zijn kleine gewichtloze steentjes waarmee spelers een spreuk kunnen uitvoeren.

Note: this library was designed for ease of use and simplicity, not for advanced use.

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

To install Wikia, simply run:

::

$ pip install wikia

Wikia is compatible with Python 2.6+ (2.7+ to run unittest discover) and Python 3.3+.

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

Read the docs at http://api.wikia.com/wiki/Wikia_API_Wiki.

- `Quickstart http://api.wikia.com/wiki/Quick_Start`__
- `Full API http://www.wikia.com/api/v1/`__

To run tests, clone the `respository on GitHub <https://github.com/timidger/Wikia>`__, then run:

::

$ pip install -r requirements.txt
$ bash runtests # will run tests for python and python3
$ python -m unittest discover tests/ '*test.py' # manual style

in the root project directory.

To build the documentation yourself, after installing requirements.txt, run:

::

$ pip install sphinx
$ cd docs/
$ make html

License
-------

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

Credits
-------

- `wiki-api <https://github.com/richardasaurus/wiki-api>`__ by
@richardasaurus for inspiration
- @nmoroze and @themichaelyang for feedback and suggestions
- The `Wikimedia
Foundation <http://wikimediafoundation.org/wiki/Home>`__ for giving
the world free access to data
- @goldsmith for making such a fantastic library to fork
- /u/captainmeta4 for giving the idea for a reddit bot to post game wiki info
like auto-wiki bot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wikia-1.3.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wikia-1.3.1-py3.4.egg (21.2 kB view details)

Uploaded Egg

wikia-1.3.1-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

wikia-1.3.1-py2.7.egg (20.2 kB view details)

Uploaded Egg

File details

Details for the file wikia-1.3.1.tar.gz.

File metadata

  • Download URL: wikia-1.3.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wikia-1.3.1.tar.gz
Algorithm Hash digest
SHA256 d4db0b64e770fa6bbbd8cc8e0555a561c33cd9559c20cfb2c0ade988844adffe
MD5 317a4d1b905d3258ea120e96adc8014e
BLAKE2b-256 423ed4e20bb1f65df4fd54a06c3efe97ab93aaa32d3443f488c2734a2e70858e

See more details on using hashes here.

File details

Details for the file wikia-1.3.1-py3.4.egg.

File metadata

  • Download URL: wikia-1.3.1-py3.4.egg
  • Upload date:
  • Size: 21.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wikia-1.3.1-py3.4.egg
Algorithm Hash digest
SHA256 4beddeee4ca7c170706517c76c9127cfab587db65a1e0abbd4967f1558c5afc4
MD5 a1646ea31566bba28693252bd95b36bb
BLAKE2b-256 440ec21a4fc94600560c230a9b2ba08ce8f5ad327dcb0546fba5704900641c40

See more details on using hashes here.

File details

Details for the file wikia-1.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for wikia-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 287195a038798eb48963e10e189ad7ab17d1c3e458a970b20a76a678f0fb3150
MD5 25aa9ae61f556fa4bc0cec07454c138a
BLAKE2b-256 810b49aa7cc9cc35c43b88c023b240d845c867ca956ccafb3bc96ac0bd134d79

See more details on using hashes here.

File details

Details for the file wikia-1.3.1-py2.7.egg.

File metadata

  • Download URL: wikia-1.3.1-py2.7.egg
  • Upload date:
  • Size: 20.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wikia-1.3.1-py2.7.egg
Algorithm Hash digest
SHA256 21cbd9097e35cdfde66f6837ccded56cf11cc86d8a4203b8940682656b9cc64b
MD5 1e84247171b715e1e5e004bbec388b07
BLAKE2b-256 ef9af8f116e95425da6f576fde3ba521728b23c671ad62e5c5f9840ac4559f68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page