https://github.com/barrust/mediawiki
MediaWiki API wrapper in python http://pymediawiki.readthedocs.io/en/latest/
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 12 committers (8.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
api-wrapper
mediawiki
parser
parser-library
python
wikipedia
Keywords from Contributors
sequences
interactive
geocoder
genomics
clade
tokenization
projection
generic
data-structures
archival
Last synced: 5 months ago
·
JSON representation
Repository
MediaWiki API wrapper in python http://pymediawiki.readthedocs.io/en/latest/
Basic Info
Statistics
- Stars: 185
- Watchers: 4
- Forks: 29
- Open Issues: 8
- Releases: 27
Topics
api-wrapper
mediawiki
parser
parser-library
python
wikipedia
Created over 9 years ago
· Last pushed 6 months ago
Metadata Files
Readme
Changelog
Contributing
License
README.rst
MediaWiki
=========
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://opensource.org/licenses/MIT/
:alt: License
.. image:: https://img.shields.io/github/release/barrust/mediawiki.svg
:target: https://github.com/barrust/mediawiki/releases
:alt: GitHub release
.. image:: https://github.com/barrust/mediawiki/workflows/Python%20package/badge.svg
:target: https://github.com/barrust/mediawiki/actions?query=workflow%3A%22Python+package%22
:alt: Build Status
.. image:: https://codecov.io/gh/barrust/mediawiki/branch/master/graph/badge.svg?token=OdETiNgz9k
:target: https://codecov.io/gh/barrust/mediawiki
:alt: Test Coverage
.. image:: https://app.codacy.com/project/badge/Grade/34162198611f4aa0bde630d1dab72ce8
:target: https://www.codacy.com/gh/barrust/mediawiki/dashboard?utm_source=github.com&utm_medium=referral&utm_content=barrust/mediawiki&utm_campaign=Badge_Grade
:alt: Codacy Review
.. image:: https://badge.fury.io/py/pymediawiki.svg
:target: https://badge.fury.io/py/pymediawiki
:alt: PyPi Release
.. image:: http://pepy.tech/badge/pymediawiki
:target: https://pepy.tech/project/pymediawiki
:alt: Downloads
***mediawiki*** is a python wrapper and parser for the MediaWiki API. The goal
is to allow users to quickly and efficiently pull data from the MediaWiki site
of their choice instead of worrying about dealing directly with the API. As
such, it does not force the use of a particular MediaWiki site. It defaults to
`Wikipedia `__ but other MediaWiki sites can
also be used.
MediaWiki wraps the `MediaWiki API `_
so you can focus on *leveraging* your favorite MediaWiki site's data,
not getting it. Please check out the code on
`github `_!
**Note:** this library was designed for ease of use and simplicity. If you plan
on doing serious scraping, automated requests, or editing, please look into
`Pywikibot `__
which has a larger API, advanced rate limiting, and other features so we may
be considerate of the MediaWiki infrastructure. Pywikibot has also other extra
features such as support for Wikibase (that runs Wikidata).
Installation
------------------
Pip Installation:
::
$ pip install pymediawiki
To install from source:
To install ``mediawiki``, simply clone the `repository on GitHub
`__, then run from the folder:
::
$ python setup.py install
``mediawiki`` supports python versions 3.7 - 3.13
For *python 2.7* support, install `release 0.6.7 `__
::
$ pip install pymediawiki==0.6.7
Documentation
-------------
Documentation of the latest release is hosted on
`readthedocs.io `__
To build the documentation yourself run:
::
$ pip install sphinx
$ cd docs/
$ make html
Automated Tests
------------------
To run automated tests, one must simply run the following command from the
downloaded folder:
::
$ python setup.py test
Quickstart
------------------
Import mediawiki and run a standard search against Wikipedia:
.. code:: python
>>> from mediawiki import MediaWiki
>>> wikipedia = MediaWiki()
>>> wikipedia.search('washington')
Run more advanced searches:
.. code:: python
>>> wikipedia.opensearch('washington')
>>> wikipedia.allpages('a')
>>> wikipedia.geosearch(title='washington, d.c.')
>>> wikipedia.geosearch(latitude='0.0', longitude='0.0')
>>> wikipedia.prefixsearch('arm')
>>> wikipedia.random(pages=10)
Pull a MediaWiki page and some of the page properties:
.. code:: python
>>> p = wikipedia.page('Chess')
>>> p.title
>>> p.summary
>>> p.categories
>>> p.images
>>> p.links
>>> p.langlinks
See the `documentation for more examples!
`_
Changelog
------------------
Please see the `changelog
`__ for a list
of all changes.
License
-------
MIT licensed. See the `LICENSE file
`__
for full details.
Owner
- Name: Tyler Barrus
- Login: barrust
- Kind: user
- Location: Richmond Va
- Repositories: 17
- Profile: https://github.com/barrust
GitHub Events
Total
- Create event: 9
- Release event: 1
- Issues event: 6
- Watch event: 10
- Delete event: 7
- Issue comment event: 13
- Push event: 16
- Pull request event: 15
- Fork event: 1
Last Year
- Create event: 9
- Release event: 1
- Issues event: 6
- Watch event: 10
- Delete event: 7
- Issue comment event: 13
- Push event: 16
- Pull request event: 15
- Fork event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Tyler Barrus | b****t@g****m | 116 |
| dependabot[bot] | 4****] | 3 |
| Martin Michlmayr | t****m@c****m | 3 |
| Rubab Redwan | r****n@g****m | 1 |
| Mattia Verga | m****a@t****t | 1 |
| Mateusz Konieczny | m****z@g****m | 1 |
| Luca Dorigo | d****a@g****m | 1 |
| Jared Ondricek | f****e@g****m | 1 |
| JBocage | 5****e | 1 |
| Gary Benson | g****y@g****t | 1 |
| Daniel Antonio Negrón | d****2@g****u | 1 |
| Dan Blanchard | d****d@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 59
- Total pull requests: 63
- Average time to close issues: 2 months
- Average time to close pull requests: 8 days
- Total issue authors: 39
- Total pull request authors: 14
- Average comments per issue: 2.75
- Average comments per pull request: 0.94
- Merged pull requests: 59
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 3
- Pull requests: 7
- Average time to close issues: 2 days
- Average time to close pull requests: 9 days
- Issue authors: 3
- Pull request authors: 4
- Average comments per issue: 1.0
- Average comments per pull request: 1.43
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- barrust (11)
- shnela (4)
- inktrap (3)
- tbm (2)
- jkpubsrc (2)
- KelSolaar (2)
- tumluliu (2)
- delchiaro (2)
- SalvatoreRa (1)
- peanutbutterandcrackers (1)
- PureDreamer (1)
- dr-nathan (1)
- pyup-bot (1)
- Bomme (1)
- hosford42 (1)
Pull Request Authors
- barrust (53)
- dependabot[bot] (5)
- tbm (3)
- gbenson (2)
- JBocage (2)
- ldorigo (2)
- rubabredwan (1)
- dan-blanchard (1)
- mattiaverga (1)
- flamableconcrete (1)
- matkoniecz (1)
- shnela (1)
- dnanto (1)
- pyup-bot (1)
Top Labels
Issue Labels
enhancement (7)
future requirement (3)
help wanted (1)
Pull Request Labels
dependencies (4)
Packages
- Total packages: 1
-
Total downloads:
- pypi 5,181 last-month
- Total dependent packages: 3
- Total dependent repositories: 56
- Total versions: 30
- Total maintainers: 1
pypi.org: pymediawiki
Wikipedia and MediaWiki API wrapper for Python
- Homepage: https://github.com/barrust/mediawiki
- Documentation: https://pymediawiki.readthedocs.io/
- License: MIT
-
Latest release: 0.7.5
published about 1 year ago
Rankings
Docker downloads count: 1.8%
Dependent repos count: 2.0%
Dependent packages count: 3.2%
Average: 4.2%
Downloads: 4.9%
Stargazers count: 5.7%
Forks count: 7.6%
Maintainers (1)
Last synced:
6 months ago
Dependencies
.github/workflows/publish.yml
actions
- actions/checkout v3 composite
- actions/setup-python v4 composite
.github/workflows/python-package.yml
actions
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
pyproject.toml
pypi
setup.py
pypi
docs/requirements.txt
pypi
- beautifulsoup4 *
- requests >=2.0.0,<3.0.0
- sphinx >=3.0
- sphinx-rtd-theme *