SteamPlayerCharts


NameSteamPlayerCharts JSON
Version 0.2 PyPI version JSON
download
home_page
SummaryA Python wrapper for SteamCharts
upload_time2023-04-07 22:59:10
maintainer
docs_urlNone
authorSerpensin
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SteamCharts

This module makes it possible to get the player count of a game on Steam using the Steamcharts website. It uses aiohttp, BeautifulSoup and http modules.


## Installation

`pip install SteamPlayerCharts`


## Example
```python
import asyncio
import SteamCharts

async def main():
	steamgameID = "4000"
	player_count = await SteamCharts.playercount(steamgameID)
	print(player_count)
	try:
		current_players = player_count['Current Players']
		day_peak = player_count['Peak Players 24h']
		all_time_peak = player_count['Peak Players All Time']
	except:
		error_code = player_count['error']['code']
		error_message = player_count['error']['message']

asyncio.run(main())
```

The playercount function returns a Python dict containing the current player counts, as well as the peak values for the last 24 hours and all time.

If the query fails, an error dict is returned that contains the HTTP error code and message.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "SteamPlayerCharts",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Serpensin",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# SteamCharts\r\n\r\nThis module makes it possible to get the player count of a game on Steam using the Steamcharts website. It uses aiohttp, BeautifulSoup and http modules.\r\n\r\n\r\n## Installation\r\n\r\n`pip install SteamPlayerCharts`\r\n\r\n\r\n## Example\r\n```python\r\nimport asyncio\r\nimport SteamCharts\r\n\r\nasync def main():\r\n\tsteamgameID = \"4000\"\r\n\tplayer_count = await SteamCharts.playercount(steamgameID)\r\n\tprint(player_count)\r\n\ttry:\r\n\t\tcurrent_players = player_count['Current Players']\r\n\t\tday_peak = player_count['Peak Players 24h']\r\n\t\tall_time_peak = player_count['Peak Players All Time']\r\n\texcept:\r\n\t\terror_code = player_count['error']['code']\r\n\t\terror_message = player_count['error']['message']\r\n\r\nasyncio.run(main())\r\n```\r\n\r\nThe playercount function returns a Python dict containing the current player counts, as well as the peak values for the last 24 hours and all time.\r\n\r\nIf the query fails, an error dict is returned that contains the HTTP error code and message.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python wrapper for SteamCharts",
    "version": "0.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4032959808976fb06e964da461c8d8457bb4dcf77bee3c02dd46b36073508ba4",
                "md5": "d637c6b7daf5b58e16657be40f4b5bd4",
                "sha256": "200e23c9df80ba5216a1fbacdf47f1f33bb9148b094d15616ea2374deecccc02"
            },
            "downloads": -1,
            "filename": "SteamPlayerCharts-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d637c6b7daf5b58e16657be40f4b5bd4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1546,
            "upload_time": "2023-04-07T22:59:10",
            "upload_time_iso_8601": "2023-04-07T22:59:10.070629Z",
            "url": "https://files.pythonhosted.org/packages/40/32/959808976fb06e964da461c8d8457bb4dcf77bee3c02dd46b36073508ba4/SteamPlayerCharts-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-07 22:59:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "steamplayercharts"
}
        
Elapsed time: 0.14636s