dota2monitor


Namedota2monitor JSON
Version 0.0.0.3 PyPI version JSON
download
home_page
SummaryDota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.
upload_time2023-12-22 22:27:45
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT License Copyright (c) 2023 imbalanceinbalance Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords dota gsi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dota2Monitor

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/imbalanceinbalance/dota2monitor/blob/main/LICENSE)

Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.

## Installation

You can install Dota2Monitor using pip:

```bash
pip install dota2monitor
```
## Usage

1. Place the file gamestate_integration_monitor.cfg into ~\SteamLibrary\steamapps\common\dota 2 beta\game\dota\cfg\gamestate_integration.
```
"Dota 2 Integration Configuration"
{
    "uri"           "http://localhost:666/"
    "timeout"       "5.0"
    "buffer"        "0.1"
    "throttle"      "0.1"
    "heartbeat"     "30.0"
    "data"
    {
        "provider"      "1"
        "map"           "1"
        "player"        "1"
        "hero"          "1"
        "abilities"     "1"
        "items"         "1"
        "buildings"     "0"
        "draft"         "0"
        "events"        "1"
        "previously"    "0"
    }
}
```
2. Add the following code snippet to monitor events:
```python
from dota2monitor.server import Dota2Monitor
from dota2monitor.models import ListeningEvents

def custom_lvl_up_notify():
    print('New level!')

def custom_death_notify():
    print('Dead!')

def custom_smoked_notify():
    print('Smoked!')

if __name__ == '__main__':
    monitor = Dota2Monitor()
    monitor.event_manager.add_event_listener("onDeath", custom_death_notify)
    monitor.event_manager.add_event_listener(ListeningEvents.LVL_UP, custom_lvl_up_notify)
    monitor.event_manager.add_event_listener(ListeningEvents.SMOKED, custom_smoked_notify)

    monitor.run(port = 666)
```
## Contributing

Feel free to contribute by submitting pull requests or raising issues.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dota2monitor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "dota,gsi",
    "author": "",
    "author_email": "imbalanceinbalance <imbalanceinbalance@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/12/3c/05ed4dcda98231a36895c49d460049a3bf2e8f3c188d468aa4b9841ee063/dota2monitor-0.0.0.3.tar.gz",
    "platform": "Linux",
    "description": "# Dota2Monitor\r\n\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/imbalanceinbalance/dota2monitor/blob/main/LICENSE)\r\n\r\nDota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.\r\n\r\n## Installation\r\n\r\nYou can install Dota2Monitor using pip:\r\n\r\n```bash\r\npip install dota2monitor\r\n```\r\n## Usage\r\n\r\n1. Place the file gamestate_integration_monitor.cfg into ~\\SteamLibrary\\steamapps\\common\\dota 2 beta\\game\\dota\\cfg\\gamestate_integration.\r\n```\r\n\"Dota 2 Integration Configuration\"\r\n{\r\n    \"uri\"           \"http://localhost:666/\"\r\n    \"timeout\"       \"5.0\"\r\n    \"buffer\"        \"0.1\"\r\n    \"throttle\"      \"0.1\"\r\n    \"heartbeat\"     \"30.0\"\r\n    \"data\"\r\n    {\r\n        \"provider\"      \"1\"\r\n        \"map\"           \"1\"\r\n        \"player\"        \"1\"\r\n        \"hero\"          \"1\"\r\n        \"abilities\"     \"1\"\r\n        \"items\"         \"1\"\r\n        \"buildings\"     \"0\"\r\n        \"draft\"         \"0\"\r\n        \"events\"        \"1\"\r\n        \"previously\"    \"0\"\r\n    }\r\n}\r\n```\r\n2. Add the following code snippet to monitor events:\r\n```python\r\nfrom dota2monitor.server import Dota2Monitor\r\nfrom dota2monitor.models import ListeningEvents\r\n\r\ndef custom_lvl_up_notify():\r\n    print('New level!')\r\n\r\ndef custom_death_notify():\r\n    print('Dead!')\r\n\r\ndef custom_smoked_notify():\r\n    print('Smoked!')\r\n\r\nif __name__ == '__main__':\r\n    monitor = Dota2Monitor()\r\n    monitor.event_manager.add_event_listener(\"onDeath\", custom_death_notify)\r\n    monitor.event_manager.add_event_listener(ListeningEvents.LVL_UP, custom_lvl_up_notify)\r\n    monitor.event_manager.add_event_listener(ListeningEvents.SMOKED, custom_smoked_notify)\r\n\r\n    monitor.run(port = 666)\r\n```\r\n## Contributing\r\n\r\nFeel free to contribute by submitting pull requests or raising issues.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 imbalanceinbalance  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.",
    "version": "0.0.0.3",
    "project_urls": {
        "Documentation": "https://github.com/imbalanceinbalance/dota2monitor",
        "Homepage": "https://github.com/imbalanceinbalance/dota2monitor"
    },
    "split_keywords": [
        "dota",
        "gsi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "691f74dbcfe7e75bc2c540af65656b23d246725af72b6302734e4b3caa566c2d",
                "md5": "657f051af32c3ed77ec353af486c9510",
                "sha256": "beb3f0a0f78d5372647ca704356449439d39a585deb3ac94aaecd4ac51c0b76e"
            },
            "downloads": -1,
            "filename": "dota2monitor-0.0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "657f051af32c3ed77ec353af486c9510",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 10840,
            "upload_time": "2023-12-22T22:27:43",
            "upload_time_iso_8601": "2023-12-22T22:27:43.960909Z",
            "url": "https://files.pythonhosted.org/packages/69/1f/74dbcfe7e75bc2c540af65656b23d246725af72b6302734e4b3caa566c2d/dota2monitor-0.0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "123c05ed4dcda98231a36895c49d460049a3bf2e8f3c188d468aa4b9841ee063",
                "md5": "ecc8c39c578bc30a1b758acf07d88641",
                "sha256": "585b129a9f0857eae0266976520dc5b5b940915f54d2f6d2a735b608ef59431e"
            },
            "downloads": -1,
            "filename": "dota2monitor-0.0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ecc8c39c578bc30a1b758acf07d88641",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11682,
            "upload_time": "2023-12-22T22:27:45",
            "upload_time_iso_8601": "2023-12-22T22:27:45.695557Z",
            "url": "https://files.pythonhosted.org/packages/12/3c/05ed4dcda98231a36895c49d460049a3bf2e8f3c188d468aa4b9841ee063/dota2monitor-0.0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-22 22:27:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imbalanceinbalance",
    "github_project": "dota2monitor",
    "github_not_found": true,
    "lcname": "dota2monitor"
}
        
Elapsed time: 0.15376s