dotabase


Namedotabase JSON
Version 7.7.8 PyPI version JSON
download
home_pagehttps://github.com/mdiller/dotabase
SummaryDota 2 game data extracted as an SQLite database, with an SQLAlchemy wrapper
upload_time2024-11-13 00:28:50
maintainerNone
docs_urlNone
authorMalcolm Diller
requires_pythonNone
licenseNone
keywords dota dota2 data sqlite
VCS
bugtrack_url
requirements SQLAlchemy sqlalchemy-stubs SQLAlchemy-Utils
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">Dotabase</h1>

<p align="center">
	<a href="https://pypi.org/project/dotabase/">
		<img alt="PyPi" src="https://img.shields.io/pypi/v/dotabase.svg?style=for-the-badge&logo=pypi">
	</a>
	<a href="https://www.dota2.com/patches/">
		<img alt="Dota Version" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mdiller/dotabase/master/DOTA_VERSION">
	</a>
</p>

A SQLite database representing much of the data from Dota 2 game files, and a SQLAlchemy representation to be used with it. This was built using my [dotabase-builder](https://github.com/mdiller/dotabase-builder) project. Note that I've removed the database from this repository, as binary files are not git-friendly, and have replaced it with a SQL file dump of the database.

## Description
The goal of this project is to provide an interface into Dota 2 game files so that applications can be built around them. This repository will be kept up to date with Dota so that changes to the game are immediately available. 
One main feature of this project that I couldn't find anywhere else, is a representation of Dota's Hero Response system. This is the system that controls the various vocal responses that heroes have to actions that happen in the game. 
In addition to supplying a SQLite database, this project includes a Python SQLAlchemy representation of the database, which provides an easy way to interface with Python applications. (dotabase.py) It also happens to be a good file to look at if you want to get an idea of the structure of the database
NOTE: This project does not supply any player information or data from specific Dota games. There are plenty of [already](http://dev.dota2.com/showthread.php?t=47115 "Dota 2 Match History API") [existing](https://steamcommunity.com/dev "Steam Web API") [API](http://docs.opendota.com/ "OpenDota/Yasp API")s for that.

## Usage
If you want to use the dotabase package in your Python applications, you can install via pip like this:
```
pip install dotabase
```

Example usage:
```python
from dotabase import *

session = dotabase_session()

for hero in session.query(Hero):
	print(hero)
```
If you use MyPy, you should be able to get typing hints and your editor should recognize that the "hero" variable above is an instance of the "Hero" class.

Note that the package was built using Python 3.9 and SQLAlchemy 1.4

## JSON files
In the `json` directory, I've auto-generated a bunch of JSON files that give you an idea of what is inside the database. These are also useful for seeing the difference between builds.

## Builder
The database is built using my custom [dotabase-builder](https://github.com/mdiller/dotabase-builder "Dotabase Builder"). Check it out for more information on how this project is being constructed. Note that the database is constructed and then dumped to a SQL creation script for saving to source control. You can reconstruct it with `sqlite3 dotabase.db ".read dotabase.db.sql"`

## Extracted VPK Files
The files extracted from Dota's vpk are all the ones of the following types:
- txt
- png
- mp3 (extracted from vsnd_c files)

More file types will be added later.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mdiller/dotabase",
    "name": "dotabase",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "dota dota2 data sqlite",
    "author": "Malcolm Diller",
    "author_email": "malcolm@dillerm.io",
    "download_url": "https://files.pythonhosted.org/packages/e6/ac/56b5b436f4f9d7c40ab8a0a2d119faecf6e643d8c9b1ddcd4245443c7bf0/dotabase-7.7.8.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">Dotabase</h1>\r\n\r\n<p align=\"center\">\r\n\t<a href=\"https://pypi.org/project/dotabase/\">\r\n\t\t<img alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/dotabase.svg?style=for-the-badge&logo=pypi\">\r\n\t</a>\r\n\t<a href=\"https://www.dota2.com/patches/\">\r\n\t\t<img alt=\"Dota Version\" src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mdiller/dotabase/master/DOTA_VERSION\">\r\n\t</a>\r\n</p>\r\n\r\nA SQLite database representing much of the data from Dota 2 game files, and a SQLAlchemy representation to be used with it. This was built using my [dotabase-builder](https://github.com/mdiller/dotabase-builder) project. Note that I've removed the database from this repository, as binary files are not git-friendly, and have replaced it with a SQL file dump of the database.\r\n\r\n## Description\r\nThe goal of this project is to provide an interface into Dota 2 game files so that applications can be built around them. This repository will be kept up to date with Dota so that changes to the game are immediately available. \r\nOne main feature of this project that I couldn't find anywhere else, is a representation of Dota's Hero Response system. This is the system that controls the various vocal responses that heroes have to actions that happen in the game. \r\nIn addition to supplying a SQLite database, this project includes a Python SQLAlchemy representation of the database, which provides an easy way to interface with Python applications. (dotabase.py) It also happens to be a good file to look at if you want to get an idea of the structure of the database\r\nNOTE: This project does not supply any player information or data from specific Dota games. There are plenty of [already](http://dev.dota2.com/showthread.php?t=47115 \"Dota 2 Match History API\") [existing](https://steamcommunity.com/dev \"Steam Web API\") [API](http://docs.opendota.com/ \"OpenDota/Yasp API\")s for that.\r\n\r\n## Usage\r\nIf you want to use the dotabase package in your Python applications, you can install via pip like this:\r\n```\r\npip install dotabase\r\n```\r\n\r\nExample usage:\r\n```python\r\nfrom dotabase import *\r\n\r\nsession = dotabase_session()\r\n\r\nfor hero in session.query(Hero):\r\n\tprint(hero)\r\n```\r\nIf you use MyPy, you should be able to get typing hints and your editor should recognize that the \"hero\" variable above is an instance of the \"Hero\" class.\r\n\r\nNote that the package was built using Python 3.9 and SQLAlchemy 1.4\r\n\r\n## JSON files\r\nIn the `json` directory, I've auto-generated a bunch of JSON files that give you an idea of what is inside the database. These are also useful for seeing the difference between builds.\r\n\r\n## Builder\r\nThe database is built using my custom [dotabase-builder](https://github.com/mdiller/dotabase-builder \"Dotabase Builder\"). Check it out for more information on how this project is being constructed. Note that the database is constructed and then dumped to a SQL creation script for saving to source control. You can reconstruct it with `sqlite3 dotabase.db \".read dotabase.db.sql\"`\r\n\r\n## Extracted VPK Files\r\nThe files extracted from Dota's vpk are all the ones of the following types:\r\n- txt\r\n- png\r\n- mp3 (extracted from vsnd_c files)\r\n\r\nMore file types will be added later.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Dota 2 game data extracted as an SQLite database, with an SQLAlchemy wrapper",
    "version": "7.7.8",
    "project_urls": {
        "Homepage": "https://github.com/mdiller/dotabase"
    },
    "split_keywords": [
        "dota",
        "dota2",
        "data",
        "sqlite"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6ac56b5b436f4f9d7c40ab8a0a2d119faecf6e643d8c9b1ddcd4245443c7bf0",
                "md5": "fd55b9dc960c41d49374413bc43812ed",
                "sha256": "5ad3647f76ef73947e7ace0c8088a068a1747d9354e3b508dd6c229486919745"
            },
            "downloads": -1,
            "filename": "dotabase-7.7.8.tar.gz",
            "has_sig": false,
            "md5_digest": "fd55b9dc960c41d49374413bc43812ed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18264258,
            "upload_time": "2024-11-13T00:28:50",
            "upload_time_iso_8601": "2024-11-13T00:28:50.612658Z",
            "url": "https://files.pythonhosted.org/packages/e6/ac/56b5b436f4f9d7c40ab8a0a2d119faecf6e643d8c9b1ddcd4245443c7bf0/dotabase-7.7.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 00:28:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mdiller",
    "github_project": "dotabase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "SQLAlchemy",
            "specs": [
                [
                    ">=",
                    "1.4.40"
                ]
            ]
        },
        {
            "name": "sqlalchemy-stubs",
            "specs": [
                [
                    "==",
                    "0.4"
                ]
            ]
        },
        {
            "name": "SQLAlchemy-Utils",
            "specs": [
                [
                    "==",
                    "0.40.0"
                ]
            ]
        }
    ],
    "lcname": "dotabase"
}
        
Elapsed time: 0.77379s