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'...

>>> wikia.set_lang("nl") # Dutch
>>> wikia.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.4.0.tar.gz (10.0 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.4.0-py3.4.egg (20.4 kB view details)

Uploaded Egg

wikia-1.4.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wikia-1.4.0.tar.gz
Algorithm Hash digest
SHA256 24f400d87f5434532f8a930be90a23e6bf99ff3c22315809d8f00328081413bf
MD5 ba1615dcd84569e30aa7cf3d3d8a81e9
BLAKE2b-256 dc6f9d5929a56a60ec66669c5472e9f4fd3ced6de278efbf865111f5330a0ed4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wikia-1.4.0-py3.4.egg
Algorithm Hash digest
SHA256 0a411c759dd90d7cdb8131c7edea01aa36ce144c73d5d43fd5564340bc33bb48
MD5 7bd62ba1bf0158aa4faf41681357b736
BLAKE2b-256 f117791941a50b5fcc6a455d42d48d4dd6fcea31c17ca6d1b7a6c35d6a251c13

See more details on using hashes here.

File details

Details for the file wikia-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wikia-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6d263660edf36c35e333ea5679506511002bebae534001c662de1f54a9a638f
MD5 eb11385830e75086f2b1c1ebc5c2fc0b
BLAKE2b-256 869ffcb4dcc4bdf96ce710bb2511f698030e899b3b8b9b6d0847f31a163f257c

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