nlpia2-wikipedia


Namenlpia2-wikipedia JSON
Version 1.5.17 PyPI version JSON
download
home_pagehttps://gitlab.com/tangibleai/community/nlpia2-wikipedia
SummaryUpdated version of `wikipedia` package because original repo has been abandoned since 2014.
upload_time2024-08-18 02:00:34
maintainerNone
docs_urlNone
authorHobson Lane
requires_python>=3.8
licenseAGPL-3.0-or-later
keywords wikipedia wikimedia wikidata wikitext wiki api scraping wrapper crawler html
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Wikipedia

<!-- [![image](https://travis-ci.org/goldsmith/Wikipedia.png?branch=master)](https://travis-ci.org/goldsmith/nlpia2-wikipedia) -->

[![image](https://pypip.in/d/nlpia2-wikipedia/badge.png)](https://crate.io/packages/nlpia2-wikipedia)

[![image](https://pypip.in/v/nlpia2-wikipedia/badge.png)](https://crate.io/packages/nlpia2-wikipedia)

[![License](https://pypip.in/license/nlpia2-wikipedia/badge.png)](https://pypi.python.org/pypi/nlpia2-wikipedia/)

**NLPiA2-Wikipedia** Thin Python wrapper for Wikipedia API

Search Wikipedia, get article summaries, get data like links and images
from a page, and more. Wikipedia wraps the [MediaWiki API](https://www.mediawiki.org/wiki/API) so you can focus on using
Wikipedia data, not getting it.

```python
>>> from wikipedia import wikipedia as wiki
>>> print wiki.summary("Wikipedia")
Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...

>>> wiki.search("Barack")
['Barak (given name)', 'Barack Obama', ... 'Presidential transition of Barack Obama']
>>> titles = wiki.search("New York")
>>> page = wiki.page(titles[1])
>>> page.title
'New York (State)'
>>> page.url
'http://en.wikipedia.org/wiki/New_York_(state)'
>>> page.content
'New York, sometimes called New York State...'
>>> page.summary
'New York, sometimes called New York State...'
>>> page.links[0]
'10 Hudson Yards'

>>> wiki.set_lang("fr")
>>> wiki.summary("Facebook", sentences=1)
Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes.
```

(or one of the other more advanced [Python MediaWiki API
wrappers](http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#Python)),
which has a larger API, rate limiting, and other features so we can be
considerate of the MediaWiki infrastructure.

## Installation

To install Wikipedia, simply run:

    $ pip install nlpia2-wikipedia

Wikipedia is compatible with Python 2.6+ (2.7+ to run unittest discover)
and Python 3.3+.

## Documentation

Read the docs at <https://wikipedia.readthedocs.org/en/latest/>.

-   [Quickstart](https://wikipedia.readthedocs.org/en/latest/quickstart.html)
-   [Full API](https://wikipedia.readthedocs.org/en/latest/code.html)

To run tests, clone the [repository on
GitHub](https://github.com/goldsmith/Wikipedia), then run:

    $ pip install -r requirements.txt
    $ bash runtests  # will run tests for python and python3
    $ python -m unittest discover tests/ '*test.py'  # manual style

in the root project directory.

To build the documentation yourself, after installing requirements.txt,
run:

    $ pip install sphinx
    $ cd docs/
    $ make html

## License

MIT licensed. See the [LICENSE
file](https://github.com/goldsmith/Wikipedia/blob/master/LICENSE) for
full details.

## Credits

- [Wikipedia](https://pypi.org/project/wikipedia)
- [Pywikipediabot](http://www.mediawiki.org/wiki/Manual:Pywikipediabot)
- [wiki-api](https://github.com/richardasaurus/wiki-api) by \@richardasaurus
- [Wikimedia Foundation](http://wikimediafoundation.org/wiki/Home) for giving the world free access to knowledge



            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/tangibleai/community/nlpia2-wikipedia",
    "name": "nlpia2-wikipedia",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Wikipedia, Wikimedia, WikiData, WikiText, wiki, API, scraping, wrapper, crawler, html",
    "author": "Hobson Lane",
    "author_email": "hobson@tangibleai.com",
    "download_url": "https://files.pythonhosted.org/packages/45/8f/c6d64b6fe1f68c59807e0839565f7ffbcdf8e59d6cad20b417882b86eaec/nlpia2_wikipedia-1.5.17.tar.gz",
    "platform": null,
    "description": "# Wikipedia\n\n<!-- [![image](https://travis-ci.org/goldsmith/Wikipedia.png?branch=master)](https://travis-ci.org/goldsmith/nlpia2-wikipedia) -->\n\n[![image](https://pypip.in/d/nlpia2-wikipedia/badge.png)](https://crate.io/packages/nlpia2-wikipedia)\n\n[![image](https://pypip.in/v/nlpia2-wikipedia/badge.png)](https://crate.io/packages/nlpia2-wikipedia)\n\n[![License](https://pypip.in/license/nlpia2-wikipedia/badge.png)](https://pypi.python.org/pypi/nlpia2-wikipedia/)\n\n**NLPiA2-Wikipedia** Thin Python wrapper for Wikipedia API\n\nSearch Wikipedia, get article summaries, get data like links and images\nfrom a page, and more. Wikipedia wraps the [MediaWiki API](https://www.mediawiki.org/wiki/API) so you can focus on using\nWikipedia data, not getting it.\n\n```python\n>>> from wikipedia import wikipedia as wiki\n>>> print wiki.summary(\"Wikipedia\")\nWikipedia (/\u02ccw\u026ak\u0268\u02c8pi\u02d0di\u0259/ or /\u02ccw\u026aki\u02c8pi\u02d0di\u0259/ WIK-i-PEE-dee-\u0259) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...\n\n>>> wiki.search(\"Barack\")\n['Barak (given name)', 'Barack Obama', ... 'Presidential transition of Barack Obama']\n>>> titles = wiki.search(\"New York\")\n>>> page = wiki.page(titles[1])\n>>> page.title\n'New York (State)'\n>>> page.url\n'http://en.wikipedia.org/wiki/New_York_(state)'\n>>> page.content\n'New York, sometimes called New York State...'\n>>> page.summary\n'New York, sometimes called New York State...'\n>>> page.links[0]\n'10 Hudson Yards'\n\n>>> wiki.set_lang(\"fr\")\n>>> wiki.summary(\"Facebook\", sentences=1)\nFacebook est un service de r\u00e9seautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contr\u00f4lant leur visibilit\u00e9 par diff\u00e9rentes cat\u00e9gories de personnes.\n```\n\n(or one of the other more advanced [Python MediaWiki API\nwrappers](http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#Python)),\nwhich has a larger API, rate limiting, and other features so we can be\nconsiderate of the MediaWiki infrastructure.\n\n## Installation\n\nTo install Wikipedia, simply run:\n\n    $ pip install nlpia2-wikipedia\n\nWikipedia is compatible with Python 2.6+ (2.7+ to run unittest discover)\nand Python 3.3+.\n\n## Documentation\n\nRead the docs at <https://wikipedia.readthedocs.org/en/latest/>.\n\n-   [Quickstart](https://wikipedia.readthedocs.org/en/latest/quickstart.html)\n-   [Full API](https://wikipedia.readthedocs.org/en/latest/code.html)\n\nTo run tests, clone the [repository on\nGitHub](https://github.com/goldsmith/Wikipedia), then run:\n\n    $ pip install -r requirements.txt\n    $ bash runtests  # will run tests for python and python3\n    $ python -m unittest discover tests/ '*test.py'  # manual style\n\nin the root project directory.\n\nTo build the documentation yourself, after installing requirements.txt,\nrun:\n\n    $ pip install sphinx\n    $ cd docs/\n    $ make html\n\n## License\n\nMIT licensed. See the [LICENSE\nfile](https://github.com/goldsmith/Wikipedia/blob/master/LICENSE) for\nfull details.\n\n## Credits\n\n- [Wikipedia](https://pypi.org/project/wikipedia)\n- [Pywikipediabot](http://www.mediawiki.org/wiki/Manual:Pywikipediabot)\n- [wiki-api](https://github.com/richardasaurus/wiki-api) by \\@richardasaurus\n- [Wikimedia Foundation](http://wikimediafoundation.org/wiki/Home) for giving the world free access to knowledge\n\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-or-later",
    "summary": "Updated version of `wikipedia` package because original repo has been abandoned since 2014.",
    "version": "1.5.17",
    "project_urls": {
        "Documentation": "https://gitlab.com/tangibleai/community/nlpia2-wikipedia",
        "Homepage": "https://gitlab.com/tangibleai/community/nlpia2-wikipedia",
        "Repository": "https://gitlab.com/tangibleai/community/nlpia2-wikipedia"
    },
    "split_keywords": [
        "wikipedia",
        " wikimedia",
        " wikidata",
        " wikitext",
        " wiki",
        " api",
        " scraping",
        " wrapper",
        " crawler",
        " html"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "169875d111b70bf4bef8016dd45064cdca82b7d476a3d50c6551de8d67310d32",
                "md5": "3281ffcda388af4bf3f5e20d11e0d6c2",
                "sha256": "8b0d3b01f2a36668a066dc1e5cc3b065528a54d008deae810702649e90e68311"
            },
            "downloads": -1,
            "filename": "nlpia2_wikipedia-1.5.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3281ffcda388af4bf3f5e20d11e0d6c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15478,
            "upload_time": "2024-08-18T02:00:33",
            "upload_time_iso_8601": "2024-08-18T02:00:33.556561Z",
            "url": "https://files.pythonhosted.org/packages/16/98/75d111b70bf4bef8016dd45064cdca82b7d476a3d50c6551de8d67310d32/nlpia2_wikipedia-1.5.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "458fc6d64b6fe1f68c59807e0839565f7ffbcdf8e59d6cad20b417882b86eaec",
                "md5": "ef9269f5e7b250fca99588801971d6bf",
                "sha256": "049812a54d7e90655bbff4a62ee7400c05f762d773e0cd8990db7056886a9f10"
            },
            "downloads": -1,
            "filename": "nlpia2_wikipedia-1.5.17.tar.gz",
            "has_sig": false,
            "md5_digest": "ef9269f5e7b250fca99588801971d6bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15724,
            "upload_time": "2024-08-18T02:00:34",
            "upload_time_iso_8601": "2024-08-18T02:00:34.878669Z",
            "url": "https://files.pythonhosted.org/packages/45/8f/c6d64b6fe1f68c59807e0839565f7ffbcdf8e59d6cad20b417882b86eaec/nlpia2_wikipedia-1.5.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-18 02:00:34",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "tangibleai",
    "gitlab_project": "community",
    "lcname": "nlpia2-wikipedia"
}
        
Elapsed time: 0.59224s