Skip to main content

WikiUtils

Project description

===========
WikiUtils
===========

WikiUtils provide some utility classes to handle wiki pages.

Usage (retrieving a wiki page by title):

#!/usr/bin/env python
from python.turnguard.com.wikiutils import WikiUtils

wu = WikiUtils()
try:
page = wu.getWikiPage(wikititle="Python_(programming_language)")
for l in page.getLinks():
print l
except urllib2.HTTPError, e:
if e.code == 404:
print "WikiPage not found"

Usage (retrieving a wiki page by url):

#!/usr/bin/env python
from python.turnguard.com.wikiutils import WikiUtils

wu = WikiUtils()
try:
page = wu.getWikiPage(wikiurl="http://en.wikipedia.org/wiki/Python_(programming_language)")
for l in page.getLinks():
print l
except urllib2.HTTPError, e:
if e.code == 404:
print "WikiPage not found"


Caching
=========

WikiUtils will use .cache directory in the user's home
to create a cache of downloaded pages and retrieve
the contents from the cache by default.
The full path of the WikiUtils cache is determined by
path = expanduser('~')+"/.cache/python/turnguard/com/wikiutils/"

If you do not want to use the caching system use
getWikiPage(caching=False,...)

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

WikiUtils-1.0.0-rc1.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file WikiUtils-1.0.0-rc1.tar.gz.

File metadata

  • Download URL: WikiUtils-1.0.0-rc1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for WikiUtils-1.0.0-rc1.tar.gz
Algorithm Hash digest
SHA256 9eb52d43d81af8d12c50c577da0c529599569a94de4f102f054447020e443d69
MD5 e6060d42edd6090d6f6916e83d17f906
BLAKE2b-256 86c5e6d1f69031e9361663d9eaf6856c9aa408e5f23caf92efda417bbfaa9047

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