Skip to main content

DOTA 2 constant parses

Project description

PyDotaConstants

PyDotaConstants is a Python library designed to provide structured access to Dota 2 hero and ability data. It allows developers to easily retrieve hero and ability information based on their code names and display names. This project is particularly useful for creating applications and tools that require detailed insights into Dota 2's capabilities and characters.

Current version - 7.41d

Features

  • Retrieve hero information by codename, ID, or display name.
  • Access ability information similarly through codename or display name.
  • Data is loaded from pre-compiled binary files, ensuring fast access and processing.
  • Supports a structured schema for hero and ability data that can be easily navigated.

Installation and Setup

To install the PyDotaConstants library, simply clone the repository and ensure the necessary data files are in place. The current data files are compiled as .pkl files and represented in the src/pydotaconstants/data directory.

git clone https://github.com/r41ngee/pydotaconstants.git
cd pydotaconstants

Basic Usage

To use the library, you can import the desired classes and access hero or ability data as shown below:

from pydotaconstants import Hero, Ability

# Get hero by codename
hero = Hero.getByName("npc_dota_hero_axe")
print(hero.displayName)  # Output: Axe

# Get ability by display name
ability = Ability.getByDisplayName("Hex")
print(ability.displayDescription)

Configuration

This library contains certain pre-compiled data files:

  • heroes.pkl: Contains data for all Dota 2 heroes.
  • abilities.pkl: Contains data for all Dota 2 abilities.
  • locals.pkl: Contains localization strings for heroes and abilities.
  • items.pkl: Contains data for all Dota 2 items.

Contributing Guidelines

Contributions to PyDotaConstants are welcome. To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a Pull Request detailing your changes.

Please ensure any new features include tests and documentation updates as necessary.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydotaconstants-1.1.1.post2.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydotaconstants-1.1.1.post2-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

Details for the file pydotaconstants-1.1.1.post2.tar.gz.

File metadata

  • Download URL: pydotaconstants-1.1.1.post2.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydotaconstants-1.1.1.post2.tar.gz
Algorithm Hash digest
SHA256 e859c4ed9fca78d3b7bb7ee4394b54ec9c15d4aff0bd543b3582ec870f15eac9
MD5 a7a58d292249f2c59e9355c9d1fc4d45
BLAKE2b-256 3190ad00993c0ef2456019a56c15a0e491eebb5c0281678de673b9badf0bee4c

See more details on using hashes here.

File details

Details for the file pydotaconstants-1.1.1.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for pydotaconstants-1.1.1.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 426febce34f87d9d20e83acd52d5a849b4bb77671e5df0ccbb5d351d280b9ca1
MD5 c995c77cba5305a1525a3c5745a519d6
BLAKE2b-256 2d59ec0677b9465ad976dea15b42d2f9338ffbb5126942e244390b546044baa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page