goldsmith/Wikipedia: a 12 line README that outgrew its own example
A Pythonic wrapper for the Wikipedia API
At a glance
- What is it?
- The wikipedia library wraps the MediaWiki API in a single module with two dependencies. It is still pushed to, still MIT licensed, and its README still shows Python 2 output in a project that claims Python 3.3 support.
- Who is it for?
- goldsmith/Wikipedia is a good fit for a script that needs a summary string, a page object or a list of links, and nothing more. It is a poor fit the moment your requests become systematic, because the README itself redirects that case to Pywikipediabot.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 11 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 9, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the library actually does
Wikipedia is one Python module that wraps the MediaWiki API. The description field calls it a Pythonic wrapper for the Wikipedia API, and the README frames the goal as letting you use Wikipedia data instead of spending your effort on getting it. The surface area is deliberately small: search, summary, page, and a handful of page accessors such as links, images and categories. There is no plugin system, no async layer and no configuration object beyond a language setter.
The library sets its own limit in the README. A note says it was designed for ease of use and simplicity, not for advanced use, and points anyone planning serious scraping or automated requests toward Pywikipediabot or another MediaWiki wrapper with a larger API and rate limiting. That sentence is the most useful line in the README, because it tells you the maintainer already considers this the wrong tool for anything that runs on a timer.
Installation is one command and the dependency list is tiny
The installation section is a single line:
$ pip install wikipediaUnderneath, requirements.txt at the repository root lists exactly two entries, beautifulsoup4 and a pinned requests range:
beautifulsoup4
requests>=2.0.0,<3.0.0That requests ceiling is worth noting on its own. The upper bound of 3.0.0 has been in place since long before requests 2.32 became the common install, so a fresh environment resolves to whatever 2.x is current, but a future 3.x release would not be picked up without someone editing the file. BeautifulSoup4 is unversioned, which is the opposite choice. The inconsistency tells you the pin was added to stop a specific past breakage rather than to express a tested support policy.
The README contradicts its own compatibility claim
The README states the package is compatible with Python 2.6 and later, with 2.7 needed to run unittest discover, and Python 3.3 and later. Then the code block above that line shows `print wikipedia.summary("Wikipedia")` and output as u-prefixed string literals, which is Python 2 syntax and Python 2 repr behaviour. On Python 3 that line is a syntax error and those results would print without the u prefix. The setup.py classifiers are narrower still, listing only Programming Language :: Python and Programming Language :: Python :: 3.
So three sources in this repository disagree about which Pythons are supported: prose says 2.6 through 3.3+, the example is Python 2, and the packaging metadata advertises Python 3 only. The practical read is that the library itself uses no removed syntax and will very likely import on a current interpreter, since it is a thin requests plus BeautifulSoup wrapper, while the documentation around it has not been revisited in a long time. If you need certainty rather than inference, run the README example yourself before you commit to it, and check the test suite, which is present in the tree under tests/.
setup.py parses its own version string with a regex
There is no version metadata file and no separate release script. setup.py reads wikipedia/__init__.py, applies a regex for a tuple assignment, and joins the captured groups with dots:
version = re.search(
"^__version__ = \((\d+), (\d+), (\d+)\)$",
local_file('wikipedia/__init__.py').read(),
re.MULTILINE
).groups()Two consequences follow. The version line must stay on one line with exactly three integer components in parentheses, or the build fails with an AttributeError on None rather than a helpful message. And the install requirements are read the same way, from requirements.txt, with blank lines filtered out but no comment handling, so a commented line in that file would become a literal requirement string. The rest of the packaging is unremarkable: one package, README.rst as the long description, and an MIT classifier. The long description is read with codecs.open and utf-8, which is why the README can carry non-ASCII text safely.
A tree that stopped growing, plus badges pointing at retired services
The repository root is a short list: .gitignore, .travis.yml, CHANGELOG.md, LICENSE, MANIFEST.in, README.rst, requirements.txt, runtests, setup.py, docs/ and tests/. There are no examples directory and no GitHub releases published through the release flow. Meanwhile the badges at the top of the README point at travis-ci.org, pypip.in and bitdeli, all three of which are discontinued services, and the bitdeli badge is an embedded CloudFront trend image rather than a hosted badge.
Against that, the source was pushed on 2026-09-28, so maintenance in the narrow sense of commits is happening. The distinction matters more here than in most projects because the risk is not rot from neglect, it is documentation drift. The install instructions, the compatibility sentence and the badge row all describe a project from the mid 2010s, while the commit activity is current. You can rely on small fixes landing. You should not rely on the README telling you the truth about anything.
Choosing between this and a bot framework
The decision is less subtle than the README makes it sound. If you need one summary for one title, this library removes roughly twenty lines of URL building and JSON handling, and nothing else. If you need paging through results, retry on failure, batching, caching or polite delays, Pywikipediabot is the tool the README names, and it exists because MediaWiki asks automated clients to identify themselves and limit their request rate.
There is a middle path worth naming. You can keep this module for the convenience layer and put your own rate limiting in front of it, which is what many small scripts do. That works until your script starts running on a schedule, at which point the missing polite headers and the absence of an identifying user agent become the actual failure mode rather than an etiquette issue.
Editorial conclusion
goldsmith/Wikipedia is a good fit for a script that needs a summary string, a page object or a list of links, and nothing more. It is a poor fit the moment your requests become systematic, because the README itself redirects that case to Pywikipediabot. Before you commit, check the version pinned in wikipedia/__init__.py against the release you actually install, because setup.py parses that file with a regex shaped for exactly three numeric components.
Frequently asked questions
What is the Python wikipedia library used for?
It wraps the MediaWiki API so Python code can search articles, fetch summaries, and read page fields such as links, images and categories without building requests by hand. The README describes it as designed for ease of use rather than advanced use, and directs serious scraping work to Pywikipediabot.
How do I install the wikipedia Python package?
Run pip install wikipedia. The package depends on beautifulsoup4 and requests>=2.0.0,<3.0.0, both read directly from requirements.txt by setup.py, so installing from source pulls the same two packages.
Does goldsmith/Wikipedia still work on Python 3?
The README claims compatibility with Python 2.6+ and 3.3+, but its own code example uses Python 2 print syntax and shows u-prefixed output, while setup.py classifiers list only Python 3. The library is a thin requests and BeautifulSoup wrapper, so it most likely imports fine, but the README example does not run as printed. The source was pushed on 2026-09-28.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/goldsmith-wikipedia)