awiki
a basic asynchronous wrapper for the wikimedia API.
awiki currently only supports anonymous actions (ie., getting and searching for pages), and does not support editing or creating new pages.
installation
your favorite flavor of the following:
python3 -m pip install -U awiki
quick overview
the main class is awiki.WikiClient. Each section of the wikimedia API is separated within this class.
-
WikiClient.core: Searching for pages and getting file data
-
WikiClient.feed: Getting featured content such as things in the news and
examples
searching for articles called "Python":
import asyncio
import awiki
async def main():
# create a new instance of the wiki client
wiki = awiki.WikiClient()
# Searches wiki pages for the given search terms, and returns matching pages.
pages = await wiki.search_content("Python", limit=25)
for p in pages:
print(f"{p.title}: {p.description} (https://en.wikipedia.org/wiki/{p.key})")
if __name__ == "__main__":
asyncio.run(main())
Metadata
Release files for awiki 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awiki-1.0.3.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awiki-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / awiki-1.0.3.tar.gz
| Download URL | awiki-1.0.3.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3aad1c706f90a22123006d44901664612c042be7ff125a454fbc0809a28cc0a1
|
|
BLAKE2b-256 checksum How to use checksums |
9e34769b99ba54996102c9f9b5805d383bbc76053858ade0b85eb68f15b3b2eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|
Release files / awiki-1.0.3-py3-none-any.whl
| Download URL | awiki-1.0.3-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07da69c8f327a27ee842fcb1d68714ff0d9cebed60359cda2205eac09cf174ea
|
|
BLAKE2b-256 checksum How to use checksums |
d69baccc07b01f27a370ca7808eb45e8a8b0f83d144d349a1e4878d5e979b232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|