Skip to main content

# wiki-api

A basic python library enabling access to Wikipedia.org’s search results and articles.

## How To Use

### Create an instance of wiki-api

wiki = WikiApi() wiki = WikiApi({ ‘locale’ : ‘es’}) # to specify your locale, ‘en’ is default

### Search for something on wikipedia

results = wiki.find(‘Barack Obama’) => [‘Barack_Obama’, ‘Barack_Obama_presidential_campaign,_2008’, …]

### Get information about a wiki article

article = wiki.get_article(results[0])

article.heading => ‘Barack Obama’ article.image => ‘http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/220px-Official_portrait_of_Barack_Obama.jpg’ article.summary => ‘Barack Hussein Obama II (i/bəˈrɑːk huːˈseɪn oʊˈbɑːmə/; born August 4, 1961) is the 44th and current President of th…’ article.references => [‘Obama: No green light for Israel to attack Iran. Cnn.com. 2009-07-07. http://www.cnn.com/2009/POLITICS/07/07/obama.israel.iran/. Retrieved January 4, 2013.’, …, .., …] article.content => ‘Full article dump…’

## Requirements

  1. Python3.3

  2. Python requests - python-requests.org

  3. BeautifulSoup4

## Tests

Test .py file can be found in /test.

Metadata

Release files for wikiapi 1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wikiapi 1
File Size Uploaded Provenance Actions
wikiapi-1.tar.gz 3.1 kB Without provenance Details for wikiapi-1.tar.gz

Release files / wikiapi-1.tar.gz

Download URL wikiapi-1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
746c15546058475d9b4551e4fc99c2509b5741ff8ff305f211b0efecadaecb08
BLAKE2b-256 checksum
How to use checksums
8d01f26d88855d4c6639eeca816f2cb3393a818d5e501f242e71c549a5e7fc53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for wikiapi 1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page