mw-category-members

Using MediaWiki's API: retrieve pages that belong to a given category
Installation
pip install mw_category_members
Usage
import category_members
results = category_members.retrieve('Category:Presidents_of_the_United_States')
for r in results:
print(r['name'], r['link'])
Arguments
def retrieve(cat_name, mw_instance='https://en.wikipedia.org', types=['page', 'subcat', 'file'], clean_subcat_names=False):
- cat_name: Category name e.g. 'Category:Presidents_of_the_United_States'.
- mw_instance: Which MediaWiki instance to use (the URL 'origin'). Defaults to 'https://en.wikipedia.org'.
- types: Which types of pages to retrieve. Defaults to
['page', 'subcat', 'file']. - clean_subcat_names: If
True, removes the e.g. 'Category:' prefix of the titles. Defaults toFalse.
Returns
Array of pages where a page is a dictionary of {'name': 'some name', 'link': 'some absolute link'}.
License
MIT.
Metadata
Release files for mw-category-members 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mw_category_members-0.1.0.tar.gz | 2.3 kB | Without provenance | Details for mw_category_members-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mw_category_members-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mw_category_members-0.1.0-py3-none-any.whl |
Total release size: 5.3 kB
Release files / mw_category_members-0.1.0.tar.gz
| Download URL | mw_category_members-0.1.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8be27a6c20e67fa5c055c68b38214acc8e287391b459f13cd7ecc551950de745
|
|
BLAKE2b-256 checksum How to use checksums |
158fae86267dded0ee6c1e7189e8177cafac3aa7890a023a27ff068d3bd8c4f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Release files / mw_category_members-0.1.0-py3-none-any.whl
| Download URL | mw_category_members-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d86149066118f856648126538b75e9d6702138fcf790cc73455435c8be0ff0f
|
|
BLAKE2b-256 checksum How to use checksums |
dfdb62603c664688398e2aa0a12f6d9848b4d402d2e4a1f33b4752c76f823314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Security for mw-category-members 0.1.0
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.