wikipya


Namewikipya JSON
Version 4.1.1 PyPI version JSON
download
home_pageNone
SummaryA simple async python library for search pages and images in wikis
upload_time2025-11-01 16:43:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <h1>📚 wikipya</h1>
  <h3>A simple async python library for search pages and images in wikis</h3>
</div><br>

## 🛠 Usage
```python
# Import wikipya
from wikipya import Wikipya

# Create Wikipya object with Wikipedia methods
wiki = Wikipya(lang="en").get_instance()

# or use other MediaEiki server (or other service, but this is'n fully supported now)

wikipya = Wikipya(url="https://ipv6.lurkmo.re/api.php", lurk=True, prefix="").get_instance()

# for use Lurkmore (russian). simple and fast

# Get a pages list from search
search = await wiki.search("test")

# Get a pages list from opensearch
opensearch = await wiki.opensearch("test")

# Get page class
# You can give to wiki.page() search item, title of page, page id

# Search item (supported ONLY by wiki.search)
page = await wiki.page(search[0])

# Page title
page = await wiki.page("git")

# Pageid
page = await wiki.page(800543)

print(page.html)       # Get page html
print(page.parsed)     # Get html cleared of link, and other non-formating tags

# Get image
image = await wiki.image(page.title)  # may not work in non-wikipedia services, check true prefix, or create issue

print(image.source)    # Image url
print(image.width)     # Image width
print(image.height)    # Image height
```

## 🎉 Features
- Full async
- Support of other instances of MediaWiki
- Support cleaning of HTML with TgHTML
- Uses models by [pydantic](https://github.com/samuelcolvin/pydantic)

## 🚀 Install
To install, run this code:
```
pip install wikipya
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wikipya",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Daniel Zakharov <gzdan734@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/11/4f/50d4e31851a89e10dcd7b375131647ea1f709da7afe47c7eb1579e7bc33f/wikipya-4.1.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <h1>\ud83d\udcda wikipya</h1>\n  <h3>A simple async python library for search pages and images in wikis</h3>\n</div><br>\n\n## \ud83d\udee0 Usage\n```python\n# Import wikipya\nfrom wikipya import Wikipya\n\n# Create Wikipya object with Wikipedia methods\nwiki = Wikipya(lang=\"en\").get_instance()\n\n# or use other MediaEiki server (or other service, but this is'n fully supported now)\n\nwikipya = Wikipya(url=\"https://ipv6.lurkmo.re/api.php\", lurk=True, prefix=\"\").get_instance()\n\n# for use Lurkmore (russian). simple and fast\n\n# Get a pages list from search\nsearch = await wiki.search(\"test\")\n\n# Get a pages list from opensearch\nopensearch = await wiki.opensearch(\"test\")\n\n# Get page class\n# You can give to wiki.page() search item, title of page, page id\n\n# Search item (supported ONLY by wiki.search)\npage = await wiki.page(search[0])\n\n# Page title\npage = await wiki.page(\"git\")\n\n# Pageid\npage = await wiki.page(800543)\n\nprint(page.html)       # Get page html\nprint(page.parsed)     # Get html cleared of link, and other non-formating tags\n\n# Get image\nimage = await wiki.image(page.title)  # may not work in non-wikipedia services, check true prefix, or create issue\n\nprint(image.source)    # Image url\nprint(image.width)     # Image width\nprint(image.height)    # Image height\n```\n\n## \ud83c\udf89 Features\n- Full async\n- Support of other instances of MediaWiki\n- Support cleaning of HTML with TgHTML\n- Uses models by [pydantic](https://github.com/samuelcolvin/pydantic)\n\n## \ud83d\ude80 Install\nTo install, run this code:\n```\npip install wikipya\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple async python library for search pages and images in wikis",
    "version": "4.1.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "83c872c71bc073d60626948b49bb038552110997f8360f40222598578b205c3b",
                "md5": "51a2f18656e78937524d3807889bdf60",
                "sha256": "d68819f3d7ed66dc821cfca89c90c9d178754107da83849d4afc92efe9c923a6"
            },
            "downloads": -1,
            "filename": "wikipya-4.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51a2f18656e78937524d3807889bdf60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17234,
            "upload_time": "2025-11-01T16:43:12",
            "upload_time_iso_8601": "2025-11-01T16:43:12.500172Z",
            "url": "https://files.pythonhosted.org/packages/83/c8/72c71bc073d60626948b49bb038552110997f8360f40222598578b205c3b/wikipya-4.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "114f50d4e31851a89e10dcd7b375131647ea1f709da7afe47c7eb1579e7bc33f",
                "md5": "9fbfeef20019be6c5b5dc5f265d097da",
                "sha256": "83c02725be172eb99ffe05bc7d92faa30694fdc3dc18a48bb07ec7675b5cb328"
            },
            "downloads": -1,
            "filename": "wikipya-4.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9fbfeef20019be6c5b5dc5f265d097da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 11473,
            "upload_time": "2025-11-01T16:43:14",
            "upload_time_iso_8601": "2025-11-01T16:43:14.000248Z",
            "url": "https://files.pythonhosted.org/packages/11/4f/50d4e31851a89e10dcd7b375131647ea1f709da7afe47c7eb1579e7bc33f/wikipya-4.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-01 16:43:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "wikipya"
}
        
Elapsed time: 2.95401s