Skip to main content

pyWikiCommons

Python package for downloading images and videos from Wikimedia Commons using the Wikimedia API (https://commons.wikimedia.org/w/api.php).

In Development

PyPI

Platforms PythonV License: MIT Build

Issues Size Commits

pyWikiCommonsLogo

Table of Contents

Introduction

pyWikiCommons provides a Python interface for the MediaWiki API [1]. The main purpose of the package is to allow you to download any file/image/video in the Wikipedia/Wikmedia ecosystem using one simple line of code.

The software is currently in its beta stage and only serves its purpose of downloading any file from the Wikimedia database, but there exist an abundance of potential parameters and functionalities of the API that can be exploited moving forward with the software [2].

Requirements

Installation

Install the latest version of pyWikiCommons using pip:

pip3 install pyWikiCommons

Installation from source:

git clone -b master https://github.com/amckenna41/pyWikiCommons.git
python3 setup.py install
cd pyWikiCommons

Usage

Downloading flag of Germany to default output folder:

from pyWikiCommons import pyWikiCommons

pyWikiCommons.download_common_image("File:Flag_of_Germany.svg")

Getting download url of image:

from pyWikiCommons import pyWikiCommons

pyWikiCommons.get_commons_url("File:Flag_of_Germany.svg")

Directories

  • /docs - documentation for pyWikiCommons (pending).
  • /images - all images used throughout the repo.
  • /pyWikiCommons - source code for pyWikiCommons software.
  • /tests - unit and integration tests for pyWikiCommons.

Issues

Any issues, errors or bugs can be raised via the Issues tab in the repository.

Tests

To run all tests, from the main pyWikiCommons repo folder run:

python3 -m unittest discover

To run tests for specific module, from the main pyWikiCommons repo folder run:

python -m unittest tests.MODULE_NAME -v

License

Distributed under the MIT License. See LICENSE for more details.

Contact

If you have any questions or comments, please contact amckenna41@qub.ac.uk or raise an issue on the Issues tab.

LinkedIn

References

[1]: https://www.mediawiki.org/wiki/API:Main_page
[2]: https://commons.wikimedia.org/w/api.php

Back to top

Metadata

Release files for pyWikiCommons 0.0.5

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

Source distribution (sdist)

Source distribution for pyWikiCommons 0.0.5
File Size Uploaded
pyWikiCommons-0.0.5.tar.gz 7.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyWikiCommons 0.0.5
File Interpreter ABI Platform
pyWikiCommons-0.0.5-py3.8.egg Legacy Egg format - - Details
pyWikiCommons-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / pyWikiCommons-0.0.5.tar.gz

Download URL pyWikiCommons-0.0.5.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c5be27a8dfb86431846003f31feceb0d98ea603f8878ab77b3d509c792488f72
BLAKE2b-256 checksum
How to use checksums
3dd7f48f25ae9e684968e78ff5d3fbdc2dab17d387a3a5cfe71422574e76786a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / pyWikiCommons-0.0.5-py3.8.egg

Download URL pyWikiCommons-0.0.5-py3.8.egg
Size 9.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
538bf4959357dd7a8943622f857950d4e914411ed810165c1a983829c98e2d23
BLAKE2b-256 checksum
How to use checksums
08db1c6e0b0e2c619777cab76d82d9f58768990215b21e4a06a12433bd7f3b3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / pyWikiCommons-0.0.5-py3-none-any.whl

Download URL pyWikiCommons-0.0.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a5767574bd64d8e80601de6a0ebd49e1b6f1e4d559134549e61f84ce3f8862b
BLAKE2b-256 checksum
How to use checksums
9d8df25946cb0fb8c6bfd4ec824c3f0987e17619aebe288163982ff56e96a7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release history Release notifications | RSS feed

This release

0.0.5 This release

3 release files

0.0.4

3 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

2 release files

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