Skip to main content

Wikisource Dedicated Python API library

Project description


This library contains the basic API operations like

  • Number of Index Book
  • Current page quality status
  • Proofreader of page
  • Validator of page

It is wikisource dedicated API library.


  • pip install pywikisource

Demo 1

from pywikisource import WikiSourceApi

# Create the Wikisource object
WS = WikiSourceApi('en')

# or
userAgent = "MyCoolTool/1.1 (; pywikisource/0.0.4"
WS = WikiSourceApi('en', userAgent)  # It is recommended to add user agent.

# Get page list
pageList = WS.createdPageList('Landon in Literary Gazette 1833.pdf')
for page in pageList:

# Get the number of pages of Index Book
print(WS.numpage('Landon in Literary Gazette 1833.pdf'))

# Get the proofreader of single page

# Get the validator of single page

Demo 2 (Async bookStatus; Since pywikisource 0.0.4)

from pywikisource import WikiSourceApi
import asyncio

userAgent = "MyCoolTool/1.1 (; pywikisource/0.0.4"
WS = WikiSourceApi('ta', userAgent)  # It is recommended to add user agent.

books = [
    "தமிழர் வரலாறு 1, பி. டி. சீனிவாச அய்யங்கார்.pdf",
    "தமிழர் வரலாறு 2, பி. டி. சீனிவாச அய்யங்கார்.pdf",
    "மாவீரர் மருதுபாண்டியர்.pdf",
    "சேரன் செங்குட்டுவன்.djvu"

for book in books:
    pageList = WS.createdPageList( book )

    # Default limit is 25 requests per second
    data = WS.bookStatus( pageList, limit=50 ) )

    for title, status in data.items():
        print( title, " -->  ",  status["code"] )


Instruction for Maintainer

To deploy on PyPI

administrator@Jay-Prakash % python sdist bdist_wheel
administrator@Jay-Prakash % twine check dist/*
administrator@Jay-Prakash % twine upload dist/*


This is Free Software, released under the MIT.

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

pywikisource-0.0.4.tar.gz (4.1 kB view hashes)

Uploaded source

Built Distribution

pywikisource-0.0.4-py2-none-any.whl (5.1 kB view hashes)

Uploaded py2

Supported by

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